/* Survey-specific styles */
body {
    background: var(--gray-50);
    font-family: var(--font-thai);
}

.survey-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Survey Header */
.survey-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-navy);
    font-family: var(--font-heading);
}

.survey-description {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.school-info {
    text-align: center;
    background: var(--gray-50);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.school-info h4 {
    color: var(--primary-navy);
    margin-bottom: 5px;
}

.school-info p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Preview Banner */
.preview-banner {
    background: linear-gradient(135deg, var(--warning), #f39c12);
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Student Selection */
.student-selection {
    background: var(--gray-50);
    border: 2px solid var(--primary-navy);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.student-selection h3 {
    color: var(--primary-navy);
    font-weight: 600;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

/* Already Submitted Message */
.already-submitted-message {
    text-align: center;
    background: linear-gradient(135deg, var(--warning), #f39c12);
    color: white;
    padding: 40px 20px;
    border-radius: var(--border-radius-lg);
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

.already-submitted-message h3 {
    color: white;
    margin-bottom: 15px;
}

.already-submitted-message p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 0;
}

/* Section Headers */
.survey-section {
    margin-bottom: 35px;
}

.section-header {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    border-radius: var(--border-radius-lg);
    font-family: var(--font-heading);
    box-shadow: var(--shadow-md);
}

/* Survey Elements */
.survey-header-element {
    text-align: center;
    margin: 25px 0;
}

.survey-main-header {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0;
    font-family: var(--font-heading);
}

.subsection-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-navy));
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.article-content {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.article-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700);
}

.image-container {
    text-align: center;
    margin: 25px 0;
}

.survey-image {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Question Styles */
.question-container {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

/* Locked Question Styles */
.question-container.locked {
    opacity: 0.5;
    background: var(--gray-100);
    border-color: var(--gray-300);
    pointer-events: none;
    position: relative;
}

.question-container.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.1) 10px,
        rgba(0,0,0,0.1) 20px
    );
    pointer-events: none;
    border-radius: var(--border-radius-lg);
}

.question-container.locked .question-text::after {
    content: ' (ข้ามไปแล้ว)';
    color: var(--gray-500);
    font-weight: normal;
    font-style: italic;
}

.question-number {
    font-weight: bold;
    color: var(--primary-navy);
    margin-bottom: 8px;
    font-size: 16px;
    font-family: var(--font-heading);
}

.question-content {
    margin-left: 0;
}

.question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Answer Containers */
.answer-container {
    margin-top: 10px;
}

.text-input,
.number-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: all 0.3s ease;
}

.text-input:focus,
.number-input:focus {
    border-color: var(--secondary-navy);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(49, 130, 206, 0.25);
}

.choices-container {
    margin-top: 10px;
}

.choice-item {
    margin: 8px 0;
}

.choice-label {
    display: flex;
    align-items: flex-start;
    padding: 10px 15px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
}

.choice-label:hover {
    background: var(--gray-100);
    border-color: var(--secondary-navy);
}

.choice-input {
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.choice-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.4;
}

/* Other option text input styles */
.other-input-container {
    transition: all 0.3s ease;
}

.other-text-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.other-text-input:focus {
    border-color: var(--secondary-navy);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(49, 130, 206, 0.25);
    background: white;
}

/* Other input wrapper */
.other-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.other-input-wrapper .other-text-input {
    flex: 1;
    border: none;
    background: transparent;
    margin-left: 8px;
}

.other-input-wrapper .other-text-input:focus {
    background: white;
    box-shadow: none;
}

/* Submit Button */
.submit-container {
    text-align: center;
    margin-top: 40px;
    padding: 30px 0;
    border-top: 2px solid var(--gray-200);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-navy-dark), var(--primary-navy));
}

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

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 50px;
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    color: var(--gray-700);
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--secondary-navy);
}

.select2-dropdown {
    border: 2px solid var(--secondary-navy);
    border-radius: var(--border-radius);
}

.required {
    color: var(--danger);
}

/* Jump notification */
.jump-notification {
    background: var(--info);
    color: white;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    font-weight: 500;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Confirmation Modal */
.confirmation-modal .modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.confirmation-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.confirmation-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.confirmation-modal .student-name-highlight {
    background: var(--accent-blue);
    color: white;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-weight: 600;
    margin: 15px 0;
    text-align: center;
}

.confirmation-modal .alternative-students {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.confirmation-modal .student-option {
    padding: 10px 15px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirmation-modal .student-option:hover {
    background: var(--gray-100);
}

.confirmation-modal .student-option:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .survey-wrapper {
        padding: 15px;
        margin: 0;
        box-shadow: none;
    }
    
    .survey-title {
        font-size: 24px;
    }
    
    .question-container {
        padding: 15px;
    }
    
    .choice-label {
        padding: 8px 12px;
    }
}

/* Print styles */
@media print {
    .survey-wrapper {
        box-shadow: none;
        margin: 0;
        padding: 15px;
    }
    
    .preview-banner,
    .alert,
    .submit-container {
        display: none;
    }
}