/* ============================================================
   Quick Valuation Page
   ============================================================ */

.quick-valuation-content {
    background-color: var(--color-bg, #F7F7F7);
}

/* === Hero Section === */

.valuation-hero {
    background: linear-gradient(135deg, var(--color-primary, #0B3D6B) 0%, #062a4d 100%);
    color: #fff;
    padding: 2.5rem 0;
}

.valuation-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
}

.valuation-hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 540px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
}

/* How It Works */
.how-it-works {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem 1.5rem;
}

.how-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.how-step + .how-step {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--color-accent, #B8860B);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}


/* === Cards === */

.valuation-card {
    background: #fff;
    border-top: 3px solid var(--color-primary, #0B3D6B);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* === Upload Area === */

.upload-area {
    border: 2px dashed var(--color-border, #E0E0E0);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-bg, #F7F7F7);
}

.upload-area:hover,
.upload-area-dragover {
    border-color: var(--color-primary, #0B3D6B);
    background: var(--color-primary-light, #E8F0F8);
}

.upload-area-error {
    border-color: var(--color-error, #B83230) !important;
    background: #fef2f2 !important;
}

/* Image Previews */
.preview-thumb-wrapper {
    position: relative;
    display: inline-block;
}

.preview-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 2px solid var(--color-border, #E0E0E0);
}

.preview-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.65rem;
    text-align: center;
    padding: 1px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Generate Button */
.generate-btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}
.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 61, 107, 0.3);
}

/* === Empty State === */

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--color-border, #E0E0E0);
    display: block;
}


/* === PDF Report === */

.pdf-report {
    background: white;
    width: 100%;
    min-height: 11in;
    padding: 1.5cm;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.pdf-header {
    border-bottom: 2px solid var(--color-accent, #B8860B);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.pdf-title {
    color: var(--color-primary, #0B3D6B);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* Valuation Box */
.valuation-summary-box {
    background: var(--color-primary-light, #E8F0F8);
    border-left: 4px solid var(--color-primary, #0B3D6B);
    padding: 1.25rem 1.5rem;
}

.value-range {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary, #0B3D6B);
}

.confidence-meter {
    height: 8px;
    background-color: #e9ecef;
    overflow: hidden;
}

.confidence-level {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent, #B8860B), var(--color-accent-hover, #966E09));
    transition: width 0.6s ease;
}

/* Market Stats */
.market-stat-box {
    background: var(--color-bg, #F7F7F7);
    border: 1px solid var(--color-border, #E0E0E0);
}

/* Recommendations */
.recommendations-box {
    background: var(--color-accent-light, #FDF6E3);
    border-left: 4px solid var(--color-accent, #B8860B);
    padding: 1rem 1.25rem;
}

/* Specs Table */
.specs-table > div {
    padding: 6px 0;
}
.specs-table > .col-4 + .col-8 {
    border-bottom: 1px solid var(--color-border, #E0E0E0);
}
.specs-table > .col-4:last-of-type + .col-8 {
    border-bottom: none;
}

/* PDF Images */
#pdfImages {
    float: left;
    display: flex;
    justify-content: flex-start;
    padding-right: 10px;
    padding-bottom: 0;
}
#pdfImages img {
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
}
.pdf-image-container:first-child {
    padding-right: 5px;
}


/* === Loading Overlay === */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.loading-overlay-content {
    padding: 2rem;
}

.loading-overlay-spin {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border, #E0E0E0);
    border-top-color: var(--color-primary, #0B3D6B);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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


/* === Page Break Control === */

.no-page-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

table { page-break-inside: avoid; }
tr { page-break-inside: avoid; }


/* === Print Styles === */

@media print {
    body * { visibility: hidden; }
    .pdf-report, .pdf-report * { visibility: visible; }
    .pdf-report {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        min-height: auto;
    }
    .no-print { display: none !important; }
    .valuation-hero { display: none !important; }

    .pdf-report {
        width: 190mm !important;
        min-width: 190mm !important;
        margin: 0 auto;
        box-sizing: border-box;
    }
}


/* === Responsive === */

@media (max-width: 991px) {
    .valuation-hero {
        padding: 2rem 0;
    }
    .valuation-hero-title {
        font-size: 1.6rem;
    }
    .pdf-report {
        min-height: auto;
        padding: 1rem;
    }
    .value-range {
        font-size: 1.4rem;
    }
}

@media (max-width: 575px) {
    .valuation-hero-title {
        font-size: 1.35rem;
    }
    .trust-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
    }
}


/* === Legacy Support (Image Match / Gallery) === */

.tool-card,
.image-match-card {
    background: white;
    border-top: 3px solid var(--color-primary, #0B3D6B);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#imageResultForQuickValuation {
    max-height: 300px;
}

.image-match-results .main-image {
    max-height: 150px;
}

.gallery-items-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.gallery-items-container:after {
    --width: 2;
    --height: 1;
    --ratio: calc(var(--width)/var(--height));
    --row-height: 12em;
    content: "";
    flex-basis: calc(var(--ratio)*var(--row-height));
    flex-grow: 1000000;
}

.antique-item {
    --ratio: calc(var(--width)/var(--height));
    --row-height: 12em;
    flex-basis: calc(var(--ratio)*var(--row-height));
    flex-grow: calc(var(--ratio)*100);
    margin-bottom: 0.75em;
    margin-right: 0.75em;
    position: relative;
}
.antique-item a { cursor: pointer; }
.antique-item img {
    display: block;
    height: 100%;
    max-height: 12em;
    max-width: 100%;
    width: 100%;
    transition: opacity 0.3s ease;
    border: 1px solid var(--color-border, #E0E0E0);
}

.image-match-results {
    padding: 0 var(--margin_left_on_page);
}

.item-overlay-label {
    color: white;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    font-weight: 600;
    opacity: 0.9;
    padding: 5px 10px;
    border: 1px solid white;
    overflow: hidden;
    white-space: nowrap;
}

.f99nDs22XTHDErPs {
    position: absolute;
    display: flex;
    bottom: 10px;
    width: 100%;
    justify-content: center;
}
