﻿/* Operating cost report card, checkout dialog and the hero layout around them.
   Shared by Aircraftdetails.cshtml and AircraftBrochure.cshtml (markup in Pages/Shared/_OperatingCostReport.cshtml). */

.report-btn {
    font-family: inherit;
    line-height: 1.6;
    cursor: pointer;
    appearance: none;
}

    .btn-primary.report-btn {
        border: 1.5px solid transparent;
    }

    .report-btn:focus-visible,
    .report-modal-close:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: 2px;
    }

    .report-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.report-card {
    margin-top: 16px;
    padding: 20px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(26, 32, 96, 0.06);
    min-width: 0;
}

.report-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}

.report-card-badge {
    padding: 4px 10px;
    background: var(--orange);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-card-kicker {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-card-title {
    margin: 14px 0 0;
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
}

.report-card-text {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.report-card-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--offwhite);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.report-doc {
    position: relative;
    padding: 10px 8px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(26, 32, 96, 0.1);
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .report-doc::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 14px;
        height: 14px;
        background: linear-gradient(225deg, var(--offwhite) 50%, #e4e6ee 50%);
    }

.report-doc-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.report-doc-brand {
    margin-top: 2px;
    color: var(--navy);
    font-size: 0.6rem;
    font-weight: 800;
}

.report-doc-title {
    margin-top: 3px;
    color: var(--navy);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
}

.report-doc-plane {
    width: 100%;
    height: 30px;
    margin: 6px 0;
    object-fit: contain;
}

.report-doc-line {
    display: block;
    width: 100%;
    height: 3px;
    margin-top: 4px;
    background: #e4e6ee;
    border-radius: 2px;
}

.report-doc-line--short {
    width: 60%;
    align-self: flex-start;
}

.report-doc-footer {
    width: calc(100% + 16px);
    margin-top: 8px;
    padding: 4px 0;
    background: var(--orange);
    color: var(--white);
    font-size: 0.58rem;
    font-weight: 700;
}

.report-card-included {
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid var(--border);
}

.report-card-included-title {
    color: var(--navy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-card-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

    .report-card-list li {
        position: relative;
        margin-top: 7px;
        padding-left: 24px;
        color: var(--navy);
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.4;
    }

        .report-card-list li::before {
            content: "";
            position: absolute;
            top: 1px;
            left: 0;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #2e9e5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat;
        }

.report-card-price {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-card-amount {
    color: var(--navy);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
}

.report-card-terms {
    padding-left: 12px;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.report-card-btn {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.report-card-notes {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.report-card-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
}

    .report-card-note + .report-card-note {
        border-left: 1px solid var(--border);
    }

    .report-card-note svg {
        width: 15px;
        height: 15px;
    }

.report-card-sample {
    display: block;
    width: fit-content;
    margin: 10px auto 0;
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .report-card-sample:hover {
        color: var(--orange);
    }

    .report-card-sample:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: 2px;
    }

html.report-modal-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.report-modal {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    border: none;
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    box-shadow: 0 24px 64px rgba(17,21,64,0.3);
    overflow-y: auto;
    overscroll-behavior: contain;
}

    .report-modal::backdrop {
        background: rgba(17,21,64,0.6);
    }

.report-modal [hidden] {
    display: none !important;
}

.report-modal-inner {
    position: relative;
    padding: 28px;
}

.report-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

    .report-modal-close:hover {
        background: var(--orange-pale);
        color: var(--orange);
    }

    .report-modal-close svg {
        width: 18px;
        height: 18px;
    }

.report-modal-eyebrow {
    padding-right: 36px;
    color: var(--orange);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.report-modal-title {
    margin-top: 4px;
    padding-right: 24px;
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.report-form {
    margin-top: 18px;
}

.report-modal-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--offwhite);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 0.8rem;
}

    .report-modal-price strong {
        color: var(--navy);
        font-size: 0.95rem;
        white-space: nowrap;
    }

.report-label {
    display: block;
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 600;
}

.report-input {
    width: 100%;
    padding: 11px 12px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 5px;
    color: var(--navy);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .report-input::placeholder {
        color: var(--muted);
    }

    .report-input:focus {
        outline: none;
        border-color: var(--orange);
        box-shadow: 0 0 0 3px var(--orange-pale);
    }

    .report-input[aria-invalid="true"] {
        border-color: #c62828;
    }

        .report-input[aria-invalid="true"]:focus {
            box-shadow: 0 0 0 3px rgba(198,40,40,0.12);
        }

    .report-input[readonly] {
        background: var(--offwhite);
        color: var(--muted);
    }

.report-hint,
.report-error {
    margin-top: 6px;
    font-size: 0.74rem;
    line-height: 1.45;
}

.report-hint {
    color: var(--muted);
}

.report-error {
    color: #c62828;
    font-weight: 600;
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

    .report-actions .report-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        padding-left: 16px;
        padding-right: 16px;
    }

.report-turnstile:not(:empty) {
    margin-top: 14px;
}

/* Full-screen loader, matching the app's #preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
}

    #preloader img {
        position: fixed;
        top: calc(50% - 30px);
        left: calc(50% - 30px);
        width: 100px;
        height: 100px;
    }

.report-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    text-align: center;
}

    .report-status:focus {
        outline: none;
    }

.report-status-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--offwhite);
    color: var(--navy);
}

.report-status[data-tone="loading"] .report-status-icon {
    display: none;
}

.report-icon {
    display: none;
    width: 26px;
    height: 26px;
}

.report-status[data-tone="success"] .report-icon-success,
.report-status[data-tone="error"] .report-icon-error,
.report-status[data-tone="info"] .report-icon-info {
    display: block;
}

.report-status[data-tone="success"] .report-status-icon {
    background: rgba(46,125,50,0.1);
    color: #2e7d32;
}

.report-status[data-tone="error"] .report-status-icon {
    background: rgba(198,40,40,0.1);
    color: #c62828;
}

.report-status[data-tone="info"] .report-status-icon {
    background: var(--orange-pale);
    color: var(--orange);
}

.report-status-title {
    margin-top: 14px;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.report-status-text {
    margin-top: 6px;
    font-size: 0.85rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.report-status-action {
    flex: none;
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 1060px) {
    .hero-left--report {
        display: contents;
    }

        .hero-left--report .hero-thumb-wrap {
            order: 1;
            min-width: 0;
        }

        .hero-left--report ~ .hero-right {
            order: 2;
            min-width: 0;
        }

    .report-card {
        order: 3;
        min-width: 0;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .report-card {
        padding: 16px;
    }

    .report-card-title {
        font-size: 1.15rem;
    }

    .report-card-panel {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .report-doc {
        display: none;
    }

    .report-card-included {
        padding-left: 0;
        border-left: 0;
    }

    .report-card-btn {
        font-size: 0.88rem;
    }

    .report-card-note {
        padding: 0 8px;
    }

    .report-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .report-modal-inner {
        padding: 22px 18px;
    }

    .report-modal-title {
        font-size: 1.2rem;
    }

    .report-actions {
        flex-direction: column;
    }

        .report-actions .report-btn {
            flex: none;
            width: 100%;
        }
}

@media (prefers-reduced-motion: reduce) {
    .report-btn,
    .report-input,
    .report-modal-close {
        transition: none;
    }
}

/* ── HERO LAYOUT WITH THE REPORT CARD ── */
/* The report card makes the left column taller, so the sidebar cards move up beside it. */
.hero-side {
    position: static;
    min-width: 0;
}

@media (min-width: 1061px) {
    .aircraft-hero--report {
        grid-template-rows: auto 1fr;
        row-gap: 24px;
    }

        .aircraft-hero--report > .hero-left {
            grid-row: span 2;
        }
}

@media (max-width: 1060px) {
    .hero-side {
        order: 4;
    }

    /* A sidebar left with a single card uses the full width instead of half of the two-column grid. */
    .detail-sidebar > :only-child {
        grid-column: 1 / -1;
    }
}

@media print {
    .report-card,
    .report-modal,
    .hero-side {
        display: none !important;
    }
}
