﻿body {
    background: white;
    font-weight:unset !important;
}

/* generic helpers */
.btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* sidebar links */
.msg-nav .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.msg-nav .badge {
    font-size: .75rem
}

.msg-nav .nav-link.active {
    background: rgba(var(--bs-primary-rgb),.15);
    font-weight: 600
}

/* message cards */
.msg-card {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: .25rem;
    padding: 1rem;
    margin-bottom: 1rem
}

    .msg-card.unread {
        border-left: 4px solid var(--bs-primary)
    }

    .msg-card h6 {
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: .25rem
    }

    .msg-card .meta {
        font-size: .8125rem;
        color: #6c757d
    }

    .msg-card .snippet {
        color: #3d474f;
        font-size: .9rem
    }

.badge-new {
    background: #f39200;
    font-weight: 600
}

/* pager */
.pager {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .5rem
}

    .pager button {
        min-width: 72px
    }

/* phone tweaks */
@media (max-width:450px) {
    .mobile-search {
        flex: 1 1 100%;
        margin-top: .5rem
    }
}
/* keep mobile Compose wide enough */
#composeBtnMobile {
    min-width: 110px;
    flex-shrink: 0;
    white-space: nowrap
}

/* desktop search input */
.desktop-search .form-control {
    max-width: 250px
}

/* Email detail spacing */
.from-row { 
    margin-bottom: 0.75rem; 
}
.message-subject { 
    margin-bottom: 0.75rem; 
}

/* Inbox message list */
.email-inbox-card-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    min-height: 3.25rem;
}

.email-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: nowrap;
}

.email-panel-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 0 1 auto;
}

.email-panel-title .usa-card__heading {
    margin: 0;
    white-space: nowrap;
}

.email-panel-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.inbox-stat-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

.inbox-stat-badge--unread {
    text-transform: capitalize;
}

.btn-inbox-actions {
    color: #415466;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    font-weight: 700;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-inbox-actions .inbox-actions-icon {
    font-size: 1rem;
    line-height: 1;
}

.inbox-actions-icon--vertical {
    display: none;
}

.btn-inbox-actions:hover,
.btn-inbox-actions:focus,
.btn-inbox-actions.show {
    color: var(--uswds-primary, #0f4f7d);
    border-color: #a9bdd0;
    background: #f8fafc;
}

.inbox-actions-menu {
    border-color: #d8e0e8;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-radius: 0.55rem;
    padding: 0.4rem;
    min-width: 265px;
    font-size: 0.92rem;
}

.inbox-actions-menu .dropdown-header {
    color: #475569;
    font-weight: 750;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.45rem 0.65rem 0.35rem;
}

.inbox-actions-menu .dropdown-item {
    border-radius: 0.4rem;
    padding: 0.55rem 0.65rem;
    display: flex;
    align-items: start;
    gap: 0.55rem;
    line-height: 1.25;
}

.inbox-actions-menu .dropdown-item .action-text {
    display: block;
    font-weight: 700;
}

.inbox-actions-menu .dropdown-item .action-hint {
    display: block;
    color: #64748b;
    font-size: 0.79rem;
    margin-top: 0.08rem;
}

.inbox-actions-menu .dropdown-item.text-danger:hover,
.inbox-actions-menu .dropdown-item.text-danger:focus {
    background: #fff1f0;
    color: #b42318 !important;
}

.email-subject-link {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--uswds-accent-alt) !important;
    text-decoration: none;
    margin-bottom: 0.75rem;
    line-height: 1.28;
}

.email-subject-link:hover,
.email-subject-link:focus {
    text-decoration: underline;
}

.email-subject-icon {
    color: #f5a623;
    font-size: 0.98rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.email-subject-text {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 750;
    min-width: 0;
}

.delete-all-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin: 1rem 0;
}

.delete-all-summary-item {
    border: 1px solid #e4eaf0;
    background: #fafbfc;
    border-radius: 0.65rem;
    padding: 0.75rem;
    text-align: center;
}

.delete-all-summary-number {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.delete-all-summary-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 650;
}

/* Delete all Inbox modal — match ELMS mockup */
#deleteAllInboxModal .modal-content {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

#deleteAllInboxModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid #edf1f5;
    padding: 1rem 1.1rem;
    background: #fff;
}

#deleteAllInboxModal .modal-body {
    padding: 1rem 1.1rem 1.1rem;
}

#deleteAllInboxModal .modal-footer {
    border-top: 1px solid #edf1f5;
    padding: 0.85rem 1.1rem 1rem;
    background: #fff;
    gap: 0.5rem;
}

.delete-all-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
}

.delete-all-danger-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b42318;
    background: #fff1f0;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.delete-all-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.delete-all-modal-subtitle {
    color: #64748b;
    font-size: 0.84rem;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.delete-all-modal-lead {
    margin: 0 0 0.15rem;
    color: #1f2a37;
    line-height: 1.5;
    font-size: 0.95rem;
}

.delete-all-confirm-note {
    border: 1px solid #fde2df;
    background: #fff1f0;
    color: #7a271a;
    border-radius: 0.65rem;
    padding: 0.75rem 0.85rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

#deleteAllInboxModal .delete-all-confirm-note .bi-info-circle {
    color: #b42318 !important;
}

.delete-all-confirm-check {
    margin: 0;
}

.delete-all-confirm-check .form-check-label {
    font-weight: 600;
    color: #1f2a37;
    line-height: 1.4;
}

#deleteAllInboxModal .btn-close {
    margin: 0;
    flex: 0 0 auto;
}

#deleteAllInboxModal .delete-all-btn-cancel {
    color: #1f2a37;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    min-height: 40px;
}

#deleteAllInboxModal .delete-all-btn-cancel:hover,
#deleteAllInboxModal .delete-all-btn-cancel:focus {
    background: #f8fafc;
    border-color: #b8c5d3;
    color: #1f2a37;
}

#deleteAllInboxModal .delete-all-btn-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-weight: 750;
    min-height: 40px;
    border: 1px solid #b42318;
    background: #b42318;
    color: #fff;
}

#deleteAllInboxModal .delete-all-btn-trash:not(:disabled):hover,
#deleteAllInboxModal .delete-all-btn-trash:not(:disabled):focus {
    background: #912018;
    border-color: #912018;
    color: #fff;
}

#deleteAllInboxModal .delete-all-btn-trash:disabled {
    opacity: 1;
    background: #fff1f0;
    color: #d4a29e;
    border-color: #f0c9c5;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .email-panel-header {
        gap: 0.5rem;
    }

    .email-panel-actions {
        gap: 0.35rem;
    }

    .inbox-stat-badge {
        font-size: 0.72rem;
        padding: 0.3rem 0.45rem;
    }

    .btn-inbox-actions .inbox-actions-icon--horizontal,
    .btn-inbox-actions .inbox-actions-label {
        display: none;
    }

    .btn-inbox-actions .inbox-actions-icon--vertical {
        display: inline-flex;
    }

    .btn-inbox-actions {
        padding: 0.35rem 0.45rem;
        border-radius: 0.35rem;
    }

    .btn-inbox-actions.dropdown-toggle::after {
        display: none;
    }

    .delete-all-summary {
        grid-template-columns: 1fr;
    }
}

.ql-tooltip {
    left: 0 !important;
}