/* Quiz Creator Frontend Styles */

.quiz-creator-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.quiz-creator-wrapper .quiz-creator-container {
    --qc-primary-color: #BA922E;
    --qc-progress-color: #BA922E;
    --qc-background-color: #EFE8DD;
    --qc-text-color: #333333;
    --qc-white: #ffffff;
    
    position: relative;
    width: 100%;
    color: var(--qc-text-color);
}

/* Segmented Progress Bar */
.quiz-creator-wrapper .quiz-progress-container {
    margin-bottom: 32px;
}

.quiz-creator-wrapper .quiz-progress-segments {
    display: flex;
    gap: 8px;
    width: 100%;
}

.quiz-creator-wrapper .progress-segment {
    flex: 1;
    height: 8px;
    background-color: var(--qc-background-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.quiz-creator-wrapper .progress-segment.active {
    background-color: var(--qc-progress-color, var(--qc-primary-color));
}

/* Question Content */
.quiz-creator-wrapper .question-slide {
    position: relative;
    width: 100%;
    opacity: 1;
    transform: translateX(0);
}

.quiz-creator-wrapper .question-slide.fade-enter {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quiz-creator-wrapper .question-content {
    margin-bottom: 48px;
}

.quiz-creator-wrapper .question-number-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--qc-primary-color);
    margin-bottom: 24px;
}

.quiz-creator-wrapper .question-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--qc-text-color);
    margin: 0 0 48px 0;
    line-height: 1.4;
}

.quiz-creator-wrapper .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Question Options */
.quiz-creator-wrapper .question-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quiz-creator-wrapper .option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--qc-background-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.quiz-creator-wrapper .option-label:hover {
    background-color: #e8dcc8;
    border-color: var(--qc-primary-color);
}

.quiz-creator-wrapper .option-label:has(input:checked) {
    /* border-color: var(--qc-primary-color); */
    /* background-color: var(--qc-primary-color); */
    /* color: var(--qc-white); */
}

/* Custom Radio Button */
.quiz-creator-wrapper .custom-radio {
    position: relative;
    margin-right: 14px;
    flex-shrink: 0;
}

.quiz-creator-wrapper .custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.quiz-creator-wrapper .radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--qc-primary-color);
    border-radius: 50%;
    background-color: var(--qc-white);
    position: relative;
    transition: all 0.2s ease;
}

.quiz-creator-wrapper .custom-radio input[type="radio"]:checked + .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--qc-primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.quiz-creator-wrapper .option-label:has(input:checked) .radio-circle {
    /* border-color: var(--qc-white); */
    /* background-color: var(--qc-white); */
}

.quiz-creator-wrapper .option-label:has(input:checked) .radio-circle::after {
    background-color: var(--qc-primary-color);
}

.quiz-creator-wrapper .option-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 400;
}

/* Question Separator */
.quiz-creator-wrapper .question-separator {
    height: 1px;
    background-color: #ddd;
    margin: 48px 0 32px 0;
}

/* Navigation */
.quiz-creator-wrapper .question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-creator-wrapper .nav-left, .quiz-creator-wrapper .nav-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Buttons */
.quiz-creator-wrapper .quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--qc-text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    line-height: 1.2;
}

.quiz-creator-wrapper .quiz-btn-primary {
    background-color: var(--qc-primary-color) ;
    color: var(--qc-white) ;
    border: 2px solid var(--qc-primary-color) ;
}

.quiz-creator-wrapper .quiz-btn-primary:hover {
    background-color: #a67f26 ;
    border-color: #a67f26 ;
    transform: translateY(-1px) ;
    box-shadow: 0 4px 8px rgba(186, 146, 46, 0.3) ;
}

.quiz-creator-wrapper .quiz-btn-secondary {
    background-color: var(--qc-white) ;
    color: var(--qc-text-color) ;
    border: 2px solid #ddd ;
}

.quiz-creator-wrapper .quiz-btn-secondary:hover {
    background-color: #f8f9fa ;
    border-color: #adb5bd ;
}

.quiz-creator-wrapper .quiz-btn-back {
    background-color: var(--qc-white) ;
    color: var(--qc-text-color) ;
    border: 2px solid #ddd ;
}

.quiz-creator-wrapper .quiz-btn-back:hover {
    background-color: #f8f9fa ;
    color: var(--qc-text-color);
    border-color: #adb5bd ;
}

.quiz-creator-wrapper .quiz-btn-skip {
    background-color: transparent ;
    color: #666 ;
    border: none ;
    font-weight: 400 ;
    text-decoration: underline ;
    min-width: auto ;
    padding: 0 ;
}

.quiz-creator-wrapper .quiz-btn-skip:hover {
    color: var(--qc-text-color) ;
    background-color: transparent;
    text-decoration: underline;
}

/* Lead Generation Form */
.quiz-creator-wrapper .leadgen-form {
    animation: fadeIn 0.3s ease-in;
}

.quiz-creator-wrapper .leadgen-content {
    text-align: center;
}

.quiz-creator-wrapper .leadgen-title {
    font-size: 28px;
    color: var(--qc-primary-color);
    margin: 0 0 15px 0;
    font-weight: 600;
}

