/**
 * LSQC Screening Frontend Styles
 */

.lsqc-quiz-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-header {
    text-align: center;
    margin-bottom: 20px;
}

.quiz-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.quiz-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.progress-fill {
    height: 100%;
    background-color: #007cba;
    transition: width 0.3s ease;
}

.step-counter {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #666;
}

.question-container {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.question-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.question-text {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #555;
}

.question-options {
    margin-bottom: 15px;
}

.option-item {
    margin-bottom: 8px;
}

.option-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    background: #fff;
}

.option-item label:hover {
    background-color: #f8f9fa;
    border-color: #007cba;
}

.option-item input {
    margin-right: 10px;
}

.option-item input:checked + label,
.option-item label:has(input:checked) {
    background-color: #e3f2fd;
    border-color: #007cba;
    color: #0056b3;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background-color: inherit;
}

.quiz-result {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 5px;
}

.result-message {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.result-actions .btn {
    margin: 5px;
}

.quiz-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.quiz-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.question-hint {
    margin-top: 10px;
    padding: 10px;
    background: #e8f4f8;
    border-left: 4px solid #007cba;
    font-style: italic;
    color: #0056b3;
}

/* Text inputs */
.question-container input[type="text"],
.question-container input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.question-container input[type="text"]:focus,
.question-container input[type="number"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.large-text {
    width: 100%;
}

.regular-text {
    width: 200px;
}

/* Responsive design */
@media (max-width: 768px) {
    .lsqc-quiz-container {
        margin: 10px;
        padding: 15px;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Success and error states */
.quiz-result.success .result-message {
    color: #28a745;
}

.quiz-result.failed .result-message {
    color: #dc3545;
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Qualiphy Screening Frontend Styles */

/* Container */
#qualiphy-screening-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Quiz Card */
.quiz-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin: 20px 0;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.quiz-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Progress Bar */
.quiz-progress {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #000000;
    font-weight: 500;
}

/* Question Styles */
.question-header {
    margin-bottom: 20px;
}

.question-number {
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.question-title {
    color: #000000;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.question-text {
    color: #000000;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.question-input {
    margin-bottom: 20px;
}

.question-hint {
    background: #f3f4f6;
    border-left: 3px solid #2563eb;
    padding: 12px 16px;
    margin-top: 12px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #374151;
}

/* Form Elements */
.quiz-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.quiz-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quiz-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.quiz-input-group .quiz-input {
    flex: 1;
}

.quiz-select {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    background: #ffffff;
    cursor: pointer;
}

/* Radio and Checkbox Styles */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.quiz-option:hover {
    border-color: #2563eb;
    background: #f3f4f6;
}

.quiz-option.selected {
    border-color: #2563eb;
    background: #dbeafe;
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.1);
}

.quiz-option label {
    cursor: pointer;
    font-size: 16px;
    color: #000000;
    flex: 1;
}

/* Yes/No Buttons */
.yes-no-buttons {
    display: flex;
    gap: 12px;
}

.yes-no-btn {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yes-no-btn:hover {
    border-color: #2563eb;
    background: #f3f4f6;
}

.yes-no-btn.selected {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.yes-no-btn.yes {
    color: #0f766e;
}

.yes-no-btn.no {
    color: #dc2626;
}

.yes-no-btn.yes.selected {
    background: #0f766e;
    border-color: #0f766e;
}

.yes-no-btn.no.selected {
    background: #dc2626;
    border-color: #dc2626;
}

/* Buttons */
.quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.quiz-btn-primary {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
}

.quiz-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-btn-secondary {
    background: #f3f4f6;
    color: #000000;
    border: 1px solid #d1d5db;
}

.quiz-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.quiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Question Actions */
.question-actions {
    text-align: center;
    margin-top: 24px;
}

/* Loading Spinner */
.quiz-loading {
    text-align: center;
    padding: 48px 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Result Styles */
.quiz-result {
    text-align: center;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.result-icon.success::before {
    content: "✅";
}

.result-icon.failure::before {
    content: "❌";
}

.result-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.result-title.success {
    color: #0f766e;
}

.result-title.failure {
    color: #dc2626;
}

.result-message {
    font-size: 16px;
    color: #000000;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Error Styles */
.quiz-error {
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    color: #dc2626;
    margin-bottom: 24px;
}

/* BMI Input Styles */
.bmi-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.bmi-input-group {
    display: flex;
    flex-direction: column;
}

.bmi-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 5px;
}

/* Select Dropdown Styles */
.quiz-select-container {
    margin: 15px 0;
}

.quiz-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 16px;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.quiz-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Age Input Styles */
.age-input-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.age-toggle-btn {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.age-toggle-btn.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    #qualiphy-screening-container {
        padding: 15px;
    }
    
    .quiz-card {
        padding: 25px;
        margin: 15px 0;
    }
    
    .question-title {
        font-size: 20px;
    }
    
    .quiz-input-group {
        flex-direction: column;
    }
    
    .yes-no-buttons {
        flex-direction: column;
    }
    
    .bmi-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .quiz-card {
        padding: 20px;
    }
    
    .question-title {
        font-size: 18px;
    }
    
    .quiz-btn {
        width: 100%;
        padding: 16px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

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

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

 