/**
 * Path: assets/css/bq-wizard.css
 * Fully scoped styling for the BQ Interactive Schedule & Discovery Wizard.
 * All modal and questionnaire rules are strictly encapsulated under #bq-wizard-modal
 * to prevent collisions with bread-queen-cart, WooCommerce core, and theme layouts.
 */

/* ==========================================================================
   1. MODAL SHELL, OVERLAY & TRANSITIONS (STRICTLY SCOPED)
   ========================================================================== */

#bq-wizard-modal.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#bq-wizard-modal.modal-overlay.active {
    display: flex;
}

#bq-wizard-modal .modal-content.bq-wizard-content {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    font-family: var(--font-body, "Obviously", sans-serif);
    color: #111111;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#bq-wizard-modal .modal-body-scroll {
    padding: 32px 24px;
    overflow-y: auto;
    scrollbar-width: thin;
    box-sizing: border-box;
    flex-grow: 1;
}

#bq-wizard-modal .bq-wiz-step {
    animation: bqWizFadeSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Modal Close Button */
#bq-wizard-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #f25841;
    color: #ffffff !important;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.15s ease, background-color 0.15s ease;
    padding: 0;
    box-shadow: none;
}

#bq-wizard-modal .close-modal:hover {
    background-color: #000000;
    transform: scale(1.05);
}

/* ==========================================================================
   2. DEMOGRAPHIC & STORAGE UI (STEP 1)
   ========================================================================== */

/* Household Stepper */
#bq-wizard-modal .qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    height: 52px;
    padding: 0 8px;
    box-sizing: border-box;
}

#bq-wizard-modal .qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

#bq-wizard-modal .qty-btn:hover {
    background: #f3f4f6;
    color: #111111;
}

#bq-wizard-modal .qty-val {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    color: #111111;
}

/* Freezer Radio Selection Cards */
#bq-wizard-modal .bq-wiz-radio-card {
    display: flex !important;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

#bq-wizard-modal .bq-wiz-radio-card:hover {
    border-color: #d1d5db !important;
    background: #f9fafb;
}

#bq-wizard-modal .bq-wiz-radio-card:has(input:checked) {
    border-color: #f25841 !important;
    background: #fff8f7 !important;
}

#bq-wizard-modal .bq-wiz-radio-card strong {
    text-align: left !important;
    color: #111111;
    font-size: 1rem;
}

#bq-wizard-modal .bq-wiz-radio-card span {
    text-align: left !important;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}

/* ==========================================================================
   3. TASTE PROFILING UI (STEP 2)
   ========================================================================== */

#bq-wizard-modal .bq-taste-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    background-color: #ffffff;
    color: #374151 !important;
    border: 2px solid #e5e7eb;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    padding: 0 16px;
    box-sizing: border-box;
}

#bq-wizard-modal .bq-taste-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

#bq-wizard-modal .bq-taste-btn.active {
    border-color: #f25841 !important;
    background-color: #fff8f7 !important;
    color: #f25841 !important;
    box-shadow: inset 0 0 0 1px #f25841;
}

/* ==========================================================================
   4. RECOMMENDED PRODUCTS & ADD-ONS (STEP 3)
   ========================================================================== */

#bq-wizard-modal .bq-wiz-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed #e5e7eb;
}

#bq-wizard-modal .bq-wiz-product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#bq-wizard-modal .bq-wiz-product-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    flex-shrink: 0;
}

#bq-wizard-modal .bq-wiz-product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#bq-wizard-modal .bq-wiz-product-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111111;
    line-height: 1.2;
    margin-bottom: 4px;
    word-break: break-word;
}

#bq-wizard-modal .bq-wiz-product-desc {
    font-size: 0.85rem;
    color: #6b7280;
}

#bq-wizard-modal .bq-wiz-product-qty-wrap {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    height: 32px;
    overflow: hidden;
    flex-shrink: 0;
}

#bq-wizard-modal .bq-wiz-product-qty-btn {
    width: 28px;
    height: 100%;
    background: none;
    border: none;
    color: #4b5563;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#bq-wizard-modal .bq-wiz-product-qty-btn:hover {
    background: #e5e7eb;
    color: #111111;
}

#bq-wizard-modal .bq-wiz-product-qty-val {
    width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111111;
}

/* Strikethrough & Regular Prices */
#bq-wizard-modal .bq-wiz-price-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#bq-wizard-modal .bq-wiz-price-reg {
    color: #9ca3af;
    font-weight: 500;
    text-decoration: line-through;
    font-size: 0.85rem;
}

