@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900&display=swap');

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.logo-picture{
    margin: 10px 10px;
}

.profile-image{
    margin: 15px 10px;
}

.logo-text, .sidenav-text{
    margin-left: 10px;
}

.profile-details {
    margin-top: 20px;
}

.swal2-container *:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important; 
   }

.icons-sidebar {
    width: 24px;
    margin: 15px 15px;
}

main .modal-content {
    background-color: #fff;
}

.navbar-custom {
    height: 70px;
}

.select {
    background-color: #001F3F;
}

.external-events{
    max-height: calc(100vh - 220px);
    min-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.fc-event-content {
    text-align: center;
}

.fc-event-title,
.fc-event-details {
    margin: 0;
}

.fc-event-section,
.fc-event-prof,
.fc-event-room {
    margin: 0;
    padding: 0;
}

.sidebar-name{
    color: rgb(200, 200, 200);
}

.sidebar-user{
    border-bottom-style: solid;
    color: #f8f9fa;
}

.fc-header-toolbar {
    display: none;
}

.fc-col-header-cell-cushion {
    font-size: 14px;
    margin: 10px;
    color: #001F3F;
}

.fc-col-header-cell-cushion:hover{
    text-decoration: none;
    cursor: default;
}

.calendar th {
    border: 1px solid #001F3F;
}

.fc-theme-standard td{
    border: 1px solid #001F3F;
}

.time-label{
    font-size: 14px;
    margin: 10px;
    color: #001F3F;
}

.fc-timegrid-slot-label-frame{
    padding: 2px;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid #001F3F;
    border-radius: 4px;
    display: flex;
    align-items: stretch;
    justify-content: space-evenly;
    height: 100%;
    background-color: #F7F7F7;
}

.fc-timegrid-slot-label {
    text-align: center; 
    align-items: center;
}

.fc-timegrid-event {
    display: flex;
    flex-direction: column;
    background-color: #001F3F;
    color: #FFF;
    padding: 4px;
    font-size: 12px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-event-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.fc-event, .fc-event-content {
    display: block !important;
    min-height: 32px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    text-align: center;
    padding: 2px 4px;
}

.fc-event-title {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-align: center;
    display: block !important;
}

.fc-event-details > div {
    font-size: 11px;
    line-height: 1.1;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-align: center;
    display: block !important;
}

.fc-event-section,
.fc-event-prof,
.fc-event-type {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .fc-timegrid-event {
        font-size: 10px;
    }
    .fc-event-title,
    .fc-event-section,
    .fc-event-prof,
    .fc-event-type {
        font-size: 10px;
    }
}

/* --- Custom layout for 1.5-hour and shorter events --- */
.fc-event.one-point-five, .fc-event.one-point-five .fc-event-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 32px !important;
    padding: 4px 8px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    text-align: left;
}

.fc-event.one-point-five .fc-event-title {
    flex: 2 1 60%;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-align: left !important;
    display: block !important;
}

.fc-event.one-point-five .fc-event-details {
    flex: 1 1 40%;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 0;
    margin: 0;
    padding: 0;
    font-size: 1em;
    line-height: 1.1;
    text-align: right !important;
}

.fc-event.one-point-five .fc-event-details > div {
    font-size: 1em;
    line-height: 1.1;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-align: right !important;
    display: block !important;
    margin: 0;
    padding: 0;
}

/* Reset for normal events to avoid layout breakage */
.fc-event:not(.one-point-five), .fc-event-content:not(.one-point-five) {
    display: block !important;
    text-align: center;
}

.fc-event {
    border: 1px solid #ccc;
    padding: 10px;
    color: #fff;
}

.ajs-message {
    border-radius: 10px !important;
}

.alertify-notifier .ajs-message.ajs-success{
    text-shadow: none !important;
    background-color: #4da261;
}

.alertify-notifier .ajs-message.ajs-error {
    text-shadow: none !important;
    background-color: #f40d30 !important;
}

.event-lec {
    background-color: #6D86A1;
    border-radius: 10px;
}

.event-lab {
    background-color: #001F3F;
    border-radius: 10px;
}

.event-split{
    background-color: #346292;
}

.event-title {
    font-weight: bold;
    font-size: 12px;
}

.event-details {
    margin-top: 5px;
    font-size: 11px;
    font-style: italic;
}

.fc-day-today .fc-timegrid-col-frame {
    background: #d1e8ff !important;
}

.event-split .fc-event-content {
    font-size: 12px;
    flex-direction: row;
}

.one-point-five .fc-event-details {
    font-size: 9px !important;
    text-align: right;
    line-height: 1.1;
}

.one-point-five .fc-event-section,
.one-point-five .fc-event-prof,
.one-point-five .fc-event-type {
    font-size: 9px !important;
    text-align: right;
    line-height: 1.1;
}

/* Responsive Chart.js canvas for dashboard */
.chart canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Sidebar mobile styles */
@media (max-width: 768px) {
    #sidebar {
        width: 240px !important;
        margin-left: -240px;
        transition: margin-left 0.3s ease-in-out;
        z-index: 1000;
    }
    .sidebar-content-col {
        width: 100% !important;
        max-width: 100vw;
        display: block !important;
        position: static !important;
        background: none !important;
        height: auto !important;
        margin-bottom: 1rem;
    }
    .sidebar-content-col .select,
    .sidebar-content-col .mb-3,
    .sidebar-content-col .d-flex {
        width: 100%;
        margin-bottom: 1rem;
    }
    .col-2.sidebar-content-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .table-responsive, .calendar {
        width: 100% !important;
        min-width: 350px;
        overflow-x: auto;
    }
    .mobile-hamburger {
        display: block !important;
        cursor: pointer;
        padding: 10px;
    }

    .mobile-hamburger i {
        font-size: 24px;
        color: #001F3F;
    }
}

