/**
 * JB Roofing Shingle Color Visualizer Stylesheet
 * Scoped under .jb-shingle-color-visualizer
 * Total size: ~4.5KB (< 1.5KB gzipped)
 */

.jb-shingle-color-visualizer {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1F2937;
}

.jb-visualizer-inner {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}

/* Header */
.jb-visualizer-header {
    text-align: center;
    margin-bottom: 25px;
}

.jb-visualizer-kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #92400E;
    margin-bottom: 8px;
}

.jb-visualizer-title {
    font-size: 32px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.jb-visualizer-subtitle {
    font-size: 16px;
    color: #64748B;
    margin: 0 auto;
    max-width: 650px;
    line-height: 1.5;
}

/* Category Filter Pills */
.jb-visualizer-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.jb-filter-pill {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jb-filter-pill:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.jb-filter-pill.is-active {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
}

/* 2-Column Stage Grid */
.jb-visualizer-stage-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 35px;
}

/* Preview Card & SVG */
.jb-visualizer-preview-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.jb-preview-canvas-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

.jb-omaha-home-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Roof Plane Dynamic Color Transitions */
.roof-plane {
    transition: fill 0.3s ease-in-out;
}

/* Container-level Swatch Active Classes (Zero-reload CSS Switching) */
.swatch-active-weathered-wood .roof-plane { fill: url(#pat-weathered-wood); }
.swatch-active-charcoal-black .roof-plane { fill: url(#pat-charcoal-black); }
.swatch-active-pewter-gray .roof-plane { fill: url(#pat-pewter-gray); }
.swatch-active-barkwood .roof-plane { fill: url(#pat-barkwood); }
.swatch-active-slate-black .roof-plane { fill: url(#pat-slate-black); }
.swatch-active-european-variblend .roof-plane { fill: url(#pat-european-variblend); }
.swatch-active-aged-cedar .roof-plane { fill: url(#pat-aged-cedar); }

/* Live Preview Watermark Tag */
.jb-preview-active-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.active-tag-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #FFFFFF;
    display: inline-block;
}

.active-tag-series {
    color: #D4AF37;
    font-weight: 400;
    font-size: 12px;
}

/* Controls & Swatch Palette */
.jb-visualizer-controls-card {
    display: flex;
    flex-direction: column;
}

.jb-controls-heading {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 6px 0;
}

.jb-controls-subtext {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 18px 0;
}

/* Swatch Grid */
.jb-visualizer-swatches {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.swatch-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFC;
    color: #0F172A !important;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.swatch-btn:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
    transform: translateY(-1px);
}

.swatch-btn:focus-visible {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.swatch-btn.is-active {
    border-color: #D4AF37;
    background: #FFFDF7;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.4), 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.swatch-color-pill {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.swatch-text-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.swatch-title {
    font-size: 13.5px;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swatch-badge {
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
}

.architectural-badge {
    color: #4B5563;
}

.davinci-badge {
    color: #B45309;
    font-weight: 600;
}

/* Active Blend Details Box */
.jb-visualizer-details-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 18px 20px;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

.details-header {
    margin-bottom: 8px;
}

.details-category-tag {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #92400E;
    display: block;
    margin-bottom: 2px;
}

.details-swatch-name {
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.details-description {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.details-specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #1E293B;
}

.spec-chip svg {
    width: 14px;
    height: 14px;
    color: #16A34A;
}

/* High-Conversion Sample Board Delivery CTA Box */
.jb-visualizer-cta-container {
    background-color: #0F172A !important;
    background-image: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    border-radius: 10px;
    padding: 28px 32px;
    color: #FFFFFF;
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.2);
}

.jb-cta-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 30px;
    align-items: center;
}

.jb-cta-eyebrow {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #D4AF37;
    margin-bottom: 6px;
}

.jb-cta-heading {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.jb-cta-paragraph {
    font-size: 14px;
    color: #CBD5E1;
    margin: 0;
    line-height: 1.55;
}

.jb-cta-button-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.jb-sample-board-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #D4AF37;
    color: #0F172A !important;
    text-decoration: none !important;
    font-size: 15.5px;
    font-weight: 800;
    padding: 15px 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    transition: all 0.2s ease;
}

.jb-sample-board-btn:hover {
    background: #E5C358;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-subtext {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 8px;
    font-weight: 500;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

@media (max-width: 991px) {
    .jb-visualizer-stage-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .jb-cta-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .jb-cta-button-col {
        align-items: center;
    }
}

@media (max-width: 640px) {
    .jb-visualizer-inner {
        padding: 25px 15px;
    }
    .jb-visualizer-title {
        font-size: 24px;
    }
    .jb-visualizer-swatches {
        grid-template-columns: 1fr;
    }
    .jb-sample-board-btn {
        font-size: 14px;
        padding: 13px 18px;
    }
    .jb-cta-heading {
        font-size: 19px;
    }
}
