/**
 * Flamenet Messaging — CSS
 * Styled to match the Flamenet theme.
 * Colors: #003399 blue, #CC0000 red, #FFCC00 yellow, #0000CC link blue
 */

/* -------------------------------------------------------
   Container
------------------------------------------------------- */
.fnm-wrap {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #000000;
    margin: 0 0 10px 0;
}

/* -------------------------------------------------------
   Flash notices
------------------------------------------------------- */
.fnm-notice-success {
    background: #F5FFF5;
    border-left: 3px solid #006600;
    color: #006600;
    padding: 5px 8px;
    margin-bottom: 8px;
    font-size: 11px;
}

.fnm-notice-error {
    background: #FFF5F5;
    border-left: 3px solid #CC0000;
    color: #CC0000;
    padding: 5px 8px;
    margin-bottom: 8px;
    font-size: 11px;
}

/* -------------------------------------------------------
   Header bar
------------------------------------------------------- */
.fnm-header {
    background-color: #003399;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 11px;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.fnm-btn,
.fnm-btn:visited,
.fnm-btn:hover,
.fnm-btn:visited:hover {
    color: #FFFFFF;
    text-decoration: none;
}

.fnm-btn {
    display: inline-block;
    background-color: #003399;
    border: 1px solid #002277;
    padding: 2px 10px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    cursor: pointer;
}

.fnm-btn:hover,
.fnm-btn:visited:hover {
    background-color: #CC0000;
    border-color: #990000;
}

.fnm-btn-delete {
    background: none;
    border: none;
    color: #CC0000;
    font-size: 10px;
    padding: 0;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: underline;
    vertical-align: middle;
}

.fnm-btn-delete:hover {
    color: #990000;
}

/* -------------------------------------------------------
   Back link
------------------------------------------------------- */
.fnm-back-link {
    display: block;
    font-size: 11px;
    color: #0000CC;
    text-decoration: underline;
    margin-bottom: 6px;
}

.fnm-back-link:hover {
    color: #CC0000;
}

/* -------------------------------------------------------
   Inbox table
------------------------------------------------------- */
.fnm-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #7F9DB9;
    margin-bottom: 8px;
    font-size: 11px;
}

.fnm-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #DDDDDD;
    vertical-align: middle;
}

.fnm-table tr:last-child td {
    border-bottom: none;
}

