/* Inherit variables from style.css */

/* Main Layout */
.flex-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

/* Panel Containers */
.back-container1, .back-container2 {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.back-container1 {
    flex: 3; /* Survey takes more space */
}

.back-container2 {
    flex: 1; /* Sidebar */
    min-width: 300px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Headings & Text */
h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 500;
}

.intro-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Form Sections */
.form-section {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Radio Groups */
.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.radio-group-vertical label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
}

input[type="radio"] {
    accent-color: var(--primary-green);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* Textareas & Inputs */
.answer-text, .input-field, .select-field {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.answer-text {
    min-height: 80px;
    resize: vertical;
}

.answer-text:focus, .input-field:focus, .select-field:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Survey Table */
.survey-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.survey-table th, .survey-table td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.survey-table th {
    background-color: var(--primary-green);
    color: white;
    font-weight: 500;
}

.survey-table th:first-child {
    border-top-left-radius: 6px;
    text-align: left;
}

.survey-table th:last-child {
    border-top-right-radius: 6px;
}

.survey-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-dark);
}

.survey-table tr:hover {
    background-color: #f9fdf9;
}

/* Student Info Sidebar */
.info-group {
    margin-bottom: 1rem;
}

.info-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.date-display {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

/* Buttons */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--highlight-orange), var(--hover-orange));
    color: white;
    padding: 12px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .flex-container {
        flex-direction: column;
    }

    .back-container1, .back-container2 {
        width: 100%;
        min-width: 0;
    }

    .back-container2 {
        position: static;
        order: -1;
    }

    .survey-table, .survey-table thead, .survey-table tbody, .survey-table th, .survey-table td, .survey-table tr {
        display: block;
    }

    .survey-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .survey-table tr {
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .survey-table td {
        border: none;
        position: relative;
        padding-left: 0;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .survey-table td:first-child {
        background-color: var(--primary-green);
        color: white;
        font-weight: bold;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        justify-content: center;
        border-radius: 4px;
    }

    /* Specific labels for rating columns */
    .survey-table td:nth-of-type(2):before { content: "Excelente"; font-weight: 500; color: var(--text-muted); }
    .survey-table td:nth-of-type(3):before { content: "Bueno"; font-weight: 500; color: var(--text-muted); }
    .survey-table td:nth-of-type(4):before { content: "Regular"; font-weight: 500; color: var(--text-muted); }
    .survey-table td:nth-of-type(5):before { content: "Malo"; font-weight: 500; color: var(--text-muted); }
    
    /* Better approach for radio matrix on mobile: stack them */
    .survey-table td {
        display: flex;
        flex-direction: row-reverse; /* Put radio on right */
        justify-content: flex-end;
        gap: 10px;
    }
}