@media (min-width: 769px) {
    .mobile-hamburger {
        display: none !important;
    }

    #sidebar {
        width: 60px;
        transition: width 0.3s ease-in-out;
    }

    #sidebar:hover {
        width: 240px;
    }

    #mainContent {
        margin-left: 60px;
        transition: margin-left 0.3s ease-in-out;
    }

    #sidebar:hover + #mainContent {
        margin-left: 240px;
    }

    .sidebar-content-col {
        display: block !important;
        position: relative;
        width: 16.666667%;
        max-width: 16.666667%;
        background: #f8f9fa;
        height: 100%;
    }
}

/* External events layout improvements */
.external-events .fc-event {
    text-align: left !important;
    padding: 12px 14px !important;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    font-size: 13px;
}
.external-events .event-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    text-align: left !important;
}
.external-events .event-details {
    margin-top: 0;
    font-size: 12px;
    text-align: left !important;
}
.external-events .event-details > div {
    font-size: 12px;
    line-height: 1.3;
    margin: 0 0 2px 0;
    text-align: left !important;
    font-weight: normal;
    display: block;
}
.external-events .event-label {
    font-weight: normal;
    margin-right: 4px;
}

.legend-box {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-left: 6px;
    margin-right: 10px;
    vertical-align: middle;
}

.col-2 {
    max-height: 100vh;
    overflow: hidden;
}

/* Dropdown menu item color scheme */
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:focus {
    background-color: #001f3F !important;
    color: #fff !important;
}

/* Form control focus styles */
.form-control:focus,
textarea:focus,
input:focus {
    border-color: #001f3f !important;
    box-shadow: 0 0 0 0.2rem rgba(0,31,63,0.15) !important;
    outline: none !important;
}

/* Textarea specific styles */
textarea.form-control {
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea.form-control:focus {
    border-color: #001f3f !important;
    box-shadow: 0 0 0 0.2rem rgba(0,31,63,0.15) !important;
}

/* Input specific styles */
input.form-control {
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input.form-control:focus {
    border-color: #001f3f !important;
    box-shadow: 0 0 0 0.2rem rgba(0,31,63,0.15) !important;
}


.dropdown-menu .dropdown-item:hover {
    background-color: #001f3fbd !important;
    color: #fff !important;
}

/* Select element color scheme */
select.form-select:focus, select.form-select:active {
    border-color: #001f3F !important;
    box-shadow: 0 0 0 0.2rem rgba(0,31,63,0.15) !important;
}
select.form-select option:hover, select.form-select option:focus {
    background-color: #001f3fbd !important;
    color: #fff !important;
}
select.form-select option:checked {
    background-color: #001f3F !important;
    color: #fff !important;
}

