/* -------------------- Datepicker -------------------- */
#ui-datepicker-div {
    display: none;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
    border-radius: 0.5rem;
    padding: 0.5rem;
    z-index: 5 !important;
}

/* Header */
.ui-datepicker-header a.ui-corner-all {
    cursor: pointer;
    position: absolute;
    top: 0;
    width: 2rem;
    height: 2rem;
    margin: 0.5rem;
    border-radius: 0.25rem;
    transition: 0.3s all;
}
.ui-datepicker-header a.ui-corner-all:hover {
    background-color: #eceff1;
}
.ui-datepicker-header a.ui-state-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.ui-datepicker-header a.ui-datepicker-prev {
    left: 0;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgdmlld0JveD0iMCAwIDEzIDEzIj48cGF0aCBmaWxsPSIjNDI0NzcwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjI4OCA2LjI5NkwzLjIwMiAyLjIxYS43MS43MSAwIDAgMSAuMDA3LS45OTljLjI4LS4yOC43MjUtLjI4Ljk5OS0uMDA3TDguODAzIDUuOGEuNjk1LjY5NSAwIDAgMSAuMjAyLjQ5Ni42OTUuNjk1IDAgMCAxLS4yMDIuNDk3bC00LjU5NSA0LjU5NWEuNzA0LjcwNCAwIDAgMS0xLS4wMDcuNzEuNzEgMCAwIDEtLjAwNi0uOTk5bDQuMDg2LTQuMDg2eiIvPjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-size: 0.5rem;
    background-position: 50%;
    transform: rotate(180deg);
}
.ui-datepicker-header a.ui-datepicker-next {
    right: 0;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgdmlld0JveD0iMCAwIDEzIDEzIj48cGF0aCBmaWxsPSIjNDI0NzcwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjI4OCA2LjI5NkwzLjIwMiAyLjIxYS43MS43MSAwIDAgMSAuMDA3LS45OTljLjI4LS4yOC43MjUtLjI4Ljk5OS0uMDA3TDguODAzIDUuOGEuNjk1LjY5NSAwIDAgMSAuMjAyLjQ5Ni42OTUuNjk1IDAgMCAxLS4yMDIuNDk3bC00LjU5NSA0LjU5NWEuNzA0LjcwNCAwIDAgMS0xLS4wMDcuNzEuNzEgMCAwIDEtLjAwNi0uOTk5bDQuMDg2LTQuMDg2eiIvPjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-size: 0.5rem;
    background-position: 50%;
}
.ui-datepicker-header a > span {
    display: none;
}

.ui-datepicker-title {
    text-align: center;
    line-height: 2rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Table */
.ui-datepicker-calendar thead th {
    padding: 0.25rem 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 400;
    color: #78909c;
}
.ui-datepicker-calendar tbody td {
    width: 2.5rem;
    text-align: center;
    padding: 0;
}
.ui-datepicker-calendar tbody td a,
.ui-datepicker-calendar tbody td span {
    display: block;
    border-radius: 0.25rem;
    line-height: 2rem;
    font-size: 0.875rem;
    transition: 0.3s all;
}
.ui-datepicker-calendar tbody td a {
    color: #546e7a;
    text-decoration: none;
}
.ui-datepicker-calendar tbody td a:hover {
    background-color: #e0f2f1;
}
.ui-datepicker-calendar tbody td a.ui-state-active {
    background-color: var(--brand-600);
    color: white;
}

/* Highlight today */
.ui-datepicker td a.ui-state-highlight {
    border: 1px solid var(--brand-600);
}

/* Disabled dates */
.ui-datepicker-calendar tbody td.ui-state-disabled span,
.ui-datepicker-calendar tbody td.ui-state-disabled a,
.ui-datepicker-calendar tbody td.ui-datepicker-unselectable span,
.ui-datepicker-calendar tbody td.ui-datepicker-unselectable a {
    color: #b0bec5;
    background: transparent !important;
    border-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}
.ui-datepicker-calendar tbody td.ui-state-disabled a:hover,
.ui-datepicker-calendar tbody td.ui-datepicker-unselectable a:hover {
    background: transparent !important;
}
.ui-datepicker-other-month .ui-state-default {
    color: #cfd8dc;
}

/* -------------------- Shared Calendar Layout -------------------- */
#calendar {
    min-height: 500px;
    position: relative;
}

