/* Classroom plugin styles */

.classroom-class-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    background: #fafffd;
}

.classroom-class-card .classroom-class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.classroom-class-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.classroom-class-code {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: #29f1c3;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 1rem;
}

.classroom-class-meta {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.classroom-class-actions button {
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
}

.classroom-class-actions button:hover {
    color: #000;
}

.classroom-class-actions .classroom-toggle-students {
    color: #1cb495;
    font-weight: 600;
}

.classroom-students {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.classroom-students-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.classroom-students-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #f0f0f0;
}

.classroom-students-list li:last-child {
    border-bottom: none;
}

.classroom-add-student {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.classroom-add-student input {
    flex: 1;
    min-width: 150px;
}

.classroom-empty-students {
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

.classroom-remove-student {
    color: #dc3545;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
}

/* ----- Assign worksheet button on worksheet pages ----- */

.classroom-assign-btn {
    display: inline-flex;
    align-items: center;
    background: #29f1c3;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 43px;
    padding: 15px 3rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.classroom-assign-btn:hover {
    filter: brightness(0.95);
}

/* ----- Modal ----- */

.classroom-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.classroom-modal.d-none {
    display: none !important;
}

.classroom-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.classroom-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.classroom-modal-header,
.classroom-modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.classroom-modal-header {
    border-bottom: 1px solid #eee;
}

.classroom-modal-footer {
    border-top: 1px solid #eee;
    gap: 0.5rem;
}

.classroom-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.classroom-modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
}

.classroom-modal-body {
    padding: 1.25rem 1.5rem;
}

.classroom-assign-students-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.classroom-assign-students-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

/* ----- Assignments lists ----- */

.classroom-assignment-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.classroom-assignment-card .classroom-assignment-meta {
    color: #6c757d;
    font-size: 0.875rem;
}

.classroom-status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.classroom-status-not_started { background: #f1f3f5; color: #495057; }
.classroom-status-in_progress { background: #fff3cd; color: #8a6d3b; }
.classroom-status-completed { background: #d1f7e7; color: #1cb495; }

/* ----- Paper-preview wrapper for the assignment worksheet ----- */

.classroom-assignment-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.classroom-assignment-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.classroom-assignment-header .classroom-meta {
    color: #6c757d;
    font-size: 0.875rem;
}

.classroom-paper-preview {
    margin: 1rem auto;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 8.5 / 11;
    background: #fff;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    overflow-x: hidden;
}

.classroom-paper-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.classroom-assignment-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.classroom-roster-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.classroom-roster-table th,
.classroom-roster-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.classroom-roster-table th {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8f9fa;
}

.classroom-roster-table tbody tr:last-child td {
    border-bottom: none;
}

.classroom-word-list-table input,
.classroom-word-list-table textarea {
    font-size: 0.95rem;
}

.classroom-word-list-table textarea {
    resize: vertical;
    min-height: 38px;
}

.classroom-word-num {
    color: #6c757d;
    font-size: 0.875rem;
    text-align: center;
    vertical-align: middle;
}
