/* ==========================================================================
   YJUK Wizard Styles
   Luxury minimalist design: Bellefair headings, Roboto body, black/white palette
   All selectors namespaced with .yjuk-wizard to avoid theme conflicts
   ========================================================================== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bellefair&family=Roboto:wght@300;400;500&display=swap');

/* -------------------------------------------------------------------------
   Container
   ------------------------------------------------------------------------- */
.yjuk-wizard {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------
   Progress Bar
   ------------------------------------------------------------------------- */
.yjuk-wizard-progress {
    width: 100%;
    height: 4px;
    background: #e5e5e5;
    margin-bottom: 48px;
    border-radius: 2px;
    overflow: hidden;
}

.yjuk-wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a 0%, #444 100%);
    width: 0%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------------------
   Step Container
   ------------------------------------------------------------------------- */
.yjuk-wizard-step {
    animation: yjukFadeIn 0.4s ease-out;
}

.yjuk-wizard-step[data-step="analyzing"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

@keyframes yjukFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------------------------------------
   Back Button
   ------------------------------------------------------------------------- */
.yjuk-wizard-back {
    display: inline-block;
    background: none;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.yjuk-wizard-back:hover {
    color: #1a1a1a;
}

/* -------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------- */
.yjuk-wizard-question {
    font-family: 'Bellefair', serif;
    font-size: 40px;
    font-weight: 400;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.yjuk-wizard-subtitle {
    font-size: 19px;
    color: #777;
    margin: 0 0 36px;
    font-weight: 300;
    line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Option Buttons
   ------------------------------------------------------------------------- */
.yjuk-wizard-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yjuk-wizard-options--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.yjuk-wizard-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
}

.yjuk-wizard-option:hover {
    border-color: #1a1a1a;
    background: #fafafa;
}

.yjuk-wizard-option:active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.yjuk-wizard-option:active .yjuk-wizard-option-desc {
    color: rgba(255, 255, 255, 0.7);
}

.yjuk-wizard-option-label {
    font-family: 'Bellefair', serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.yjuk-wizard-option-desc {
    font-size: 16px;
    color: #999;
    margin-top: 4px;
    font-weight: 300;
    transition: color 0.2s ease;
}

/* Budget options */
.yjuk-wizard-options--budget .yjuk-wizard-option {
    text-align: center;
    align-items: center;
}

/* -------------------------------------------------------------------------
   Thinking Dots / Analyzing
   ------------------------------------------------------------------------- */
.yjuk-wizard-analyzing {
    text-align: center;
    padding: 60px 0;
}

.yjuk-wizard-thinking-dots {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 20px;
}

.yjuk-wizard-thinking-dots span {
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    animation: yjukDotPulse 1.4s infinite ease-in-out both;
}

.yjuk-wizard-thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.yjuk-wizard-thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes yjukDotPulse {
    0%, 80%, 100% {
        transform: scale(0.4);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.yjuk-wizard-analyzing-text {
    font-size: 18px;
    color: #888;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin: 0;
    transition: opacity 0.3s ease;
}

/* -------------------------------------------------------------------------
   Results — Uses native WooCommerce/Shoptimizer/CommerceKit product cards.
   Only the match badge, reason text, and grid container are custom.
   ------------------------------------------------------------------------- */
.yjuk-wizard-results-header {
    margin-bottom: 32px;
}

.yjuk-wizard-results-grid {
    margin-bottom: 40px;
}

/* Native WooCommerce product grid inherits Shoptimizer layout.
   Widen the wizard container for results so 3-column grid has room. */
.yjuk-wizard-step[data-step="results"] {
    max-width: none;
}

/* Match % Badge — positioned inside each native product card <li> */
.yjuk-wizard-results-grid li.product {
    position: relative;
}

.yjuk-wizard-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1a1a1a;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    z-index: 3;
    pointer-events: none;
}

/* Reason text — appended inside each product card */
.yjuk-wizard-card-reason {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #888;
    font-weight: 300;
    font-style: italic;
    margin: 8px 0 0;
    padding: 0 12px 12px;
    line-height: 1.4;
}

/* Price font in product cards — match YJUK brand */
.yjuk-wizard-results-grid .price {
    font-family: 'Bellefair', serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
}

/* -------------------------------------------------------------------------
   Start Over
   ------------------------------------------------------------------------- */
.yjuk-wizard-results-actions {
    text-align: center;
    padding-top: 8px;
}

.yjuk-wizard-restart {
    background: none;
    border: 1px solid #ccc;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #555;
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yjuk-wizard-restart:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* -------------------------------------------------------------------------
   Floating Button
   ------------------------------------------------------------------------- */
.yjuk-wizard-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yjuk-wizard-float-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* Floating button position variants */
.yjuk-wizard-float-btn--bottom-left {
    right: auto;
    left: 28px;
}

.yjuk-wizard-float-btn--bottom-center {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.yjuk-wizard-float-btn--bottom-center:hover {
    transform: translateX(-50%) scale(1.05);
}

.yjuk-wizard-float-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* -------------------------------------------------------------------------
   Modal Overlay
   ------------------------------------------------------------------------- */
.yjuk-wizard-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.yjuk-wizard-modal-overlay.yjuk-wizard-modal--active {
    opacity: 1;
    visibility: visible;
}

.yjuk-wizard-modal {
    background: #fff;
    width: 90%;
    max-width: 840px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.yjuk-wizard-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    z-index: 1;
    transition: color 0.2s ease;
}

.yjuk-wizard-modal-close:hover {
    color: #1a1a1a;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .yjuk-wizard {
        padding: 16px 16px 24px;
    }

    .yjuk-wizard-question {
        font-size: 33px;
    }

    .yjuk-wizard-progress {
        margin-bottom: 32px;
    }

    .yjuk-wizard-options--grid {
        grid-template-columns: 1fr;
    }

    /* Modal full-screen on mobile */
    .yjuk-wizard-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        box-shadow: none;
    }
}