.month-grid,
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 0;
    border-right: 0;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.month-grid > div {
    border: 1px solid #dce0e5;
    transition: 0.3s all ease-in-out;
}
.month-grid > div:hover {
    background-color: #f0f7ff;
    box-shadow: 0 0 0 3px #3348ff inset;
    border: 1px solid #3348ff;
}

/* -------------------- Day Cell -------------------- */
.day-cell {
    background: white;
    min-height: 157px;
    padding: 5px;
    position: relative;
    border: 1px solid #dce0e5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.day-cell .day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

/* -------------------- Events -------------------- */
.event {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    font-family: Poppins, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 18px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 2px;
    width: 87px;
    color: #fff;
}
.event.green {
    background-color: #28a745;
}
.event.orange {
    background-color: #db6e00;
}
.event.blue {
    background-color: #007bff;
}
.event.purple {
    background-color: #6f42c1;
}
.event.red {
    background-color: #dc3545;
}
.event.yellow {
    background-color: #ffc107;
    color: #212529;
}
.event.pink {
    background-color: #e83e8c;
}

.event-text {
    font-weight: 600;
    font-size: 12px;
    line-height: 18px;
    padding: 4px 6px;
    border-radius: 6px;
    background-color: #00a81c;
    color: var(--white-colour);
    width: max-content;
    overflow: hidden;
    white-space: nowrap;
}

/* -------------------- Day View -------------------- */
.day-view {
    display: flex;
    border-top: 1px solid #b6c1ca;
    border-radius: 8px;
    overflow: hidden;
}
.time-column {
    width: 80px;
    text-align: end;
    font-size: 12px;
    color: #666;
}
.time-column div {
    height: 60px;
    padding: 8px;
    border: 1px solid #b6c1ca;
    border-top: 0;
    background-color: #f6faf9;
}
.events-column {
    flex: 1;
    position: relative;
    background: white;
}
.event-box {
    position: absolute;
    background: green;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 10px;
    overflow: hidden;
}
.event-box.orange {
    background: orange;
}
.event-box.blue {
    background: #007bff;
}
.event-box.green {
    background: #28a745;
}
.event-box.purple {
    background: #6f42c1;
}
#currentTimeLine {
    position: absolute;
    height: 1px;
    background: red;
    width: 100%;
    z-index: 10;
}

/* -------------------- List View -------------------- */
.list-view .list-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.list-view .event-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.list-view .event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.list-view .event-header strong {
    flex: 1;
    font-size: 1.1rem;
}
.list-view .status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}
.list-view .status-2 {
    background-color: #d4edda;
    color: #155724;
}
.list-view .status-4 {
    background-color: #fff3cd;
    color: #856404;
}
.list-view .event-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

/* -------------------- Weekday Names -------------------- */
.day__name {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.day__name > div {
    border: 1px solid #dce0e5;
    background-color: #f6faf9;
    padding: 9px 12px;
    color: var(--dark-gray-700);
    border-bottom: 0;
}

/* -------------------- States -------------------- */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}
.no-events {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

.classified-slots {
    margin-bottom: 4px;
}

.classified-title {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.time-slot-event {
    display: block;
    background-color: #aaa;
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    margin-bottom: 2px;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.time-slot-event:hover {
    background-color: #5a6268;
}
.time-slot-event:active {
    background-color: #007bff; /* blue like events */
    transform: scale(0.98);
}

/* event-popup */

.event-popup .modal-content {
    border-radius: 12px;
}

.event-popup .modal-header-custom {
    background-color: #37e39f;
    color: white;
    padding: 15px 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.event-popup .status-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 8px;
}

.event-popup .status-box .text-success {
    font-weight: bold;
}

.event-popup .note-input {
    font-size: 14px;
    color: #6c757d;
}

.event-popup .btn-block-time {
    background-color: #e53935;
    color: white;
    font-weight: 600;
    width: 50%;
    border-radius: 0;
    border-bottom-left-radius: 10px;
    padding: 15px 0;
}

.event-popup .btn-unblock-time {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    width: 50%;
    border-radius: 0;
    border-bottom-left-radius: 10px;
    padding: 15px 0;
}

.event-popup .btn-close-modal {
    background-color: #bdbdbd;
    color: white;
    font-weight: 600;
    width: 50%;
    border-radius: 0;
    border-bottom-right-radius: 10px;
    padding: 15px 0;
}