.quiz-creator-wrapper .leadgen-description {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.quiz-creator-wrapper .leadgen-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.quiz-creator-wrapper .leadgen-field {
    display: flex;
    flex-direction: column;
}

.quiz-creator-wrapper .field-width-full {
    flex: 1 1 100%;
}

.quiz-creator-wrapper .field-width-half {
    flex: 1 1 calc(50% - 7.5px);
}

.quiz-creator-wrapper .field-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--qc-text-color);
    font-size: 16px;
}

.quiz-creator-wrapper .field-input {
    padding: 12px 16px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: border-color 0.2s ease !important;
    background-color: var(--qc-white) !important;
}

.quiz-creator-wrapper .field-input:focus {
    outline: none !important;
    border-color: var(--qc-primary-color) !important;
    box-shadow: 0 0 0 3px rgba(186, 146, 46, 0.1) !important;
}

.quiz-creator-wrapper .checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 10px 0;
}

.quiz-creator-wrapper .checkbox-label .custom-checkbox {
    margin-top: 0;
    margin-right: 14px;
}

/* Custom Checkbox */
.quiz-creator-wrapper .custom-checkbox {
    position: relative;
    margin-right: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.quiz-creator-wrapper .custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.quiz-creator-wrapper .checkbox-square {
    width: 20px;
    height: 20px;
    border: 2px solid var(--qc-primary-color);
    border-radius: 4px;
    background-color: var(--qc-white);
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-creator-wrapper .custom-checkbox input[type="checkbox"]:checked + .checkbox-square {
    background-color: var(--qc-primary-color);
    border-color: var(--qc-primary-color);
}

.quiz-creator-wrapper .custom-checkbox input[type="checkbox"]:checked + .checkbox-square::after {
    content: '✓';
    position: absolute;
    color: var(--qc-white);
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Legacy checkbox styling - keeping for backward compatibility */
.quiz-creator-wrapper .checkbox-label input[type="checkbox"]:not(.custom-checkbox input) {
    margin-right: 10px;
    margin-top: 2px;
}

.quiz-creator-wrapper .checkbox-text {
    line-height: 1.4;
    font-size: 16px;
    flex: 1;
}

.quiz-creator-wrapper .checkbox-text a {
    color: var(--qc-primary-color);
    text-decoration: none;
}

.quiz-creator-wrapper .checkbox-text a:hover {
    text-decoration: underline;
}

.quiz-creator-wrapper .leadgen-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Results */
.quiz-creator-wrapper .quiz-results {
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.quiz-creator-wrapper .results-title {
    font-size: 28px;
    color: var(--qc-primary-color);
    margin: 0 0 20px 0;
    font-weight: 600;
}

.quiz-creator-wrapper .results-score {
    font-size: 24px;
    font-weight: 600;
    color: var(--qc-text-color);
    margin: 20px 0;
    padding: 20px;
    background: var(--qc-background-color);
    border-radius: 8px;
    border-left: 4px solid var(--qc-primary-color);
}

.quiz-creator-wrapper .score-value {
    color: var(--qc-primary-color);
    font-size: 32px;
}

.quiz-creator-wrapper .results-message {
    font-size: 16px;
    color: #666;
    margin: 20px 0;
    line-height: 1.5;
}

.quiz-creator-wrapper .results-actions {
    margin-top: 30px;
}

/* Loading */
.quiz-creator-wrapper .quiz-loading {
    text-align: center;
    padding: 40px;
}

.quiz-creator-wrapper .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--qc-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-creator-wrapper .loading-text {
    font-size: 16px;
    color: #666;
}

/* Error States */
.quiz-creator-wrapper .quiz-creator-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 500;
}

.quiz-creator-wrapper .validation-error{
    color: #dc3545;
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 16px;
    font-weight: 400;
}

.quiz-creator-wrapper .field-error{
    color: #dc3545;
    margin-top: 5px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-creator-wrapper .question-title {
        font-size: 24px;
    }
    
    .quiz-creator-wrapper .option-text {
        font-size: 16px;
    }
    
    .quiz-creator-wrapper .field-width-half {
        flex: 1 1 100%;
    }
    
    .quiz-creator-wrapper .question-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-creator-wrapper .nav-left, .quiz-creator-wrapper .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    .quiz-creator-wrapper .leadgen-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-creator-wrapper .quiz-btn {
        min-width: 120px;
    }
    
    .quiz-creator-wrapper .progress-segment {
        height: 6px;
    }
}

@media (max-width: 480px) {
    .quiz-creator-wrapper .question-title {
        font-size: 22px;
        margin-bottom: 32px;
    }
    
    .quiz-creator-wrapper .question-number-text {
        margin-bottom: 16px;
    }
    
    .quiz-creator-wrapper .question-options {
        gap: 12px;
    }
    
    .quiz-creator-wrapper .option-label {
        padding: 14px 16px;
    }
    
    .quiz-creator-wrapper .option-text {
        font-size: 16px;
    }
    
    .quiz-creator-wrapper .quiz-btn {
        padding: 10px 16px;
        font-size: 15px;
        min-width: 100px;
    }
    
    .quiz-creator-wrapper .progress-segment {
        height: 6px;
    }
    
    .quiz-creator-wrapper .quiz-progress-segments {
        gap: 6px;
    }
}