﻿/* ========================================
   ELITESOURCE BBS
   Private Messages
   ======================================== */


/* ---------- Message Container ---------- */

.bbs-message-container {
    max-width: 950px;
    margin: 0 auto;
}


/* ---------- Message Toolbar ---------- */

.bbs-message-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 16px;

    background-color: var(--bbs-panel);

    border: 1px solid var(--bbs-border);
    border-bottom: 1px solid var(--bbs-accent);
    border-radius: 4px 4px 0 0;
}

.bbs-message-toolbar-title {
    color: var(--bbs-muted);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.bbs-message-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ---------- Toolbar Buttons ---------- */

.bbs-message-toolbar-button,
.bbs-message-compose-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    background-color: var(--bbs-bg);

    border: 1px solid var(--bbs-border);
    border-radius: 3px;

    color: var(--bbs-muted);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 1px;

    text-decoration: none;

    transition:
            color 0.15s ease,
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.bbs-message-toolbar-button:hover,
.bbs-message-compose-button:hover {
    color: var(--bbs-bg);

    background-color: var(--bbs-accent);
    border-color: var(--bbs-accent);

    text-decoration: none;

    box-shadow:
            0 0 10px rgba(255, 157, 0, 0.15);
}

.bbs-message-toolbar-active {
    color: var(--bbs-accent);
    border-color: var(--bbs-accent);
}

.bbs-message-compose-button {
    color: var(--bbs-accent);
    border-color: var(--bbs-accent);
}


/* ---------- Empty Inbox ---------- */

.bbs-message-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 260px;
    padding: 40px 20px;

    background-color: var(--bbs-panel);

    border: 1px solid var(--bbs-border);
    border-top: none;
    border-radius: 0 0 4px 4px;

    text-align: center;

    font-family: Consolas, "Courier New", monospace;
}

.bbs-message-empty-icon {
    margin-bottom: 16px;

    color: var(--bbs-accent);

    font-size: 1.7rem;
    font-weight: bold;

    text-shadow:
            0 0 12px rgba(255, 157, 0, 0.25);
}

.bbs-message-empty strong {
    margin-bottom: 8px;

    color: var(--bbs-text);

    font-size: 0.85rem;
    letter-spacing: 2px;
}

.bbs-message-empty span {
    color: var(--bbs-muted);

    font-size: 0.68rem;
    letter-spacing: 1px;
}


/* ---------- Message List ---------- */

.bbs-message-list {
    background-color: var(--bbs-panel);

    border: 1px solid var(--bbs-border);
    border-top: none;
    border-radius: 0 0 4px 4px;

    overflow: hidden;
}


/* ---------- Message List Header ---------- */

.bbs-message-list-header {
    display: grid;

    grid-template-columns:
        80px
        170px
        minmax(220px, 1fr)
        190px;

    gap: 15px;

    padding: 10px 16px;

    background-color: var(--bbs-bg);

    border-bottom: 1px solid var(--bbs-border);

    color: var(--bbs-muted);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 1.25px;
}


/* ---------- Message Row ---------- */

.bbs-message-row {
    display: grid;

    grid-template-columns:
        80px
        170px
        minmax(220px, 1fr)
        190px;

    gap: 15px;
    align-items: center;

    min-height: 54px;
    padding: 10px 16px;

    border-bottom: 1px solid var(--bbs-border);

    color: var(--bbs-text);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.75rem;

    text-decoration: none;

    transition:
            background-color 0.15s ease,
            border-color 0.15s ease;
}

.bbs-message-row:last-child {
    border-bottom: none;
}

.bbs-message-row:hover {
    background-color: var(--bbs-panel-light);

    color: var(--bbs-text);

    text-decoration: none;
}


/* ---------- Unread Messages ---------- */

.bbs-message-unread {
    background-color: rgba(255, 157, 0, 0.025);
    border-left: 3px solid var(--bbs-accent);
}

.bbs-message-unread .bbs-message-sender,
.bbs-message-unread .bbs-message-subject {
    color: var(--bbs-text);
    font-weight: bold;
}


