/* =========================================================
   EASE Teacher Pages
   ========================================================= */

.eas-teacher-pages-drag-note {
    margin: 0 0 12px;
    font-size: 0.95em;
}

.eas-teacher-section-break-palette {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    padding: 9px 14px;
    border: 1px dashed #8b9b9b;
    border-radius: 4px;
    background: #f7f9f9;
    color: #333;
    font-weight: 600;
    cursor: grab;
    user-select: none;
    transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.eas-teacher-section-break-palette:active {
    cursor: grabbing;
}

.eas-teacher-section-break-palette.is-dragging {
    opacity: 0.5;
}

.eas-teacher-section-break-palette.is-drag-over {
    border-color: #066A6E;
    background: #e3eeee;
}

.eas-teacher-section-break-palette-handle {
    font-size: 1.2em;
    line-height: 1;
}

.eas-teacher-section-break-help {
    margin: 0 0 16px;
    font-size: 0.9em;
    color: #666;
}

.eas-teacher-pages-sortable tr[data-page-id] {
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.eas-teacher-page-drag-handle {
    width: 40px;
    min-width: 40px;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
    font-size: 1.25em;
    line-height: 1;
    user-select: none;
    cursor: grab;
    touch-action: none;
}

.eas-teacher-page-drag-handle:hover {
    cursor: grab;
}

.eas-teacher-page-drag-handle:active {
    cursor: grabbing;
}

.eas-teacher-pages-sortable tr.is-dragging {
    opacity: 0.45;
}

.eas-teacher-pages-sortable tr.is-drag-over td {
    border-top: 3px solid currentColor;
}

.eas-teacher-section-break-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 2px solid #066A6E;
    border-bottom: 1px solid #d7e0e0;
    background: #f3f7f7;
}

.eas-teacher-section-break-row.is-initial-section-break td {
    border-top-width: 3px;
}

.eas-teacher-section-break-drag-cell {
    width: 40px;
    min-width: 40px;
    text-align: center;
}

.eas-teacher-section-break-drag-handle {
    display: inline-block;
    font-size: 1.25em;
    line-height: 1;
    user-select: none;
    cursor: grab;
    touch-action: none;
}

.eas-teacher-section-break-drag-handle:active {
    cursor: grabbing;
}

.eas-teacher-section-break-row.is-initial-section-break .eas-teacher-section-break-drag-handle {
    cursor: default;
    opacity: 0.45;
}

.eas-teacher-section-break-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.eas-teacher-section-break-content label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    flex: 1 1 420px;
}

.eas-teacher-section-title {
    width: 100%;
    max-width: 500px;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid #b8c8c8;
    border-radius: 4px;
    box-sizing: border-box;
}

.eas-teacher-section-title:focus {
    border-color: #066A6E;
    outline: none;
    box-shadow: 0 0 0 1px #066A6E;
}


/* =========================================================
   Shared Teacher Page Header
   ========================================================= */

.eas-teacher-page-header,
.eas-teacher-workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eas-teacher-page-header h2,
.eas-teacher-workspace-header h2 {
    margin: 0;
}

.eas-teacher-page-header p,
.eas-teacher-workspace-header p {
    margin: 6px 0 0;
}

.eas-teacher-workspace-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* =========================================================
   Dashboard
   ========================================================= */

.eas-teacher-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.eas-teacher-dashboard h2 {
    margin: 0 0 24px;
}

.eas-teacher-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin: 0 0 35px;
}

.eas-teacher-dashboard-card {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}

.eas-teacher-dashboard-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.eas-teacher-dashboard-card-link:hover,
.eas-teacher-dashboard-card-link:focus {
    color: inherit;
    text-decoration: none;
    border-color: #066A6E;
    box-shadow: 0 0 0 1px #066A6E;
}

.eas-teacher-dashboard-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 12px;
}

.eas-teacher-dashboard-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.eas-teacher-dashboard-value {
    font-size: 28px;
    line-height: 1.2;
}

.eas-teacher-dashboard-section {
    margin-top: 35px;
}

.eas-teacher-dashboard-section h3 {
    margin: 0 0 16px;
}

.eas-teacher-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eas-teacher-dashboard-button {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #b8c8c8;
    border-radius: 4px;
    background: #eef3f3;
    color: #333;
    text-decoration: none;
    box-sizing: border-box;
}

.eas-teacher-dashboard-button:hover,
.eas-teacher-dashboard-button:focus {
    text-decoration: none;
    border-color: #066A6E;
    background: #e3eeee;
    color: #066A6E;
}

.eas-teacher-dashboard-button-primary {
    background: #066A6E;
    color: #fff;
    border-color: #066A6E;
}

.eas-teacher-dashboard-button-primary:hover,
.eas-teacher-dashboard-button-primary:focus {
    background: #05585b;
    color: #fff;
    border-color: #05585b;
}

.eas-teacher-dashboard-table-wrap {
    overflow-x: auto;
}

.eas-teacher-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.eas-teacher-dashboard-table th,
.eas-teacher-dashboard-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.eas-teacher-dashboard-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* =========================================================
   Quiz Management - Shortcode Column
   ========================================================= */

.eas-teacher-table th:nth-child(2),
.eas-teacher-table td:nth-child(2) {
    width: 15%;
}

.eas-teacher-shortcode-input {
    width: 90%;
    max-width: 90%;
    box-sizing: border-box;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
    .eas-teacher-dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eas-teacher-page-header,
    .eas-teacher-workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .eas-teacher-section-break-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .eas-teacher-section-break-content label {
        min-width: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .eas-teacher-dashboard-cards {
        grid-template-columns: 1fr;
    }

    .eas-teacher-dashboard {
        padding: 10px 0;
    }
}
