/* Globals */
.page-title-container{
    color: var(--blue-color);
}

.user-page-title{
    color: var(--blue-color);
}


.user-page-title-notice{
    color: var(--red-color);
}

/* End Globals */
textarea {
    resize: none;
}

@keyframes pulse {
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.user-dashboard-statistics-link:active,
.user-dashboard-statistics-link:focus,
.user-dashboard-statistics-link:visited,
.user-dashboard-statistics-link:visited{
    border: none !important;
    outline: none !important;
}

.user-dashboard-statistics-link:hover {
    animation: pulse 0.5s ease-in-out forwards;
}

.bs-icon {
    --bs-icon-size: .75rem;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    font-size: var(--bs-icon-size);
    width: calc(var(--bs-icon-size) * 2);
    height: calc(var(--bs-icon-size) * 2);
    color: var(--bs-primary);
}

.bs-icon-xs {
    --bs-icon-size: 1rem;
    width: calc(var(--bs-icon-size) * 1.5);
    height: calc(var(--bs-icon-size) * 1.5);
}

.bs-icon-sm {
    --bs-icon-size: 1rem;
}

.bs-icon-md {
    --bs-icon-size: 1.5rem;
}

.bs-icon-lg {
    --bs-icon-size: 2rem;
}

.bs-icon-xl {
    --bs-icon-size: 2.5rem;
}

.bs-icon.bs-icon-primary {
    color: var(--bs-white);
    background: var(--bs-primary);
}

.bs-icon.bs-icon-primary-light {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .2);
}

.bs-icon.bs-icon-semi-white {
    color: var(--bs-primary);
    background: rgba(255, 255, 255, .5);
}

.bs-icon.bs-icon-rounded {
    border-radius: .5rem;
}

.bs-icon.bs-icon-circle {
    border-radius: 50%;
}

.register-btn:hover {
    background-color: #364e58;
}

#register-btn #hover {
    background-color: black;
}

#register-btn:hover {
    background-color: #364e58 !important;
    transition-duration: 0.2s !important;
}

.nav-link:hover {
    color: #e94d10 !important;
    transition-duration: .2s;
    cursor: pointer !important;
    border-color: transparent !important;
}

.branch-link-footer span:hover {
    color: #e94d10 !important;
    cursor: pointer !important;
    transition-duration: .2s;
}

.attendance-btn:hover {
    color: #364e58 !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}


.attendance-btn.present {
    background-color: var(--secondary-color) !important;
    color: #e8e8ea !important;
}

.attendance-btn.late,
.attendance-btn.absent{
    background-color: var(--red-color) !important;
    color: #e8e8ea !important;
}

@media (max-width: 992px) {
    .user-dashboard-nav {
        background-color: transparent !important;
    }
}




/* Navbar */

.user-dashboard-nav{
    max-width: 880px;
    width: fit-content;
    background: var(--gray-color);
    border-radius: 10px;
    min-height: 60px;
    margin-top: 10px;
}

.user-dashboard-nav .nav-tabs{
    gap: 20px;
}

.user-dashboard-nav:has(.evaluate-session-link){
    max-width: 1200px;
}

.user-dashboard-nav .nav-item{
    color: var(--blue-color);
    width: 150px;
    text-align: center;
}


.user-dashboard-nav .nav-link{
    border-radius: 10px;
    color: var(--blue-color) !important;
}

.user-dashboard-link-active {
    color: var(--white-color);
    font-size: 18px;
    background: var(--gray-color) !important;
}

.user-dashboard-nav .evaluate-session-link{
    padding: 9px 5px !important;
}

.user-dashboard-nav .evaluate-session-link:hover{
    color: var(--gray-color) !important;
}

.nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {
    border-color: transparent !important;
    outline: none !important;
}


/* instructor-availability page */

.form-actions #save-btn{
    background-color: var(--accent-color);
    color: white;
}

.mode-option{
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    width: 220px;
    gap: 10px;
}

.border-danger {
    border: 1px solid #dc3545 !important;
}

.time-slot-template {
    transition: all 0.3s ease;
}

.branch-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.branch-section {
    border-left: 4px solid var(--primary-color);
}

.branch-section .card-header {
    background-color: var(--white-color);
}

/* instructor-edit-availability page */
.availability-records .list-group-item {
    transition: all 0.3s ease;
}