/* ---------- Read Messages ---------- */

.bbs-message-read {
    border-left: 3px solid transparent;
}

.bbs-message-read .bbs-message-sender,
.bbs-message-read .bbs-message-subject,
.bbs-message-read .bbs-message-date {
    color: var(--bbs-muted);
}


/* ---------- Status Indicators ---------- */

.bbs-message-new-indicator,
.bbs-message-read-indicator {
    display: inline-block;

    min-width: 42px;

    padding: 3px 6px;

    border-radius: 2px;

    text-align: center;

    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.bbs-message-new-indicator {
    color: var(--bbs-bg);

    background-color: var(--bbs-accent);

    box-shadow:
            0 0 8px rgba(255, 157, 0, 0.15);
}

.bbs-message-read-indicator {
    color: var(--bbs-muted);

    border: 1px solid var(--bbs-border);
}


/* ---------- Sender / Subject / Date ---------- */

.bbs-message-sender {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.bbs-message-subject {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.bbs-message-date {
    color: var(--bbs-muted);

    font-size: 0.68rem;

    text-align: right;
}


/* ---------- Responsive ---------- */

@media (max-width: 800px) {

    .bbs-message-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bbs-message-toolbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .bbs-message-list-header {
        display: none;
    }

    .bbs-message-row {
        grid-template-columns: 65px 1fr;
        gap: 8px 12px;

        padding: 14px;
    }

    .bbs-message-status {
        grid-row: 1 / span 2;
    }

    .bbs-message-sender {
        font-weight: bold;
    }

    .bbs-message-subject {
        grid-column: 2;
    }

    .bbs-message-date {
        grid-column: 2;

        text-align: left;
    }
}

/* ========================================
   COMPOSE MESSAGE
   ======================================== */

.bbs-compose-form {
    padding: 24px;

    background-color: var(--bbs-panel);

    border: 1px solid var(--bbs-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
}


/* ---------- Fields ---------- */

.bbs-compose-field {
    margin-bottom: 24px;
}

.bbs-compose-field label {
    display: block;

    margin-bottom: 8px;

    color: var(--bbs-muted);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1.25px;
}


/* ---------- Inputs ---------- */

.bbs-compose-input,
.bbs-compose-select,
.bbs-compose-textarea {
    width: 100%;

    padding: 10px 12px;

    background-color: var(--bbs-bg);

    border: 1px solid var(--bbs-border);
    border-radius: 3px;

    color: var(--bbs-text);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.8rem;

    outline: none;

    transition:
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.bbs-compose-input:focus,
.bbs-compose-select:focus,
.bbs-compose-textarea:focus {
    border-color: var(--bbs-accent);

    box-shadow:
            0 0 0 2px rgba(255, 157, 0, 0.08);
}

.bbs-compose-textarea {
    min-height: 220px;
    resize: vertical;
}


/* ---------- Select ---------- */

.bbs-compose-select {
    cursor: pointer;
}

.bbs-compose-select option {
    background-color: var(--bbs-bg);
    color: var(--bbs-text);
}


/* ---------- Hints ---------- */

.bbs-compose-hint {
    margin-top: 7px;

    color: var(--bbs-muted);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.8px;
}


/* ---------- Validation ---------- */

.bbs-compose-validation {
    display: block;

    margin-top: 7px;

    color: #c47878;

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}


/* ---------- Actions ---------- */

.bbs-compose-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    padding-top: 5px;
}

.bbs-compose-send,
.bbs-compose-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 7px 14px;

    border-radius: 3px;

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;

    text-decoration: none;

    cursor: pointer;

    transition:
            color 0.15s ease,
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.bbs-compose-send {
    background-color: transparent;

    border: 1px solid var(--bbs-accent);

    color: var(--bbs-accent);
}

.bbs-compose-send:hover {
    background-color: var(--bbs-accent);

    color: var(--bbs-bg);

    box-shadow:
            0 0 12px rgba(255, 157, 0, 0.15);
}

.bbs-compose-cancel {
    background-color: var(--bbs-bg);

    border: 1px solid var(--bbs-border);

    color: var(--bbs-muted);
}

.bbs-compose-cancel:hover {
    border-color: var(--bbs-accent);

    color: var(--bbs-accent);

    text-decoration: none;
}


/* ---------- Responsive ---------- */

@media (max-width: 700px) {

    .bbs-compose-form {
        padding: 18px;
    }

    .bbs-compose-actions {
        flex-wrap: wrap;
    }
}

/* ========================================
   READ MESSAGE
   ======================================== */

.bbs-read-message {
    background-color: var(--bbs-panel);

    border: 1px solid var(--bbs-border);
    border-top: none;
    border-radius: 0 0 4px 4px;

    overflow: hidden;
}


/* ---------- Message Header ---------- */

.bbs-read-message-header {
    padding: 18px 20px;

    background-color: var(--bbs-bg);

    border-bottom: 1px solid var(--bbs-border);
}

.bbs-read-message-field {
    display: flex;
    align-items: baseline;
    gap: 10px;

    margin-bottom: 9px;

    font-family: Consolas, "Courier New", monospace;
}

.bbs-read-message-field:last-child {
    margin-bottom: 0;
}

.bbs-read-message-field span {
    min-width: 90px;

    color: var(--bbs-muted);

    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 1.25px;
}

.bbs-read-message-field strong {
    color: var(--bbs-text);

    font-size: 0.78rem;
    font-weight: normal;
}

.bbs-read-message-field:first-child strong {
    color: var(--bbs-accent);
    font-weight: bold;
}


/* ---------- Message Body ---------- */

.bbs-read-message-body {
    min-height: 220px;

    padding: 28px 24px;

    color: var(--bbs-text);

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
    line-height: 1.8;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* ---------- Message Actions ---------- */

.bbs-read-message-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 14px 20px;

    background-color: var(--bbs-bg);

    border-top: 1px solid var(--bbs-border);
}

.bbs-read-back,
.bbs-read-reply {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 6px 12px;

    border-radius: 3px;

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 1px;

    text-decoration: none;

    transition:
            color 0.15s ease,
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.bbs-read-back {
    color: var(--bbs-muted);

    background-color: var(--bbs-bg);

    border: 1px solid var(--bbs-border);
}

.bbs-read-back:hover {
    color: var(--bbs-accent);

    border-color: var(--bbs-accent);

    text-decoration: none;
}

.bbs-read-reply {
    color: var(--bbs-accent);

    background-color: transparent;

    border: 1px solid var(--bbs-accent);
}

.bbs-read-reply:hover {
    color: var(--bbs-bg);

    background-color: var(--bbs-accent);

    text-decoration: none;

    box-shadow:
            0 0 12px rgba(255, 157, 0, 0.15);
}


/* ---------- Responsive ---------- */

@media (max-width: 700px) {

    .bbs-read-message-field {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .bbs-read-message-field span {
        min-width: 0;
    }

    .bbs-read-message-actions {
        flex-wrap: wrap;
    }
}

/* ========================================
   SENT MESSAGE READ STATUS
   ======================================== */

.bbs-sent-status-read {
    color: var(--bbs-accent) !important;
}

.bbs-sent-status-unread {
    color: var(--bbs-muted) !important;
}

/* ========================================
   MESSAGE DELETE CONTROLS
   ======================================== */

.bbs-read-message-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbs-message-delete-form {
    margin: 0;
}

.bbs-message-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 7px 12px;

    background-color: transparent;
    border: 1px solid #a84b4b;
    border-radius: 3px;

    color: #d06a6a;

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 1px;

    text-transform: uppercase;
    cursor: pointer;

    transition:
            color 0.15s ease,
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.bbs-message-delete-button:hover {
    color: #ffffff;
    background-color: #8f3d3d;
    border-color: #c65c5c;

    box-shadow:
            0 0 10px rgba(198, 92, 92, 0.20);
}