.fnm-row-even { background-color: #EEF2FF; }
.fnm-row-odd  { background-color: #FFFFFF; }

/* Unread: bold text */
.fnm-unread td { font-weight: bold; }

/* Unread indicator dot */
.fnm-dot {
    color: #003399;
    font-size: 8px;
    vertical-align: middle;
}

.fnm-td-dot {
    width: 14px;
    text-align: center;
    padding: 5px 2px !important;
}

.fnm-td-name a {
    color: #0000CC;
    text-decoration: none;
}

.fnm-td-name a:hover {
    color: #CC0000;
    text-decoration: underline;
}

.fnm-td-date {
    width: 90px;
    color: #666666;
    font-size: 10px;
    white-space: nowrap;
}

.fnm-td-count {
    width: 80px;
    color: #666666;
    font-size: 10px;
    text-align: right;
}

/* -------------------------------------------------------
   Thread view
------------------------------------------------------- */
.fnm-thread {
    border: 1px solid #7F9DB9;
    margin-bottom: 8px;
    background: #FFFFFF;
}

.fnm-msg-bubble {
    padding: 8px 10px;
    border-bottom: 1px dotted #DDDDDD;
}

.fnm-msg-bubble:last-child {
    border-bottom: none;
}

/* Own messages get a subtle warm tint */
.fnm-msg-mine   { background-color: #FFFFF8; }
.fnm-msg-theirs { background-color: #FFFFFF; }

.fnm-msg-meta {
    font-size: 10px;
    color: #666666;
    margin-bottom: 4px;
}

.fnm-msg-body {
    font-size: 11px;
    line-height: 1.5;
    color: #000000;
    word-wrap: break-word;
}

/* -------------------------------------------------------
   Reply form
------------------------------------------------------- */
.fnm-reply-form {
    border: 1px solid #003399;
    margin-bottom: 10px;
}

.fnm-reply-form .fnm-header {
    margin-bottom: 0;
}

.fnm-form-body {
    padding: 10px 12px;
    background: #FFFFFF;
}

.fnm-field {
    margin-bottom: 8px;
}

.fnm-field label {
    display: block;
    font-weight: bold;
    font-size: 11px;
    color: #003399;
    margin-bottom: 2px;
}

.fnm-input {
    width: 100%;
    border: 1px solid #AAAAAA;
    padding: 3px 5px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    background: #FFFFFF;
    box-sizing: border-box;
}

.fnm-textarea {
    width: 100%;
    border: 1px solid #AAAAAA;
    padding: 4px 6px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    background: #FFFFFF;
    box-sizing: border-box;
    resize: vertical;
}

.fnm-input:focus,
.fnm-textarea:focus {
    border-color: #003399;
    outline: none;
}

.fnm-submit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.fnm-cancel {
    color: #666666;
    font-size: 11px;
    text-decoration: underline;
}

.fnm-cancel:hover {
    color: #CC0000;
}

/* -------------------------------------------------------
   Misc: empty, error, login prompt
------------------------------------------------------- */
.fnm-empty {
    text-align: center;
    color: #666666;
    font-style: italic;
    padding: 14px !important;
}

.fnm-empty a {
    color: #0000CC;
    text-decoration: underline;
}

.fnm-empty a:hover {
    color: #CC0000;
}

.fnm-login-prompt {
    font-size: 11px;
    color: #333333;
    margin: 8px 0;
}

.fnm-login-prompt a {
    color: #0000CC;
    text-decoration: underline;
}

.fnm-login-prompt a:hover {
    color: #CC0000;
}

.fnm-error {
    color: #CC0000;
    font-size: 11px;
    margin: 8px 0;
}

/* -------------------------------------------------------
   Pagination
------------------------------------------------------- */
.fnm-pagination {
    font-size: 11px;
    margin: 6px 0;
}

.fnm-page-link {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 1px;
    border: 1px solid #AAAAAA;
    color: #0000CC;
    text-decoration: none;
    background: #FFFFFF;
}

.fnm-page-link:hover {
    background: #003399;
    color: #FFFFFF;
    border-color: #003399;
}

.fnm-page-cur {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 1px;
    border: 1px solid #003399;
    background: #003399;
    color: #FFFFFF;
    font-weight: bold;
}

/* -------------------------------------------------------
   Tab navigation  (Inbox / Outbox / Deleted)
------------------------------------------------------- */
.fnm-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #E8EEF8;
    border: 1px solid #7F9DB9;
    padding: 4px 6px;
    margin-bottom: 0;
}

.fnm-tab-links {
    display: flex;
    gap: 3px;
}

.fnm-tab {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    color: #0000CC;
    text-decoration: none;
    border: 1px solid #AAAAAA;
    background: #FFFFFF;
    font-weight: normal;
}

.fnm-tab:hover {
    color: #CC0000;
    border-color: #003399;
    text-decoration: none;
}

.fnm-tab-active,
.fnm-tab-active:visited,
.fnm-tab-active:hover,
.fnm-tab-active:visited:hover {
    background: #003399;
    color: #FFFFFF !important;
    border-color: #003399;
    font-weight: bold;
    text-decoration: none;
}

/* -------------------------------------------------------
   Deleted messages table columns
------------------------------------------------------- */
.fnm-td-dir {
    width: 20px;
    text-align: center;
    color: #666666;
    font-size: 13px;
    padding: 5px 2px !important;
}

.fnm-td-snippet {
    color: #333333;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------------------------------------------------------
   Message Attachments
------------------------------------------------------- */
.fnm-attachments {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #C8D8E8;
}

.fnm-attachment {
    font-size: 11px;
    padding: 2px 0;
}

.fnm-attachment a {
    color: #0000CC;
    text-decoration: none;
}

.fnm-attachment a:hover {
    color: #CC0000;
    text-decoration: underline;
}

.fnm-attachment-size {
    color: #999999;
}

.fnm-file-input {
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
}

.fnm-field-opt {
    color: #999999;
    font-weight: normal;
}

/* -------------------------------------------------------
   Responsive — simplify on narrow screens
------------------------------------------------------- */
@media (max-width: 480px) {
    .fnm-td-count,
    .fnm-td-date {
        display: none;
    }

    .fnm-submit-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fnm-tab {
        padding: 3px 6px;
    }

    .fnm-td-snippet {
        display: none;
    }
}
