/**
 * Quiz Styles
 * @package WeGrowMagic
 */

/* ==========================================================================
   Quiz Landing Page
   ========================================================================== */

.wgm-quiz-page .wgm-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.wgm-quiz-landing {
    width: 100%;
    min-height: 758px;
    position: relative;
    overflow: hidden;
    background: white;
    padding: 0;
    margin: 0;
}

.wgm-quiz-landing__container {
    width: 1439px;
    max-width: 100%;
    height: 758px;
    position: relative;
    margin: 0 auto;
    background: white;
    overflow: hidden;
}

.wgm-quiz-landing__image {
    width: 720px;
    height: 758px;
    left: 719px;
    top: 0px;
    position: absolute;
    z-index: 0;
}

.wgm-quiz-landing__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wgm-quiz-landing__placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.wgm-quiz-landing__content {
    width: 599px;
    left: 76px;
    top: 115px;
    position: absolute;
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 32px;
    z-index: 2;
}

.wgm-quiz-landing__title {
    align-self: stretch;
    color: black;
    font-size: 64px;
    font-family: 'ITC Clearface Std', serif;
    font-weight: 550;
    line-height: 64px;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz-landing__description {
    width: 584px;
    color: black;
    font-size: 20px;
    font-family: 'General Sans';
    font-weight: 500;
    line-height: 24px;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz-landing__disclaimer {
    width: 584px;
    color: black;
    font-size: 16px;
    font-family: 'General Sans';
    font-style: italic;
    font-weight: 500;
    line-height: 19.20px;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz-landing__button {
    height: 42px;
    padding: 8.01px 13.34px;
    background: #12679C;
    overflow: hidden;
    border-radius: 6.67px;
    outline: 0.67px white solid;
    outline-offset: -0.67px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 20.02px;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 13.34px;
    font-family: 'General Sans';
    font-weight: 500;
    line-height: 16.01px;
    word-wrap: break-word;
    transition: background 0.2s, transform 0.2s;
}

.wgm-quiz-landing__button:hover {
    background: #0d4d6f;
    transform: translateY(-1px);
}

/* Responsive Styles for Quiz Landing */
@media (max-width: 1440px) {
    .wgm-quiz-landing__container {
        width: 100%;
        height: auto;
        min-height: 758px;
    }
    
    .wgm-quiz-landing__content {
        left: 5%;
        width: 45%;
        max-width: 599px;
        text-align: left;
    }
    
    .wgm-quiz-landing__image {
        left: 50%;
        width: 50%;
        height: 758px;
    }
    
    .wgm-quiz-landing__description,
    .wgm-quiz-landing__disclaimer {
        width: 100%;
    }
}



@media (max-width: 768px) {
    .wgm-quiz-landing {
        min-height: auto;
    }
    
    .wgm-quiz-landing__container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .wgm-quiz-landing__content {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 100%;
        padding: 40px 20px;
        background: white;
        order: 2;
    }
    
    .wgm-quiz-landing__title {
        font-size: 48px;
        line-height: 44px;
        color: black;
    }
    
    .wgm-quiz-landing__description {
        width: 100%;
        font-size: 18px;
        line-height: 20px;
        color: black;
    }
    
    .wgm-quiz-landing__disclaimer {
        width: 100%;
        font-size: 14px;
        color: black;
    }
    
    .wgm-quiz-landing__image {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: 400px;
        order: 1;
    }
}

/* ==========================================================================
   Quiz Container
   ========================================================================== */

.wgm-quiz-container {
    width: 100%;
    min-height: 650px;
    padding: 0;
    background: white;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wgm-quiz {
    width: 1439px;
    max-width: 100%;
    height: 682px;
    position: relative;
    background: white;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
}

/* Progress Bar */
.wgm-quiz__progress {
    width: 202px;
    left: 440px;
    top: 107px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 17px;
    z-index: 1;
}

.wgm-quiz__progress-text {
    align-self: stretch;
    color: black;
    font-size: 14px;
    font-family: 'General Sans';
    font-weight: 500;
    text-transform: uppercase;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz__progress-bar {
    width: 202px;
    height: 8px;
    background: #E8EDF2;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.wgm-quiz__progress-fill {
    height: 8px;
    background: #0A4280;
    border-radius: 2px;
    transition: width 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
}

/* Question Container */
.wgm-quiz__question-container {
    width: 559px;
    left: 440px;
    top: 188px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
    z-index: 1;
}

/* Question */
.wgm-quiz__question {
    color: black;
    font-size: 30px;
    font-family: 'ITC Clearface Std', serif;
    font-weight: 550;
    text-transform: capitalize;
    line-height: 30px;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz__subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 32px;
}

/* Options */
.wgm-quiz__options {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
}

.wgm-quiz__option {
    align-self: stretch;
    height: 42px;
    padding: 8.01px 13.34px;
    background: white;
    overflow: hidden;
    border-radius: 6.67px;
    outline: 0.67px black solid;
    outline-offset: -0.67px;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20.02px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    position: relative;
}

.wgm-quiz__option:hover {
    outline-color: #12679C;
}

.wgm-quiz__option.selected {
    outline-color: #12679C;
    background: #f0f7ff;
}

.wgm-quiz__option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wgm-quiz__option img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.wgm-quiz__option-text {
    flex: 1 1 0;
    color: black;
    font-size: 13.34px;
    font-family: 'General Sans';
    font-weight: 500;
    line-height: 16.01px;
    word-wrap: break-word;
    margin: 0;
}

.wgm-quiz__option-desc {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* Scale Options */
.wgm-quiz__options--scale {
    text-align: center;
}

.wgm-quiz__scale {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.wgm-quiz__scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.wgm-quiz__scale-option input {
    position: absolute;
    opacity: 0;
}

.wgm-quiz__scale-option span {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    font-weight: 600;
    transition: all 0.2s;
}

.wgm-quiz__scale-option:hover span {
    border-color: #9ca3af;
}

.wgm-quiz__scale-option input:checked + span {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.wgm-quiz__scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6b7280;
}

/* Navigation */
.wgm-quiz__navigation {
    width: 559px;
    left: 440px;
    top: 562px;
    position: absolute;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    z-index: 1;
}

.wgm-quiz__btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wgm-quiz__btn--prev {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #374151;
}

.wgm-quiz__btn--prev:hover:not(:disabled) {
    border-color: #9ca3af;
}

.wgm-quiz__btn--prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wgm-quiz__btn--next {
    background: #111827;
    border: none;
    color: white;
    margin-left: auto;
}

.wgm-quiz__btn--next:hover:not(:disabled) {
    background: #374151;
}

.wgm-quiz__btn--next:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Loading */
.wgm-quiz__loading {
    text-align: center;
    padding: 80px 20px;
}

.wgm-quiz__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #10b981;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.wgm-quiz__loading p {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Error */
.wgm-quiz__error {
    text-align: center;
    padding: 60px 20px;
    background: #fef2f2;
    border-radius: 12px;
}

.wgm-quiz__error p {
    color: #dc2626;
    margin-bottom: 20px;
}

/* ==========================================================================
   Quiz Popup
   ========================================================================== */

.wgm-quiz-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wgm-quiz-popup {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.wgm-quiz-popup__emoji {
    font-size: 64px;
    margin-bottom: 20px;
}

.wgm-quiz-popup h3 {
    font-size: 28px;
    font-family: 'ITC Clearface Std', serif;
    font-weight: 550;
    color: black;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.3;
}

.wgm-quiz-popup h3:first-child {
    margin-top: 0;
}

.wgm-quiz-popup strong,
.wgm-quiz-popup b {
    font-family: 'ITC Clearface Std', serif;
    font-weight: 550;
}

.wgm-quiz-popup p,
.wgm-quiz-popup__text {
    font-size: 18px;
    font-family: 'ITC Clearface Std';
    color: #000000;
    margin: 0 0 32px 0;
    padding: 0;
    line-height: 1.6;
}

.wgm-quiz-popup p:last-child,
.wgm-quiz-popup__text:last-child {
    margin-bottom: 32px;
}

.wgm-quiz-popup__button {
    background: #12679C;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 18px;
    font-family: var(--wgm-font-body, 'General Sans', sans-serif);
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.wgm-quiz-popup__button:hover {
    background: #0d4d73;
}

.wgm-quiz-popup__button--primary {
    background: #12679C;
    color: white;
}

.wgm-quiz-popup__button--primary:hover {
    background: #0d4d73;
}

.wgm-quiz-popup__button--skip {
    background: transparent;
    color: #12679C;
    border: 2px solid #12679C;
}

.wgm-quiz-popup__button--skip:hover {
    background: #f0f8ff;
}

.wgm-quiz-popup__results-text {
    margin-top: 16px;
    font-size: 16px;
    color: #666;
    font-family: 'General Sans', sans-serif;
    line-height: 1.5;
}

.wgm-quiz-popup__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.wgm-quiz-popup__email-field {
    margin: 24px 0 32px 0;
    text-align: left;
}

.wgm-quiz-popup__email-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'General Sans', sans-serif;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #1a1a1a;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wgm-quiz-popup__email-input:focus {
    outline: none;
    border-color: #12679C;
}

.wgm-quiz-popup__email-input::placeholder {
    color: #9ca3af;
}

.wgm-quiz-popup__email-error {
    color: #ef4444;
    font-size: 14px;
    font-family: 'General Sans', sans-serif;
    margin-top: 8px;
    text-align: left;
}

/* ==========================================================================
   Quiz Result
   ========================================================================== */

.wgm-quiz__result {
    text-align: center;
}

.wgm-quiz__result-header {
    margin-bottom: 40px;
}

.wgm-quiz__result-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wgm-quiz__result-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

.wgm-quiz__result-product {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.wgm-quiz__result-product img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

.wgm-quiz__result-product h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wgm-quiz__result-product p {
    color: #4b5563;
    margin-bottom: 16px;
}

.wgm-quiz__match {
    display: inline-block;
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border-radius: 50px;
    font-weight: 600;
}

.wgm-quiz__result-benefits {
    text-align: left;
    background: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.wgm-quiz__result-benefits h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.wgm-quiz__result-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wgm-quiz__result-benefits li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
}

.wgm-quiz__result-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.wgm-quiz__result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Quiz Landing Page
   ========================================================================== */

.wgm-quiz-landing {
    text-align: center;
    padding: 0px 0px;
    width: 100%;
    margin: 0 auto;
}

.wgm-quiz-landing__icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.wgm-quiz-landing__title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.wgm-quiz-landing__desc {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.6;
}

.wgm-quiz-landing__features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.wgm-quiz-landing__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.wgm-quiz-landing__feature span:first-child {
    font-size: 1.25rem;
}

.wgm-quiz-landing__start {
    padding: 16px 48px;
    font-size: 1.125rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1440px) {

    
    .wgm-quiz__progress {
        left: 5%;
        width: 90%;
        max-width: 202px;
    }
    
    .wgm-quiz__question-container {
        left: 5%;
        width: 90%;
        max-width: 559px;
        top: 188px;
    }
    
    .wgm-quiz__navigation {
        left: 5%;
        width: 90%;
        max-width: 559px;
        position: relative;
        margin-top: 40px;
    }
}

@media (max-width: 640px) {
    .wgm-quiz {
        height: auto;
        min-height: auto;
        padding: 40px 20px;
    }
    
    .wgm-quiz__progress {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .wgm-quiz__question-container {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .wgm-quiz__question {
        font-size: 24px;
        line-height: 28px;
    }
    
    .wgm-quiz__option {
        padding: 12px 16px;
        height: auto;
        min-height: 42px;
    }
    
    .wgm-quiz__scale {
        gap: 8px;
    }
    
    .wgm-quiz__scale-option span {
        width: 40px;
        height: 40px;
    }
    
    .wgm-quiz__navigation {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        margin-top: 30px;
        flex-direction: column-reverse;
    }
    
    .wgm-quiz__btn {
        width: 100%;
    }
    
    .wgm-quiz__btn--next {
        margin-left: 0;
    }
    
    .wgm-quiz-landing__title {
        font-size: 40px;

    }
    
    .wgm-quiz-landing__features {
        flex-direction: column;
        gap: 12px;
    }
    .wgm-quiz-landing__image img{
        border-radius: 0 0 12px 12px;

    }
}