/* =====================================================
   LEGAL DESK BD — CASE STATUS MODAL
   Uses the same visual language as the Legal Desk BD theme:
   navy, muted gold, serif headings, restrained borders,
   small radii and generous spacing.
===================================================== */

.ldbd-case-modal[hidden] {
    display: none !important;
}

body.ldbd-modal-open {
    overflow: hidden;
}

.ldbd-case-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ldbd-case-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 18, 29, 0.86);
    backdrop-filter: blur(4px);
}

.ldbd-case-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(700px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white, #fff);
    border: 1px solid rgba(184, 155, 94, 0.22);
    border-radius: var(--radius, 4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.30);
    color: var(--text, #1c1c1c);
    animation: ldbd-modal-in 0.28s ease both;
}

.ldbd-case-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(11, 31, 51, 0.35);
    color: var(--white, #fff);
    font-size: 23px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition, 0.3s ease);
}

.ldbd-case-modal-close:hover {
    background: var(--accent, #b89b5e);
    color: var(--primary, #0b1f33);
    border-color: var(--accent, #b89b5e);
}

.ldbd-case-modal-content {
    padding: 0;
}

/* Form header */
.ldbd-tracker-header,
.ldbd-result-header {
    padding: 42px 48px 38px;
    background: var(--primary, #0b1f33);
    color: var(--white, #fff);
}

.ldbd-tracker-eyebrow,
.ldbd-result-kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--accent, #b89b5e);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.3;
    text-transform: uppercase;
}

.ldbd-case-modal h2 {
    margin: 0 48px 12px 0;
    color: var(--white, #fff);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -1px;
}

.ldbd-tracker-description {
    max-width: 570px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    line-height: 1.75;
}

.ldbd-tracker-form-body {
    padding: 38px 48px 44px;
    background: var(--white, #fff);
}

.ldbd-tracker-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--primary, #0b1f33);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.ldbd-tracker-input-wrap {
    position: relative;
}

.ldbd-tracker-input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 48px 0 17px;
    border: 1px solid var(--border, #deded9);
    border-radius: var(--radius, 4px);
    outline: 0;
    box-sizing: border-box;
    background: var(--white, #fff);
    color: var(--primary, #0b1f33);
    font: inherit;
    font-size: 15px;
    text-transform: uppercase;
    transition: border-color var(--transition, 0.3s ease), box-shadow var(--transition, 0.3s ease);
}

.ldbd-tracker-input-wrap input::placeholder {
    color: #969696;
    text-transform: uppercase;
}

.ldbd-tracker-input-wrap input:focus {
    border-color: var(--accent, #b89b5e);
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.12);
}

.ldbd-input-icon {
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    color: var(--accent, #b89b5e);
    font-size: 20px;
    pointer-events: none;
}

.ldbd-tracker-help {
    margin: 9px 0 22px;
    color: var(--text-light, #6a6a6a);
    font-size: 12px;
    line-height: 1.6;
}

.ldbd-tracker-button {
    position: relative;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    border: 1px solid var(--accent, #b89b5e);
    border-radius: var(--radius, 4px);
    background: var(--accent, #b89b5e);
    color: var(--primary, #0b1f33);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: var(--transition, 0.3s ease);
}

.ldbd-tracker-button:hover {
    background: var(--accent-light, #d1b879);
    border-color: var(--accent-light, #d1b879);
    transform: translateY(-1px);
}

.ldbd-tracker-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.ldbd-button-spinner {
    display: none;
    width: 17px;
    height: 17px;
    margin: auto;
    border: 2px solid rgba(11, 31, 51, 0.25);
    border-top-color: var(--primary, #0b1f33);
    border-radius: 50%;
    animation: ldbd-spin 0.7s linear infinite;
}

.ldbd-case-modal.is-loading .ldbd-button-text {
    display: none;
}

.ldbd-case-modal.is-loading .ldbd-button-spinner {
    display: block;
}

.ldbd-tracker-message {
    margin-top: 17px;
    padding: 13px 15px;
    border-left: 3px solid #9b3c32;
    background: #fbf3f1;
    color: #8d3028;
    font-size: 13px;
    line-height: 1.6;
}

/* Result */
.ldbd-result-header {
    padding-right: 90px;
}

.ldbd-result-kicker {
    margin-bottom: 14px;
}

.ldbd-result-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.ldbd-result-case-number {
    margin: 0;
    color: var(--white, #fff);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 400;
    line-height: 1.15;
}

.ldbd-status {
    max-width: 230px;
    padding: 8px 13px;
    border: 1px solid rgba(184, 155, 94, 0.55);
    border-radius: 999px;
    background: rgba(184, 155, 94, 0.12);
    color: var(--accent-light, #d1b879);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.ldbd-result-body {
    padding: 38px 48px 44px;
    background: var(--white, #fff);
}

.ldbd-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 30px;
    margin-bottom: 35px;
}

.ldbd-result-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #deded9);
}

.ldbd-result-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light, #6a6a6a);
    font-size: 11px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ldbd-result-item strong {
    display: block;
    color: var(--primary, #0b1f33);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

.ldbd-timeline-box {
    padding: 25px 0 0;
    border-top: 1px solid var(--border, #deded9);
}

.ldbd-timeline-title {
    margin: 0 0 22px;
    color: var(--primary, #0b1f33);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
}

.ldbd-public-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ldbd-public-timeline li {
    position: relative;
    display: flex;
    gap: 15px;
    padding: 0 0 22px;
}

.ldbd-public-timeline li:last-child {
    padding-bottom: 0;
}

.ldbd-timeline-dot {
    position: relative;
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #b9b9b2;
}

.ldbd-public-timeline li:not(:last-child) .ldbd-timeline-dot::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 4px;
    width: 1px;
    height: calc(100% + 22px);
    background: var(--border, #deded9);
}

.ldbd-public-timeline li.is-complete .ldbd-timeline-dot {
    background: #66866f;
}

.ldbd-public-timeline li.is-current .ldbd-timeline-dot {
    background: var(--accent, #b89b5e);
    box-shadow: 0 0 0 5px rgba(184, 155, 94, 0.12);
}

.ldbd-timeline-content {
    min-width: 0;
}

.ldbd-timeline-date {
    display: block;
    margin-bottom: 3px;
    color: var(--text-light, #6a6a6a);
    font-size: 11px;
}

.ldbd-timeline-status {
    color: var(--primary, #0b1f33);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.ldbd-result-footer {
    margin-top: 22px;
    color: var(--text-light, #6a6a6a);
    font-size: 11px;
}

.ldbd-check-another {
    width: 100%;
    min-height: 48px;
    margin-top: 25px;
    border: 1px solid var(--accent, #b89b5e);
    border-radius: var(--radius, 4px);
    background: transparent;
    color: var(--primary, #0b1f33);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: var(--transition, 0.3s ease);
}

.ldbd-check-another:hover {
    background: var(--accent, #b89b5e);
}

.ldbd-inline-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--accent, #b89b5e);
    border-radius: var(--radius, 4px);
    background: var(--accent, #b89b5e);
    color: var(--primary, #0b1f33);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

@keyframes ldbd-spin {
    to { transform: rotate(360deg); }
}

@keyframes ldbd-modal-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
    .ldbd-case-modal {
        padding: 12px;
    }

    .ldbd-case-modal-dialog {
        max-height: calc(100vh - 24px);
    }

    .ldbd-case-modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .ldbd-tracker-header,
    .ldbd-result-header {
        padding: 38px 22px 30px;
    }

    .ldbd-tracker-form-body,
    .ldbd-result-body {
        padding: 30px 22px 34px;
    }

    .ldbd-case-modal h2 {
        margin-right: 35px;
        font-size: 32px;
    }

    .ldbd-result-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .ldbd-status {
        max-width: none;
    }

    .ldbd-result-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
