/* ===============================
   TABLE LAYOUT
================================ */
body.edit_questions .test-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed; /* ensures columns respect widths */
}

/* Cells */
body.edit_questions .test-table th,
body.edit_questions .test-table td { 
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}

/* ===============================
   COLUMN WIDTHS
================================ */

/* ID – narrow */ 
body.edit_questions .test-table th:nth-child(1),
body.edit_questions .test-table td:nth-child(1) { 
    width: 80px;  /* slightly wider for readability */
    text-align: center;
}

/* Question + Correct Answer + Wrong 1-3 – equal widths */
body.edit_questions .test-table th:nth-child(2),
body.edit_questions .test-table td:nth-child(2),
body.edit_questions .test-table th:nth-child(3),
body.edit_questions .test-table td:nth-child(3),
body.edit_questions .test-table th:nth-child(4),
body.edit_questions .test-table td:nth-child(4),
body.edit_questions .test-table th:nth-child(5),
body.edit_questions .test-table td:nth-child(5),
body.edit_questions .test-table th:nth-child(6),
body.edit_questions .test-table td:nth-child(6) {
    width: calc((100% - 50px) / 5); /* subtract ID width, then divide equally */
}

/* ===============================
   INPUTS & TEXTAREAS
================================ */

body.edit_questions .test-table td input,
body.edit_questions .test-table td select,
body.edit_questions .test-table td textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

/* TEXTAREAS — ADJUSTED HEIGHT */
body.edit_questions .test-table td textarea {
    min-height: 140px;  
    resize: vertical;
    padding: 10px;
    line-height: 1.5;
    font-family: inherit;
}

/* ===============================
   HEADERS & ROWS
================================ */

body.edit_questions .test-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

body.edit_questions .test-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

body.edit_questions .test-table tr:hover {
    background-color: #f1f1f1;
}

/* ===============================
   BUTTONS
================================ */

body.edit_questions .test-table button {
    padding: 5px 8px;
    border: none;
    color: white;
    background-color: #007bff;
    cursor: pointer;
    border-radius: 4px;
}

body.edit_questions .test-table form .delete {
    background-color: red;
}

body.edit_questions .test-table form .delete:hover {
    background-color: #6f0505;
}

body.edit_questions .test-table button:hover {
    background-color: #0056b3;
}

/* ===============================
   PAGE & NOTIFICATIONS
================================ */

body.edit_questions {
    padding-top: 40px;
}

body.edit_questions h1,
body.edit_questions h2 {
    text-align: center;
}

body.edit_questions .edit_questions-container .notification {
    padding: 15px;
    margin-bottom: 20px; 
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    text-align: center;
}

body.edit_questions .edit_questions-container .notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

body.edit_questions .edit_questions-container .notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Sticky headers */
.table-scroll {
    max-height: 500px;
    overflow-y: auto;
}

.table-scroll thead th {
    position: sticky; 
    top: 0;
    background: #fff;
    z-index: 5;
}