/* Mediterranean Quiz Styles */

.med-quiz-wrapper {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.med-quiz-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.med-quiz-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 48px 32px;
    text-align: center;
    color: white;
}

.med-quiz-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.med-quiz-subtitle {
    font-size: 18px;
    margin: 0;
    opacity: 0.95;
    font-weight: 500;
}

/* Progress bar */
.med-quiz-progress {
    padding: 24px 32px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.med-quiz-progress-info {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-align: center;
}

.med-quiz-progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.med-quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* Live Score */
.med-quiz-live-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    color: white;
}

.med-quiz-live-score-label {
    font-size: 14px;
    font-weight: 500;
}

.med-quiz-live-score-value {
    font-size: 24px;
    font-weight: 800;
    animation: scoreUpdate 0.3s ease;
}

.med-quiz-live-score-max {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.8;
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Form */
.med-quiz-form {
    padding: 40px 32px;
}

/* Steps */
.med-quiz-step {
    display: none;
}

.med-quiz-step-active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question */
.med-quiz-question {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.med-quiz-question-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.med-quiz-question-content {
    flex: 1;
}

.med-quiz-question-text {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.med-quiz-question-note {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
    font-style: italic;
    font-weight: 700;
}

/* Answers */
.med-quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.med-quiz-answer {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.med-quiz-answer:hover {
    background: white;
    border-color: #f59e0b;
    transform: translateX(4px);
}

.med-quiz-answer input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.med-quiz-answer input[type="radio"]:checked + .med-quiz-answer-radio {
    background: #f59e0b;
    border-color: #f59e0b;
}

.med-quiz-answer input[type="radio"]:checked + .med-quiz-answer-radio::after {
    opacity: 1;
    transform: scale(1);
}

.med-quiz-answer input[type="radio"]:checked ~ .med-quiz-answer-text {
    color: #1f2937;
    font-weight: 600;
}

.med-quiz-answer-radio {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    background: white;
}

.med-quiz-answer-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s;
}

.med-quiz-answer-text {
    font-size: 16px;
    color: #374151;
    transition: all 0.2s;
}

/* Navigation */
.med-quiz-navigation {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.med-quiz-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.med-quiz-btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.med-quiz-btn-prev:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

.med-quiz-btn-next {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    margin-left: auto;
}

.med-quiz-btn-next:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.med-quiz-btn-submit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    margin-left: auto;
}

.med-quiz-btn-submit-inline {
    display: none;
    margin-top: 20px;
    width: 100%;
    padding: 18px 32px;
    font-size: 17px;
    font-weight: 600;
}

.med-quiz-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.med-quiz-btn-retry {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    margin-top: 24px;
    padding: 16px 32px;
    font-size: 16px;
}

.med-quiz-btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* Messages */
.med-quiz-messages {
    margin-bottom: 24px;
}

.med-quiz-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.med-quiz-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.med-quiz-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Loader */
.med-quiz-loader {
    text-align: center;
    padding: 40px;
}

.med-quiz-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #f59e0b;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results */
.med-quiz-results {
    padding: 60px 32px;
    text-align: center;
}

.med-quiz-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.med-quiz-results-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    color: white;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
}

.med-quiz-results-title {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 32px 0;
}

.med-quiz-results-score {
    background: #f9fafb;
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 24px;
    border: 2px solid #e5e7eb;
}

.med-quiz-score-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.med-quiz-score-value {
    font-size: 72px;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
    margin-bottom: 8px;
}

.med-quiz-score-max {
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.med-quiz-results-message {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

/* Footer logo */
.med-quiz-footer {
    padding: 32px;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.med-quiz-logo {
    max-width: 200px;
    height: auto;
    transition: transform 0.2s;
}

.med-quiz-logo-main {
    max-width: 150px;
}

.med-quiz-logo-powered {
    max-width: 120px;
}

.med-quiz-powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.med-quiz-powered-by span {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.med-quiz-logo:hover {
    transform: scale(1.05);
}

/* Email Box */
.med-quiz-email-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-top: 16px;
}

.med-quiz-optional-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    border: 2px solid #f59e0b;
}

.med-quiz-email-choice {
    margin-bottom: 16px;
}

.med-quiz-email-choice .med-quiz-answer {
    margin-bottom: 12px;
}

.med-quiz-email-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.med-quiz-input-group {
    margin-bottom: 16px;
}

.med-quiz-input-group:last-child {
    margin-bottom: 0;
}

.med-quiz-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.med-quiz-input-group input[type="text"],
.med-quiz-input-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    background: white;
}

.med-quiz-input-group input[type="text"]:focus,
.med-quiz-input-group input[type="email"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* Privacy note */
.med-quiz-privacy-note {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    line-height: 1.5;
}

.med-quiz-email-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    color: #374151;
    font-weight: 500;
}

.med-quiz-email-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.med-quiz-email-field {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.med-quiz-email-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.med-quiz-email-field input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    background: white;
}

.med-quiz-email-field input[type="email"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .med-quiz-wrapper {
        margin: 30px auto;
        padding: 0 16px;
    }
    
    .med-quiz-header {
        padding: 32px 24px;
    }
    
    .med-quiz-title {
        font-size: 28px;
    }
    
    .med-quiz-subtitle {
        font-size: 16px;
    }
    
    .med-quiz-form {
        padding: 32px 24px;
    }
    
    .med-quiz-question {
        flex-direction: column;
        gap: 16px;
    }
    
    .med-quiz-question-text {
        font-size: 18px;
    }
    
    .med-quiz-navigation {
        flex-direction: column;
    }
    
    .med-quiz-btn-next,
    .med-quiz-btn-submit {
        margin-left: 0;
    }
    
    .med-quiz-score-value {
        font-size: 56px;
    }
}