#bq-wizard-modal .bq-wiz-price-discount {
    color: #8b7e31;
    font-weight: 700;
    font-size: 0.9rem;
}

#bq-wizard-modal .bq-wiz-price-single {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Smart Add-on Cards */
#bq-wizard-modal .bq-wiz-addon-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#bq-wizard-modal .bq-wiz-addon-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

#bq-wizard-modal .bq-wiz-addon-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#bq-wizard-modal .bq-wiz-addon-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #111111;
    line-height: 1.2;
}

#bq-wizard-modal .bq-wiz-addon-price {
    font-size: 0.8rem;
    color: #8b7e31;
    font-weight: 600;
    margin-top: 2px;
}

#bq-wizard-modal .bq-wiz-addon-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#bq-wizard-modal .bq-wiz-addon-btn:hover {
    background: #f25841;
    color: #ffffff;
    border-color: #f25841;
}

#bq-wizard-modal .bq-wiz-suggested-pill {
    display: inline-block;
    background: #8b7e31;
    color: #f9fafb;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ==========================================================================
   5. PURCHASE OPTIONS (NAMESPACED FOR THE WIZARD ONLY)
   ========================================================================== */

#bq-wizard-modal .bq-wiz-purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#bq-wizard-modal .bq-wiz-purchase-option {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

#bq-wizard-modal .bq-wiz-purchase-option.active {
    border-color: #6b7280;
    background: #f9fafb;
}

#bq-wizard-modal .bq-wiz-purchase-option.active.is-sub {
    border-color: #f25841;
    background: #fff8f7;
}

#bq-wizard-modal .bq-wiz-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#bq-wizard-modal .bq-wiz-option-label-group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #111111;
}

#bq-wizard-modal .bq-wiz-custom-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ffffff;
}

#bq-wizard-modal .bq-wiz-purchase-option.active .bq-wiz-custom-radio {
    border-color: #000000;
}

#bq-wizard-modal .bq-wiz-purchase-option.active.is-sub .bq-wiz-custom-radio {
    border-color: #f25841;
}

#bq-wizard-modal .bq-wiz-purchase-option.active .bq-wiz-custom-radio::after {
    content: "";
    width: 10px;
    height: 10px;
    background: #000000;
    border-radius: 50%;
}

#bq-wizard-modal .bq-wiz-purchase-option.active.is-sub .bq-wiz-custom-radio::after {
    background: #f25841;
}

#bq-wizard-modal .bq-wiz-benefits-list {
    display: none;
}

#bq-wizard-modal .bq-wiz-purchase-option.active .bq-wiz-benefits-list {
    display: block;
    animation: bqWizFadeSlideUp 0.2s ease forwards;
}

#bq-wizard-modal .bq-wiz-badge {
    background: #8b7e31;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

/* ==========================================================================
   6. MODAL BUTTON OVERRIDES & ACTION CONTROLS
   ========================================================================== */

#bq-wizard-modal .btn-primary {
    background-color: #f25841;
    color: #ffffff !important;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 4px 4px 0px 0px #fd8b28;
    transition: all 0.15s ease;
    padding: 14px 24px;
    font-family: var(--font-body, "Obviously", sans-serif);
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    text-decoration: none;
}

#bq-wizard-modal .btn-primary:not(:disabled):hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px #fd8b28;
    background-color: #000000 !important;
}

#bq-wizard-modal .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: translate(4px, 4px);
}

/* ==========================================================================
   7. EXTERNAL TRIGGER BUTTONS & LINKS (STOREFRONT / PRODUCT PAGES)
   ========================================================================== */

.bq-wizard-auto-inject-wrapper {
    box-sizing: border-box;
}

.bq-trigger-wizard.bq-btn-brand-small {
    background-color: #f25841;
    color: #ffffff !important;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 4px 4px 0px 0px #fd8b28;
    transition: all 0.15s ease;
    padding: 12px 20px;
    font-family: var(--font-body, "Obviously", sans-serif);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.bq-trigger-wizard.bq-btn-brand-small:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px #fd8b28;
    background-color: #000000 !important;
}

.bq-wizard-link {
    color: #f25841;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
    font-family: var(--font-body, "Obviously", sans-serif);
    font-size: 0.95rem;
}

.bq-wizard-link:hover {
    color: #000000;
    text-decoration: underline;
}