/* Cyberthrone Dashboard — My Account (General/Notification/Verification/Tickets/Inbox)
   Written as a self-contained system: does NOT depend on Bootstrap's JS bundle
   (only a small FormValidation-adapter script is enqueued on this site, not the
   full Bootstrap modal component) or on Font Awesome (not enqueued at all). */

.cd-settings-list,
.cd-toggle-list,
.cd-verify-list {
    margin-top: 20px;
}

.cd-profile-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cd-profile-preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #001a4a;
    flex: 0 0 auto;
}

.cd-profile-preview-name {
    color: #fff;
    font-size: 17px;
}

.cd-inbox-list {
    margin-top: 16px;
}

@media (max-width: 767.98px) {
    .cd-inbox-list {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
}

.cd-inbox-message {
    background: #001a4a;
    border: 1px solid rgba(0, 157, 255, 0.55);
    box-shadow: 0 0 8px #212121;
    padding: 18px 20px;
    color: #fff;
    margin-bottom: 16px;
}

.cd-inbox-message:last-child {
    margin-bottom: 0;
}

.cd-inbox-message-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.cd-inbox-title {
    font-size: 20px;
    font-weight: 800;
}

/* Plain CSS +/× accordion indicator - no icon font required, matches the
   chevron elsewhere on the site. '+' means collapsed/click-to-open; the
   open state below swaps it to '×'. */
.cd-inbox-toggle {
    flex: 0 0 auto;
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
    opacity: 0.8;
}
.cd-inbox-toggle::before,
.cd-inbox-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}
.cd-inbox-toggle::before {
    width: 16px;
    height: 2px;
    transform: translate(-50%, -50%);
}
.cd-inbox-toggle::after {
    width: 2px;
    height: 16px;
    transform: translate(-50%, -50%);
}
.cd-inbox-message.cd-inbox-open .cd-inbox-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.cd-inbox-message.cd-inbox-open .cd-inbox-toggle::before,
.cd-inbox-message.cd-inbox-open .cd-inbox-toggle::after {
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Light slide animation for expand/collapse - simple max-height
   transition, no JS height measuring needed. */
.cd-inbox-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.cd-inbox-message.cd-inbox-open .cd-inbox-collapse {
    max-height: 1200px;
}

.cd-inbox-meta {
    margin-top: 6px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}

.cd-inbox-body {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.cd-inbox-body p:last-child {
    margin-bottom: 0;
}

.cd-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    color: #fff;
}

.cd-settings-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cd-settings-row small {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.cd-settings-value {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

/* Chevron - plain CSS arrow, no icon font required */
.cd-chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
}

.cd-toggle-row,
.cd-verify-row {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Avatar "More" button / inline grid only ever appear on mobile - keep
   them out of desktop's layout entirely by default. Must come before the
   mobile media query below so that query's override actually wins there. */
.cd-avatar-more-btn,
.cd-avatar-inline-grid,
.cd-mobile-only {
    display: none;
}

/* Mobile: match client PSD — each field's value becomes its own full-width
   bordered box below the label (same tokens as the Verification page's
   value box, for visual consistency), not an inline row. This is a pure
   visual change: every row still has the same data-cd-modal attribute and
   the same click-to-open-modal behaviour as desktop - nothing about how
   the rows work has changed, only how they look. */
@media (max-width: 767.98px) {
    #cd-dashboard-content .cd-info-text {
        display: none;
    }

    .cd-settings-row {
        flex-wrap: wrap;
        row-gap: 8px;
        border-bottom: none;
        padding: 0 0 16px;
        margin-bottom: 16px;
    }

    .cd-settings-row:hover {
        background: none;
    }

    .cd-settings-value {
        width: 100%;
        justify-content: space-between;
        white-space: normal;
        background: #001a4a;
        border: 1px solid rgba(0, 157, 255, 0.55);
        box-shadow: 0 0 8px #212121;
        padding: 10px 14px;
        color: #fff;
        font-weight: 700;
        min-height: 42px;
    }

    /* The base toggle: desktop's plain text+chevron span disappears,
       mobile's real input/textarea/preview elements take over. */
    .cd-desktop-only {
        display: none;
    }
    .cd-mobile-only {
        display: inline-block;
    }
    .cd-profile-preview.cd-mobile-only {
        display: flex;
    }

    /* When a row's value is empty (e.g. Email/Discord/X-Twitter not yet
       verified/connected), the chevron is the ONLY child in the box -
       with justify-content:space-between that puts a lone child at the
       start (left), not the end. Forcing it flush right with auto margin
       keeps it at the end regardless of whether there's value text
       before it or not. */
    .cd-chevron {
        margin-left: auto;
    }

    /* Account Name & Bio read as plain input-style boxes (no chevron);
       Bio's box is taller, like an empty textarea. */
    .cd-settings-row[data-cd-modal="cd-modal-username"] .cd-chevron,
    .cd-settings-row[data-cd-modal="cd-modal-bio"] .cd-chevron {
        display: none;
    }
    .cd-settings-row[data-cd-modal="cd-modal-bio"] .cd-settings-value {
        min-height: 70px;
        align-items: flex-start;
    }

    .cd-connect-icon {
        margin-right: 6px;
    }

    /* Account Name / Bio: the box now contains a real input/textarea,
       styled to fill it invisibly rather than looking like a form field. */
    .cd-inline-input,
    .cd-inline-textarea {
        width: 100%;
        background: transparent;
        border: none;
        outline: none;
        resize: none;
        color: #fff;
        font-weight: 700;
        font-family: inherit;
        font-size: 15px;
        padding: 0;
    }
    .cd-inline-textarea {
        min-height: 54px;
    }

    /* Avatar: "More" chip button + inline thumbnail grid, hidden entirely
       on desktop where the modal-based picker still applies. */
    .cd-avatar-row {
        align-items: flex-start;
    }
    .cd-avatar-more-btn {
        display: inline-block;
        background: #001a4a;
        border: 1px solid rgba(0, 157, 255, 0.55);
        box-shadow: 0 0 8px #212121;
        color: #fff;
        font-weight: 700;
        padding: 6px 16px;
        cursor: pointer;
    }
    .cd-avatar-inline-grid {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin: 10px 0 16px;
    }
    .cd-avatar-inline-grid .cd-avatar-option {
        width: 74px;
        height: 74px;
        margin: 0 10px 10px 0 !important;
        padding: 4px !important;
        border: 1px solid rgba(0, 157, 255, 0.55) !important;
        background: #001a4a !important;
        box-shadow: 0 0 6px #212121;
        border-radius: 0;
        cursor: pointer;
    }
    .cd-avatar-inline-grid .cd-avatar-option img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .cd-avatar-inline-grid .cd-avatar-option.is-selected {
        border-color: #d90481 !important;
    }
}

/* ---------- Modal (custom, framework-independent) ---------- */

.cd-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

.cd-modal.cd-modal-open {
    display: block;
}

.cd-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
}

.cd-modal-dialog {
    position: relative;
    max-width: 480px;
    margin: 8vh auto;
    background: #0c1b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
    max-height: 84vh;
    overflow-y: auto;
}

.cd-modal-dialog.cd-modal-lg {
    max-width: 700px;
}

.cd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cd-modal-header h5 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.cd-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.cd-modal-close:hover {
    opacity: 1;
}

.cd-modal-body {
    padding: 20px 22px;
}

.cd-modal-body p {
    color: rgba(255, 255, 255, 0.75);
}

.cd-modal-body .form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.cd-modal-body .form-control:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    box-shadow: none;
    border-color: #e83e8c;
}

.cd-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cd-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.cd-alert-success {
    background: rgba(40, 167, 69, 0.18);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #7be495;
}

.cd-alert-danger {
    background: rgba(220, 53, 69, 0.18);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff8f9c;
}

.cd-alert-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.4);
    color: #8fd8e6;
}
/* 2026-11-24: first-login Terms of Service pop-up now shows the whole Legal page - scroll inside, Accept always visible */
#cd-accept-terms-modal .modal-body { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
#cd-accept-terms-modal .modal-body .elementor-section,
#cd-accept-terms-modal .modal-body .e-con { max-width: 100% !important; }
#cd-accept-terms-modal .modal-body a { color: #00baff; }
#cd-accept-terms-modal .cd-tos-updated { margin: 0 0 14px; font-size: 12px; opacity: .75; }
#cd-accept-terms-modal .cd-tos-more { margin: 18px 0 0; font-size: 13px; }
