/* nited style.css */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600&display=swap');

.nited-field-missing {
    outline: 2px solid #e74c3c;
    border-radius: 6px;
    background: #fff0f0;
    animation: nited-field-missing-pulse 1s ease-in-out 2;
}
@keyframes nited-field-missing-pulse {
    0%, 100% { background: #fff0f0; }
    50% { background: #ffd6d6; }
}

.nited-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    font-family: 'Sarabun', sans-serif;
}

.nited-header {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nited-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.nited-section {
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
}

.nited-section-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 5px;
}

.nited-info {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Form Grid — 2 columns desktop, 1 column mobile */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Sarabun', sans-serif;
    box-sizing: border-box;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.12);
}

/* Level + Room selects row */
.nited-level-row {
    display: flex;
    gap: 10px;
}

.nited-level-row select {
    flex: 1;
    width: auto !important;
}

/* Student count row */
.nited-count-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nited-count-row input {
    flex: 1;
}

/* Evaluation items */
.evaluation-item {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.evaluation-question {
    font-weight: 500;
    margin-bottom: 12px;
    color: #2d3748;
    line-height: 1.5;
    font-size: 15px;
}

.rating-options {
    display: flex;
    justify-content: space-around;
    gap: 4px;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 44px;
    min-height: 50px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.rating-option:hover,
.rating-option:active {
    background: #f3f0ff;
}

.rating-option input[type="radio"] {
    margin-bottom: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #764ba2;
}

.rating-option span {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

/* Result Section */
.result-box {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.result-score {
    font-size: 2em;
    font-weight: bold;
    color: #2b6cb0;
}

.result-level {
    font-size: 1.5em;
    color: #2c5282;
    margin-top: 10px;
}

/* Buttons */
.btn-submit, .btn-pdf {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-submit {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-pdf {
    background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-submit:hover, .btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons .btn-submit {
    margin-bottom: 0;
}

.action-buttons a.button {
    display: block !important;
    text-align: center;
    text-decoration: none !important;
    padding: 14px 20px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-family: 'Sarabun', sans-serif;
    margin-left: 0 !important;
    background: #95a5a6 !important;
    color: white !important;
    box-sizing: border-box;
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
    .nited-container {
        padding: 12px 10px;
    }

    .nited-header {
        padding: 14px 12px;
        border-radius: 8px;
        margin-bottom: 14px;
    }

    .nited-header h2 {
        font-size: 1.1em;
    }

    .nited-section {
        padding: 12px 10px;
        margin-bottom: 14px;
    }

    .nited-section-title {
        font-size: 1.05em;
        margin-bottom: 12px;
    }

    /* Stack grid to 1 column on mobile */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 12px;
    }

    /* Stack level/room selects vertically */
    .nited-level-row {
        flex-direction: column;
        gap: 8px;
    }

    .nited-level-row select {
        width: 100% !important;
    }

    /* Larger radio touch targets */
    .evaluation-item {
        padding: 12px 10px;
    }

    .rating-option {
        min-width: 40px;
        min-height: 54px;
        padding: 6px 4px;
    }

    .rating-option input[type="radio"] {
        width: 22px;
        height: 22px;
    }

    .rating-option span {
        font-size: 14px;
    }

    .btn-submit, .btn-pdf {
        font-size: 16px;
        padding: 14px;
    }
}

/* Print specific */
@media print {
    .btn-submit, .btn-pdf, .action-buttons a.button {
        display: none !important;
    }
    body * {
        visibility: hidden;
    }
    .nited-container, .nited-container * {
        visibility: visible;
    }
    .nited-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
    }
}
