/* Avebelle Quiz Styles */

/* Font Families */
h1, h2, h3, h4, h5, h6,
.quiz-heading,
.results-section-title {
    font-family: "Prata", Sans-serif;
}

body,
button,
input,
select,
textarea,
p,
.quiz-description,
.quiz-btn,
.quiz-option-btn,
.quiz-checkbox label,
.product-card-title,
.product-card-description {
    font-family: "Karla", Sans-serif;
}

#primary, .avebelle-quiz-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

body {
    background-color: #fff !important;
}

/* Step Indicator */
.quiz-step-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.step-item {
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    background-color: #e5e9fa;
    color: #666;
    transition: all 0.3s ease;
}

.step-item.active {
    background-color: var(--e-global-color-primary);
    color: #fff;
    transform: scale(1.1);
}

.step-item.completed {
    background-color: var(--e-global-color-primary);
    color: #fff;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.quiz-step.active {
    display: block;
}

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

.quiz-content {
    background: #f7f8fa;
    padding: 30px;
    transition: opacity 0.3s, transform 0.3s;
    border-radius: 0;
    box-shadow: none;
    max-width: 500px;
    margin: auto;
}

h2.quiz-heading {
    font-size: 24px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    margin-bottom: 16px;
    line-height: normal;
}

.quiz-subtitle {
    font-size: 18px;
    color: var(--e-global-color-primary);
    margin-bottom: 10px;
    font-weight: 500;
}

p.quiz-description {
    font-size: 18px;
    color: #000;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Buttons */
.quiz-btn {
    padding: 10px 20px !important;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.quiz-btn-primary {
    background-color: var(--e-global-color-primary);
    color: #fff;
}

.quiz-btn-primary:hover {
    opacity: 1;
    transform: none;
    box-shadow: none;
}

.quiz-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    margin: 10px 0;
}

.quiz-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    margin-right: 12px;
}

.quiz-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Options */
.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 0;
}

.quiz-option-btn {
    margin: 0;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quiz-option-btn:hover {
    border-color: var(--e-global-color-primary);
    background-color: #f8f9fb;
    transform: unset;
}

.quiz-option-btn:hover div {
    color: #fff;
}

.quiz-options button div {
    line-height: normal;
    transition: 0.5s;
}

.quiz-option-btn.selected {
    border-color: var(--e-global-color-primary);
    background-color: var(--e-global-color-primary);
    color: #fff;
}

.quiz-option-btn.selected .quiz-option-description {
    color: #fff;
}

.quiz-option-description {
    font-size: 14px;
    margin: 0;
    line-height: normal;
    font-weight: 500;
    color: var(--e-global-color-primary);
}

/* Multi-select options */
.quiz-options-multi .quiz-option-btn {
    position: relative;
}

.quiz-options-multi .quiz-option-btn.selected::after {
    content: "✓";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.quiz-options-multi .quiz-option-btn.selected:hover::after, 
.quiz-options-multi .quiz-option-btn.selected:focus::after {
    color: #fff;
}

.quiz-options-multi .quiz-option-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quiz-options-multi .quiz-option-btn:disabled:hover {
    border-color: #e0e0e0;
    background: #fff;
    transform: none;
}

.quiz-options-multi .quiz-option-btn:disabled:hover div {
    color: var(--e-global-color-primary);
}

/* Next button for multi-select */
.quiz-next-btn {
    width: max-content;
    margin-top: 16px;
    font-size: 16px;
}

/* Back button */
.quiz-back-btn {
    margin-top: 20px;
    padding: 10px 20px !important;
    font-size: 14px;
    color: #666;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.quiz-back-btn:hover {
    color: var(--e-global-color-primary);
}

/* Email form */
.quiz-email-form {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quiz-email-form .quiz-email-input {
    width: 100%;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    border: 1px solid #666;
    transition: border-color 0.3s ease;
    background: #fff;
    max-width: 600px;
}


.quiz-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 10px 0;
}

.quiz-checkbox input[type="checkbox"] {
    margin: 0;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.quiz-checkbox label {
    font-size: 16px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    line-height: 1.5;
    cursor: pointer;
    text-align: left;
}

a#skip-results {
    display: inline-block;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--e-global-color-primary);
    text-decoration: underline;
    cursor: pointer;
}

a#skip-results:hover {
    color: var(--e-global-color-primary);
}

/* Results page specific */
.quiz-step.quiz-results-step.active h2.quiz-heading {
    text-align: left;
}

.quiz-step.quiz-results-step .quiz-content {
    max-width: 100%;
}

/* Product Cards */
.product-card {
    background: #f7f8fa;
    border-radius: 8px;
    overflow: hidden;
    transition: none;
    display: flex;
    flex-direction: column;
}

/* Results */
.quiz-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.quiz-results-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

.quiz-results-actions button {
    margin: 0;
    font-size: 16px;
}

.quiz-results-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.results-section {
    margin-bottom: 40px;
}

.results-section .results-section-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    color: var(--e-global-color-primary);
    margin-bottom: 12px;
}

.results-section-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: left;
}

.results-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.empty-state p {
    font-size: 16px;
    font-weight: 4000;
    color: var(--e-global-color-primary);
    margin: 0;
    line-height: 1.6;
}


.product-card:hover {
    box-shadow: none;
    transform: none;
}

.product-card-image {
    width: 100%;
    object-fit: cover;
}

.product-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 10px 0;
}

.product-card-content .product-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    line-height: normal;
    margin-bottom: 8px;
    font-family: "Prata", sans-serif;
}

.product-card-category {
    font-size: 14px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 7px 0;
    font-family: "Karla", sans-serif;
    font-weight: 500;
}

.product-card-price {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 16px;
    font-family: "Karla", sans-serif;
}

.product-card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.product-card-link {
    display: inline-block;
    margin-top: auto;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--e-global-color-primary);
    border-radius: 99px;
    border: 1px solid var(--e-global-color-primary);
}

.product-card-link:hover {
    background: #f7f8fa;
    color: var(--e-global-color-primary);
}

/* Loading */
.quiz-loading {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    font-size: 16px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--e-global-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-error {
    text-align: center;
    padding: 40px;
    color: #d32f2f;
    font-size: 16px;
}

.quiz-error p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .avebelle-quiz-wrapper {
        padding: 20px 16px;
    }
    
    .quiz-content {
        padding: 24px;
    }
    
    .quiz-heading {
        font-size: 24px;
    }
    
    .quiz-step-indicator {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .step-item {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .quiz-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quiz-results-actions {
        width: 100%;
        /* flex-direction: column; */
    }
    
    .quiz-btn-secondary {
        margin-right: 0;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .quiz-btn {
        width: 100%;
        padding: 14px 24px;
    }
    
    .quiz-option-btn {
        padding: 16px 20px;
    }
    
    .quiz-step-indicator {
        gap: 8px;
    }
    
    .step-item {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
