/* ------------------------------
   Mail page background and text
---------------------------------*/
body.mail-page {
    background-color: var(--mail-bg-color);
    color: #000000; /* force text to black */
}

/* ------------------------------
   Nav + footer use darker background
---------------------------------*/
body.mail-page nav,
body.mail-page footer {
    background-color: var(--mail-bg-color);
}

/* ------------------------------
   Nav link colors match site-wide defaults
---------------------------------*/
body.mail-page nav a { 
    color: var(--link-color) !important;  /* maroon */
}

body.mail-page nav a:hover { 
    color: var(--nav-bg) !important;      /* dark red */
}

/* ------------------------------
   Mail subjects bold + color
---------------------------------*/
body.mail-page .mail-subject {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}

body.mail-page .mail-subject:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}

/* ------------------------------
   Mail table styling
---------------------------------*/
.mail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.mail-table th,
.mail-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.mail-table th {
    background-color: #f2f2f2;
}

/* ------------------------------
   Mail status key icons alignment
---------------------------------*/
.mail-status-key {
    margin-bottom: 20px;
}

.mail-status-key img {
    vertical-align: middle;
}

/* ------------------------------
   Mail action buttons wrapper
---------------------------------*/
.mail-action-buttons {
    margin-top: 20px;
}

/* ------------------------------
   Footnotes
---------------------------------*/
.footnote {
    font-size: 0.9em;
    color: #000000; /* black */
}

.footnote li {
    margin-bottom: 5px;
}

/* ------------------------------
   Unified buttons (mail nav + form actions)
---------------------------------*/
.button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    color: var(--bg-color);  /* cream text */
    background: linear-gradient(to right, #A32D2D, #7D1F1F);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    background: linear-gradient(to right, #7D1F1F, #A32D2D); /* gradient darkens */
    color: var(--bg-color); /* keep cream text */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-decoration: none !important; /* override global a:hover underline */
}



.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}




.compose-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.mailcompose-form-row {
    margin-bottom: 15px;
}

.generated-mailcompose-1 {
    margin-top: 5px;
}

.generated-mailcompose-2 {
    display: block;
    margin-bottom: 5px;
}

.recipient {
    color: var(--link-color);
    margin-right: 5px;
    padding: 2px 5px;
    text-decoration: none;
}

.recipient:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}


/* Ensure the form has a consistent layout */
.mailcompose-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Adds spacing between major form sections */
}

/* Addressee section (contains search input and To: label with recipients) */
.addressee-section {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between search input and To: label */
    margin-bottom: 30px; /* Space below the entire addressee section */
}

/* Style for the search input container */
.generated-postcomment-1 {
    position: relative; /* For positioning user suggestions dropdown */
}

/* Style for the To: label and recipient list */
.generated-postcomment-2 {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between "To:" label and recipient list */
}

/* Message section (contains Private Message label and textarea) */
.message-section {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between label and textarea */
    margin-bottom: 20px; /* Space below the message section */
}

/* Ensure the textarea looks good in the dark theme */
.generated-postcomment-4 {
    background-color: #2a2a2a; /* Dark background for textarea */
    color: #e0e0e0; /* Light text for readability */
    border: 1px solid #444;
    border-radius: 4px;
}

/* Style for recipient links */
.recipient {
    color: #1e90ff; /* Blue links for dark theme */
    text-decoration: none;
    margin-right: 10px;
}

.recipient:hover {
    text-decoration: underline;
}

/* Style for user suggestions dropdown */
#user_suggestions div {
    background-color: #333;
    color: #e0e0e0;
    padding: 8px;
    cursor: pointer;
}

#user_suggestions div:hover,
#user_suggestions div.selected {
    background-color: #1e90ff;
}


/* Style for the private mail context display */
.private-mail-context {
    background-color: #2a2a2a; /* Dark background to match theme */
    border: 1px solid #444;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px; /* Space below the context box */
    color: #e0e0e0; /* Light text for readability */
}

.private-mail-context p {
    margin: 5px 0;
}

.private-mail-context strong {
    color: #1e90ff; /* Blue for labels to match theme */
}

.private-mail-context {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.private-mail-context p {
    margin: 5px 0;
}

.private-mail-context strong {
    color: #1e90ff;
}

.mailcompose-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.addressee-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.generated-postcomment-2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.generated-postcomment-4 {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
}

.recipient {
    color: #1e90ff;
    text-decoration: none;
    margin-right: 10px;
}

.recipient:hover {
    text-decoration: underline;
}

#user_suggestions div {
    background-color: #333;
    color: #e0e0e0;
    padding: 8px;
    cursor: pointer;
}

#user_suggestions div:hover,
#user_suggestions div.selected {
    background-color: #1e90ff;
}
