﻿
/* ===== TIMETABLE Generate  Page SYSTEM - MAIN CSS FILE ===== */

.tt .mud-input-label-outlined {
    background-color: rgb(233 246 236);
}

.text-gradient-primary {
    background: linear-gradient(to right, #4e54c8, #8f94fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.form-check .form-check-input {
    margin-left: 0.5em !important;
    float: right;
}

.bg-primary-gradient {
    background: linear-gradient(to right, #4e54c8, #8f94fb);
}

.bg-light-primary {
    background-color: rgba(78, 84, 200, 0.1);
}

.bg-light-success {
    background-color: rgba(40, 167, 69, 0.1);
}

.bg-light-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid lightgray;
}

.bg-light-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-light-info {
    background-color: rgba(23, 162, 184, 0.1);
}

.settings-section {
    transition: all 0.3s ease;
}

    .settings-section:hover {
        transform: translateY(-2px);
    }

.section-header {
    transition: all 0.3s ease;
}

.settings-item {
    padding: 0.75rem 0;
    border-bottom: 1px dashed #eee;
}

    .settings-item:last-child {
        border-bottom: none;
    }

.form-check-input:checked {
    background-color: #4e54c8;
    border-color: #4e54c8;
}

.slider-primary::-webkit-slider-thumb {
    background: #4e54c8;
}

.slider-success::-webkit-slider-thumb {
    background: #28a745;
}

.class-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.class-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .class-card:hover {
        border-color: #8f94fb;
    }

    .class-card.selected {
        border-color: #4e54c8;
        background-color: rgba(78, 84, 200, 0.05);
    }

        .class-card.selected::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            border-width: 0 20px 20px 0;
            border-style: solid;
            border-color: transparent #4e54c8 transparent transparent;
        }

.check-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 10px;
    display: none;
}

.class-card.selected .check-icon {
    display: block;
}

.class-name {
    font-weight: 500;
    display: block;
}

.student-count {
    font-size: 0.75rem;
    display: block;
    margin-top: 5px;
}

.generate-btn {
    background: linear-gradient(to right, #4e54c8, #8f94fb);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .generate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(78, 84, 200, 0.4);
    }

    .generate-btn:disabled {
        background: #6c757d;
    }

.timetable-preview {
    min-height: 300px;
    background-color: #f8f9fa;
}


/* ===== TIMETABLE Summery  Page SYSTEM - MAIN CSS FILE ===== */


/* Grid Layout Adjustments */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Compact Cards */
.stats-card.compact {
    min-width: 0; /* Allows text truncation */
}



/* Full-width Table Card */
.stats-card.full-width {
    grid-column: 1 / -1; /* Spans all columns */
    margin-top: 1rem;
}

/* Responsive Adjustments */
@@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card.full-width {
        grid-column: 1;
    }
}
/* Main Container */
.timetable-stats-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 2rem;
}

/* Grid Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

/* Cards */

.stats-card {
    background: #f2f2f2;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: stretch;
}

    .stats-card.wide {
        grid-column: span 3;
    }

/* Typography */
.stats-title {
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-value {
    color: #333;
    font-size: 1rem;
    font-weight: 700;
}

    .stats-value.large {
        font-size: 1.4rem;
    }

    .stats-value.highlight {
        color: #2c7be5;
    }

/* Table Styles */
.period-distribution-table {
    overflow-x: auto;
}

    .period-distribution-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .period-distribution-table th,
    .period-distribution-table td {
        padding: 0.5rem;
        border: 1px solid #e1e5eb;
        text-align: center;
    }

    .period-distribution-table th {
        background-color: #f8f9fa;
        font-weight: 600;
    }

    .period-distribution-table .total-col {
        background-color: #f1f8fe;
        font-weight: 700;
    }

    .period-distribution-table .row-label {
        font-weight: 600;
        background-color: #f8f9fa;
    }

/* Warning State */
.warning {
    color: #ff6b6b;
}

    .warning .stats-value {
        color: inherit;
    }

/* Responsive Adjustments */
@@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-card.wide {
        grid-column: span 3;
    }
}

@@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card.wide {
        grid-column: span 3;
    }
}


.teacher-periods-table {
    border-collapse: separate;
    border-spacing: 2px;
    margin: -2px; /* Compensate for spacing */
}

.info-txt {
    font-weight: bold;
    color: darkred;
    text-align: center;
    background-color: white;
}

.period-cell {
    min-width: 24px;
    height: 24px;
    text-align: center;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 0.8rem;
    padding: 0;
}

.late-period-cell {
    background: #fff3cd;
    font-weight: bold;
}

/* Optional: Add hover effect */
.period-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
    z-index: 1;
    position: relative;
}

.text-darkred {
    color: darkred;
}


.period-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.period-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.period-label {
    font-weight: bold;
}

.period-count {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
}

.teacher-periods {
    display: flex;
    gap: 3px;
}

.period-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 0.8rem;
}

