/* Quiz Container */
.quiz-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #e9ecef;
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1d1d1f 0%, #4a4a4a 100%);
    transition: width 0.4s ease;
    width: 33.33%;
}

/* Logo */
.quiz-logo {
    text-align: center;
    padding: 30px 0 20px;
}

.quiz-logo img {
    max-width: 150px;
}

/* Quiz Form */
.quiz-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Quiz Steps */
.quiz-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question */
.quiz-question {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
}

.quiz-subtitle {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 40px;
}

/* Quiz Options */
.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.quiz-option {
    position: relative;
    cursor: pointer;
}

.quiz-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 120px;
}

.option-content:hover {
    border-color: #1d1d1f;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quiz-option input[type="radio"]:checked + .option-content {
    border-color: #1d1d1f;
    background: #f8f9fa;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.option-icon {
    flex-shrink: 0;
}

.option-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.option-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.option-text p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* Quiz Inputs */
.quiz-inputs {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 25px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-size: 0.95rem;
    width: 100%;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #1d1d1f;
    box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.1);
}

.input-group small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.9rem;
    color: #495057;
}

/* Buttons */
.quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.quiz-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    color: white;
}

.quiz-btn:active {
    transform: translateY(0);
}

.quiz-btn-next,
.quiz-btn-submit {
    width: 100%;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
}

.quiz-btn-back {
    background: transparent;
    color: #1d1d1f;
    border: 2px solid #1d1d1f;
}

.quiz-btn-back:hover {
    background: #1d1d1f;
    color: white;
}

.quiz-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Thank You Page */
.thank-you {
    background: white;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.thank-you-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.thank-you-content {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.thank-you-content p {
    margin-bottom: 15px;
}

.thank-you-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.thank-you-content ul li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.thank-you-content ul li:last-child {
    border-bottom: none;
}

.thank-you-content ul li i {
    color: #28a745;
    margin-right: 10px;
}

.contact-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #1d1d1f;
}

.contact-info i {
    color: #1d1d1f;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-question {
        font-size: 1.5rem;
    }

    .quiz-subtitle {
        font-size: 0.9rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .option-content {
        padding: 20px;
    }

    .quiz-inputs {
        padding: 20px;
    }

    .quiz-buttons {
        flex-direction: column;
    }

    .quiz-btn-back {
        order: 2;
    }

    .quiz-btn-next,
    .quiz-btn-submit {
        order: 1;
        max-width: 100%;
    }

    .thank-you {
        padding: 30px 20px;
    }
}

/* Loading State */
.quiz-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.quiz-btn.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.input-group.error input,
.input-group.error select,
.input-group.error textarea {
    border-color: #dc3545;
}

.input-group.error .error-message {
    display: block;
}

/* reCAPTCHA Container */
#recaptcha-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    clear: both;
    width: 100%;
}

/* Phone Verification Button Styles */
.phone-verification {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.phone-verification input {
    flex: 1;
}

.country-code-select {
    padding: 12px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 110px;
    max-width: 130px;
    flex-shrink: 0;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d1d1f' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.country-code-select:hover {
    border-color: #1d1d1f;
}

.country-code-select:focus {
    outline: none;
    border-color: #1d1d1f;
    box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.1);
}

.verification-input {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.verification-input input {
    flex: 1;
}

.btn-send-code,
.btn-verify-code {
    padding: 12px 24px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    min-width: 160px;
}

.btn-send-code:hover:not(:disabled),
.btn-verify-code:hover:not(:disabled) {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-send-code:active:not(:disabled),
.btn-verify-code:active:not(:disabled) {
    transform: translateY(0);
}

.btn-send-code:disabled,
.btn-verify-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-verify-code:disabled {
    background: #28a745;
}

.success-message {
    color: #28a745 !important;
    font-weight: 500;
    display: block !important;
    margin-top: 12px;
    margin-bottom: 12px;
    text-align: center;
}

#verificationCodeGroup {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .phone-verification,
    .verification-input {
        flex-direction: column;
    }

    .btn-send-code,
    .btn-verify-code {
        width: 100%;
        min-width: auto;
    }

    .country-code-select {
        width: 100%;
    }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    position: relative;
}

.toast-icon {
    flex-shrink: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    flex: 1;
    color: #1d1d1f;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

/* Toast Types */
.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

/* Toast Animation Progress Bar */
.toast-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transform-origin: left;
    animation: toastProgress 5s linear;
}

.toast-error::before {
    background: #dc3545;
}

.toast-success::before {
    background: #28a745;
}

.toast-warning::before {
    background: #ffc107;
}

.toast-info::before {
    background: #17a2b8;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile Toast */
@media (max-width: 768px) {
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .toast-content {
        padding: 14px 16px;
    }

    .toast-message {
        font-size: 0.9rem;
    }
}
