/**
 * Question Wizard CSS Styles
 * 
 * Styles for the interactive question wizard with animations,
 * progress bar, and navigation controls.
 * 
 * @version 1.0.0
 * @date 2026-01-18
 */

/* ========================================
   WIZARD CONTAINER
   ======================================== */

.wizard-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: visible;
}

.wizard-container::before {
    display: none;
}

/* ========================================
   INTRO & OUTRO TEXT
   ======================================== */

.wizard-intro,
.wizard-outro {
    margin: 0 0 8px 0;
    padding: 8px 10px;
    background: rgba(0, 160, 220, 0.06);
    border-radius: 6px;
    border-left: 3px solid #00a0dc;
}

.wizard-intro p,
.wizard-outro p {
    margin: 0;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.4;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.wizard-progress-container {
    margin: 0 0 8px 0;
}

.wizard-progress-bar {
    height: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a0dc, #00d4aa);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-progress-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* ========================================
   QUESTIONS WRAPPER & SLIDES
   ======================================== */

.wizard-questions-wrapper {
    position: relative;
    min-height: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
}

.wizard-question-slide {
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Slide Animations */
.wizard-question-slide.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

.wizard-question-slide.slide-in-left {
    animation: slideInLeft 0.3s ease forwards;
}

.wizard-question-slide.slide-out-left {
    animation: slideOutLeft 0.3s ease forwards;
}

.wizard-question-slide.slide-out-right {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ========================================
   QUESTION BOX
   ======================================== */

.wizard-question-box {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 6px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 150, 200, 0.12);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-question-box.optional {
    border-color: rgba(150, 150, 150, 0.3);
    background: rgba(250, 250, 250, 1);
}

.wizard-question-number {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #00a0dc, #0080b0);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.wizard-question-box.optional .wizard-question-number {
    background: linear-gradient(135deg, #888, #666);
}

.wizard-question-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    color: #0c4a6e;
    padding: 0;
}

.wizard-optional-badge {
    position: absolute;
    top: -8px;
    right: 16px;
    background: #888;
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   INPUT FIELD
   ======================================== */

.wizard-input-container {
    margin: 0 0 6px 0;
}

.wizard-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.3;
    border: 1px solid rgba(0, 150, 200, 0.2);
    border-radius: 6px;
    background: #fff;
    resize: vertical;
    min-height: 50px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.wizard-input:focus {
    outline: none;
    border-color: #00a0dc;
    box-shadow: 0 0 0 2px rgba(0, 160, 220, 0.1);
}

.wizard-input::placeholder {
    color: #999;
}

/* ========================================
   NAVIGATION BUTTONS
   ======================================== */

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.wizard-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wizard-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-btn-back {
    background: #f0f0f0;
    color: #555;
}

.wizard-btn-back:hover:not(:disabled) {
    background: #e0e0e0;
}

.wizard-btn-skip {
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
}

.wizard-btn-skip:hover:not(:disabled) {
    background: #f5f5f5;
    color: #666;
}

.wizard-btn-next {
    background: linear-gradient(135deg, #00a0dc, #0080b0);
    color: #fff;
    margin-left: auto;
}

.wizard-btn-next:hover:not(:disabled) {
    background: linear-gradient(135deg, #0090cc, #0070a0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 160, 220, 0.3);
}

.wizard-btn-submit {
    background: linear-gradient(135deg, #00d4aa, #00b090);
}

.wizard-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #00c49a, #00a080);
    box-shadow: 0 4px 12px rgba(0, 200, 160, 0.3);
}

/* ========================================
   LOADING & ERROR STATES
   ======================================== */

.wizard-loading,
.wizard-error {
    text-align: center;
    padding: 40px 20px;
}

.wizard-loading p,
.wizard-error p {
    margin: 16px 0 0;
    font-size: 15px;
    color: #666;
}

.wizard-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 160, 220, 0.2);
    border-top-color: #00a0dc;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

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

.wizard-error p {
    color: #c00;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 600px) {
    .wizard-container {
        padding: 16px;
        margin: 12px 0;
    }

    .wizard-question-box {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .wizard-question-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .wizard-question-text {
        font-size: 15px;
        padding-top: 0;
    }

    .wizard-buttons {
        flex-direction: column;
    }

    .wizard-btn {
        width: 100%;
        justify-content: center;
    }

    .wizard-btn-next {
        margin-left: 0;
        order: -1;
    }

    .wizard-btn-skip {
        order: 0;
    }

    .wizard-btn-back {
        order: 1;
    }
}

/* ========================================
   PRODUCT RECOMMENDATION CTA
   ======================================== */

.product-recommendation-cta {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 160, 220, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(0, 200, 160, 0.3);
    text-align: center;
}

.product-recommendation-cta a {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #00d4aa, #00b090);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.product-recommendation-cta a:hover {
    background: linear-gradient(135deg, #00c49a, #00a080);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 160, 0.35);
}