.late-period {
    background: #fff3cd;
    font-weight: bold;
}

.stat-card {
    padding: 10px;
    border-radius: 5px;
    background: #f8f9fa;
    height: 100%;
}

    .stat-card h6 {
        font-size: 0.9rem;
        margin-bottom: 5px;
        color: #6c757d;
    }

    .stat-card .display-4 {
        font-size: 1.8rem;
        margin-bottom: 0;
    }


/* ===== Summery Modal  - MAIN CSS FILE ===== */

/* Smooth transitions */
.list-group-item {
    transition: all 0.2s ease;
}

/* Scrollbar styling */
.list-group-flush::-webkit-scrollbar {
    width: 6px;
}

.list-group-flush::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.list-group-flush::-webkit-scrollbar-thumb {
    background: #d1d6e0;
    border-radius: 3px;
}

/* Active state */
.list-group-item.active {
    background-color: #f0f5ff !important;
    color: #5a8dee !important;
    border-left: 3px solid #5a8dee !important;
}

/* Hover state */
.list-group-item:not(.active):hover {
    background-color: #f8fafd;
}
/* تأثيرات حركة البطاقات */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
    }

/* تحسينات الشريط التمرير */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #d1d6e0 #f1f1f1;
}

    .modal-body::-webkit-scrollbar {
        width: 6px;
    }

    .modal-body::-webkit-scrollbar-thumb {
        background-color: #d1d6e0;
        border-radius: 3px;
    }

@@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.card {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    }


/* ===== TIMETABLE SYSTEM - MAIN CSS FILE ===== */
/* Base Styles */
.timetable-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    /* max-width: 1200px;*/
    margin: 0 auto;
    padding: 20px;
}
.single-timetable {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
/* Header Section */
.header-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.display-4 {
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.filter-controls {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}
/*
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}*/

/* ===== TEACHER TIMETABLE SPECIFIC STYLES ===== */
.teacher-timetable-view {
    margin-top: 20px;
}

    .teacher-timetable-view h2 {
        color: #2c3e50;
        border-bottom: 2px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

    /* Header Row Styles */
    .timetable-table thead tr:first-child th {
        background-color: #6c757d;
        color: white;
        text-align: center;
        padding: 12px;
        font-weight: 600;
        border: 1px solid #dee2e6;
    }

    .timetable-table thead tr:last-child th {
        background-color: #e9ecef;
        color: #495057;
        text-align: center;
        padding: 10px;
        font-weight: 500;
        border: 1px solid #dee2e6;
    }

    /* Teacher Rows */
    .timetable-table tbody tr td:first-child {
        background-color: #f8f9fa;
        font-weight: 400;
        padding: 5px;
        border: 1px solid #dee2e6;
        white-space: wrap;
    }

    /* Class Cells */
    .timetable-table tbody td {
        text-align: center;
        padding: 5px;
        border: 1px solid #dee2e6;
        vertical-align: middle;
       /* min-width: 100px;*/
    }

.class-cell {
    position: relative;
}

.class-name {
    font-weight: 400;
    color: #212529;
    padding: 2px;
    border-radius: 3px;
    background-color: #f1f8ff;
    display: inline-block;
    min-width: 30px;
    font-size: 0.7rem;
}

/* Special Periods */
.last-period .class-name {
    background-color: #fff3cd;
}

/* Hover Effects */
.timetable-table tbody tr:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* ===== FULL TIMETABLE STYLES ===== */
.full-timetable .day-section {
    margin-bottom: 30px;
}

.full-timetable .day-header {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* ===== CLASS TIMETABLE STYLES ===== */
.class-timetable .class-header {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
    .timetable-table thead tr:first-child th,
    .timetable-table thead tr:last-child th {
        padding: 8px;
        font-size: 0.9rem;
    }

    .timetable-table tbody td {
        padding: 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .timetable-container {
        padding: 15px;
    }

    .header-section {
        padding: 15px;
    }

    .timetable-table thead tr:first-child th,
    .timetable-table thead tr:last-child th {
        padding: 6px;
        font-size: 0.85rem;
    }

    .timetable-table tbody td {
        padding: 6px;
        font-size: 0.85rem;
        min-width: 80px;
    }

    .class-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .timetable-table thead tr:first-child th,
    .timetable-table thead tr:last-child th {
        padding: 4px;
        font-size: 0.8rem;
    }

    .timetable-table tbody td {
        padding: 4px;
        font-size: 0.8rem;
        min-width: 70px;
    }

    .class-name {
        min-width: 70%;
    }
}

/* Add this to your CSS */
/* Heavy border after each day's columns */
.timetable-table thead tr:first-child th.day-header {
    position: relative;
}

.timetable-table thead tr:first-child th.day-header::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #495057;
}

/* For body - targets the last period cell of each day */
.timetable-table tbody tr td[data-is-last-period="true"] {
    border-right: 3px solid #495057 !important;
}