.availability-records .list-group-item:hover {
    background-color: var(--white-color);
}

.time-slot {
    border-left: 4px solid var(--blue-color);
}

.branch-section {
    border-left: 4px solid var(--accent-color);
}


/* ── Card ────────────────────────────────────────────────────────────── */
.availability-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.availability-card.has-pending {
    border-color: #ffc107;
    background: #fffef5;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.availability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.availability-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.availability-date {
    font-size: 12px;
    color: #adb5bd;
    white-space: nowrap;
}

/* ── Badges ──────────────────────────────────────────────────────────── */
.locked-badge,
.pending-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
.locked-badge {
    background: #f1e8ea;
    color: var(--primary-color);
}
.pending-badge {
    background: #fff3cd;
    color: #856404;
}

/* ── Pending notice ──────────────────────────────────────────────────── */
.pending-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbea;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.pending-notice i {
    color: #f59e0b;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}
.pending-notice-title {
    font-size: 13px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 2px 0;
}
.pending-notice-desc {
    font-size: 12px;
    color: #a07a00;
    margin: 0;
}

/* ── Slots grid ──────────────────────────────────────────────────────── */
.slots-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fafafa;
    font-size: 13px;
    gap: 12px;
}
.slot-item .slot-day {
    flex: 1;
}
.slot-item .slot-time {
    flex: 1;
    text-align: center;
}
.slot-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.slot-actions .btn {
    padding: 3px 8px;
    font-size: 12px;
}
.slot-item.locked {
    background: #fdf4f5;
    border-color: #f1c2c8;
    opacity: 0.8;
}
.slot-day {
    font-weight: 600;
    color: var(--text-dark);
}
.slot-time {
    color: #6c757d;
    font-size: 12px;
}

/* ── Actions ─────────────────────────────────────────────────────────── */
.availability-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
}
.availability-actions .btn {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 5px;
}
.availability-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Bottom "Create new" link ────────────────────────────────────────── */
.text-center .btn-outline-secondary {
    font-size: 13px;
    color: #6c757d;
    border-color: #ced4da;
}
.text-center .btn-outline-secondary:hover {
    background: #f8f9fa;
    color: var(--text-dark);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .availability-card {
        padding: 14px;
    }
    .availability-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .availability-actions {
        flex-direction: column;
    }
    .availability-actions .btn {
        width: 100%;
        text-align: center;
    }
}



/* ============================
   ADD AVAILABILITY NOTICES
   ============================ */


#availability-notices .notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    animation: notice-in 0.2s ease;
}
@keyframes notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#availability-notices .notice-error {
    background: #fdf2f3;
    border-left: 4px solid #dc3545;
    color: #7a1a22;
}
#availability-notices .notice-success {
    background: #f2fdf4;
    border-left: 4px solid #28a745;
    color: #1a5c28;
}
#availability-notices .notice-icon {
    flex-shrink: 0;
    font-size: 16px;
    margin-top: 1px;
}
#availability-notices .notice-body {
    flex: 1;
}
#availability-notices .notice-body strong {
    display: block;
    margin-bottom: 4px;
}
#availability-notices .notice-list {
    margin: 4px 0 0 0;
    padding-left: 18px;
}
#availability-notices .notice-list li {
    margin-bottom: 2px;
}
#availability-notices .notice-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    padding: 0;
    flex-shrink: 0;
}
#availability-notices .notice-dismiss:hover {
    opacity: 1;
}




/* instructor-course-overview page */

.syllabus-table td {
    background-color: unset;
    text-align: center;
}

.course-row {
    background-color: var(--white-color);
}

.course-row td {
    color: var(--blue-color);
}

.course-done-row {
    opacity: 0.5;
    cursor: default;
}

.course-partially-done-row{
    opacity: 0.8;
    cursor: default;
}

.course-data > li {
    margin-top: 20px;
}

.inner-content-for-avoiding-bootstrap-bug {
    margin: auto;
    padding: 10px 50px;
}

.course-description-btn::before {
    width: 1.25em;
    line-height: 0;
    content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
    transition: transform 0.35s ease;
    transform-origin: .5em 50%;
}

.course-description-btn[aria-expanded="true"]::before {
    transform: rotate(90deg);
}


/* instructor students page */

#studentModal .modal-body div{
    margin: 20px 0;
    border: 2px solid var(--white-color);
    border-radius: 15px;
    padding: 20px 5px;
}

#studentModal .modal-body .d-flex{
    gap: 10px;
}


/***************
INSTRUCTOR AVAILABILITY PAGE
 *********/

/* ── Base card ── */
.availability-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.availability-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.availability-card.has-pending {
    border-color: #ffc107;
}

/* ── Card header strip ── */
.availability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.availability-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Badges ── */
.locked-badge,
.pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.locked-badge {
    background: rgba(169,29,58,0.08);
    color: var(--primary-color);
}
.pending-badge {
    background: #fff3cd;
    color: #856404;
}

/* ── Pending notice bar ── */
.pending-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    background: #fffbea;
    border-bottom: 1px solid #ffe082;
}
.pending-notice i {
    color: #f59e0b;
    font-size: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}
.pending-notice-title {
    font-size: 13px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 2px;
}
.pending-notice-desc {
    font-size: 12px;
    color: #a07800;
    margin: 0;
    line-height: 1.4;
}

/* ── Slots list ── */
.slots-grid {
    padding: 8px 0;
}
.slot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.slot-item:last-child {
    border-bottom: none;
}
.slot-item:hover {
    background: #fafafa;
}
.slot-item.locked {
    background: #fff8f8;
}
.slot-item.locked:hover {
    background: #fff3f3;
}

/* lock icon column */
.slot-lock-icon {
    font-size: 13px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: var(--primary-color);
    opacity: 0.7;
}

/* day + time columns */
.slot-info {
    flex: 1;
    min-width: 0;
}
.slot-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slot-time {
    font-size: 12px;
    color: #868e96;
    display: block;
    margin-top: 1px;
}

/* action buttons inline */
.availability-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.availability-actions .btn {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    line-height: 1.4;
}

/* ── Record group separator inside a mode card ── */
.record-group {
    border-bottom: 2px solid #f0f0f0;
}
.record-group:last-child {
    border-bottom: none;
}
.record-group-footer {
    padding: 10px 20px;
    border-top: 1px dashed #e9ecef;
    border-bottom: 1px dashed #e9ecef;
    text-align: center;
}
.add-slot-btn {
    font-size: 13px;
    padding: 5px 13px;
    border-radius: 7px;
}

/* ── Create new link ── */
.create-new-link {
    display: flex;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 8px;
}
.create-new-link a {
    font-size: 13px;
}

/* ── Withdrawal modal tweaks ── */
#withdrawalModal .modal-header {
    background: var(--primary-color);
    color: var(--text-light);
    border-bottom: none;
}
#withdrawalModal .modal-title { font-weight: 600; }
#withdrawalModal .btn-close { filter: brightness(0) invert(1); }
#withdrawalModal .alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
#withdrawalModal .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}
#withdrawalModal .form-control {
    border-radius: 6px;
    border: 1px solid #dee2e6;
}
#withdrawalModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(169,29,58,0.2);
}
#withdrawalModal .locked-slots-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
}
#withdrawalModal .locked-slots-info h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}
#withdrawalModal .locked-slots-list {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    padding-left: 20px;
}



/********* absence_table *************/
 .absence-table-container {
     background: white;
     border-radius: 12px;
     box-shadow: 0 2px 8px rgba(0,0,0,0.1);
     overflow: hidden;
     margin: 20px 0;
 }

.absence-table-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--text-light);
    padding: 20px;
}

.absence-table-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
}

.absence-table {
    width: 100%;
    margin: 0;
}

.absence-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
}

.absence-table thead th {
    padding: 15px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.absence-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.absence-table tbody tr:hover {
    background-color: #f8f9fa;
}

.absence-table tbody tr:last-child {
    border-bottom: none;
}

.absence-table tbody td {
    padding: 15px;
    color: #495057;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-absent {
    background: #fee;
    color: var(--primary-color);
}

.status-late {
    background: #fff3cd;
    color: #856404;
}

.session-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
}

.table-empty {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .absence-table thead {
        display: none;
    }

    .absence-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
    }

    .absence-table tbody td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #f8f9fa;
    }

    .absence-table tbody td:last-child {
        border-bottom: none;
    }

    .absence-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-dark);
    }
}
