/* Main Stylesheet */
body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    /* Time column + 7 days */
    /* Rows will be generated dynamically or using specific height for time slots */
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 80vh;
    /* Adjust as needed */
    overflow-y: scroll;
}

.calendar-header {
    display: contents;
    font-weight: bold;
    text-align: center;
}

.calendar-header .day-col {
    padding: 10px;
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-col {
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    text-align: right;
    padding-right: 5px;
    font-size: 0.8rem;
    color: #6c757d;
}

.day-slot {
    border-right: 1px solid #f1f3f5;
    border-bottom: 1px solid #f1f3f5;
    position: relative;
    height: 40px;
    /* Represents one hour */
}

.shift-card {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: #e7f5ff;
    border: 1px solid #74c0fc;
    color: #1864ab;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.shift-card:hover {
    background-color: #d0ebff;
    z-index: 5;
}

/* Utility to position shifts based on time */
/* Example: top: calc( (StartHour - 6) * 60px + (StartMinute / 60 * 60px) ) */

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #0d6efd;
    /* Bootstrap primary */
}

/* Condensed Table */
.condensed-table {
    font-size: 0.8rem;
    width: auto !important;
    /* Shrink to fit content */
}

.condensed-table th,
.condensed-table td {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    vertical-align: middle;
    padding-right: 6px !important;
    vertical-align: middle;
    white-space: nowrap;
    /* Prevent wrapping */
}

/* Appointment Styles */
.appointments-row {
    display: contents;
    /* Part of the grid, or handled differently? Grid is tricky. */
    /* Actually dashboard grid is: 50px time + 7 days. */
    /* We want a sticky row below the day headers. */
}

.appointment-all-day-container {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 2px;
    z-index: 9;
    /* Below header (10) */
    position: sticky;
    top: 63px;
    /* Header height approx */
    min-height: 25px;
}

.appointment-card {
    background-color: #fff3cd;
    /* Warning/Yellowish */
    border: 1px solid #ffec99;
    color: #856404;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 2px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.appointment-time-card {
    position: absolute;
    left: 2px;
    right: 2px;
    /* Or share width */
    background-color: #fff3cd;
    border: 1px solid #ffec99;
    color: #856404;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
    /* Above shifts? or same? */
    cursor: pointer;
    overflow: hidden;
}

/* Appointment Colors */
.appt-blue {
    background-color: #7950f2 !important;
    /* Violet */
    color: white !important;
    border-color: #7950f2 !important;
}

.appt-green {
    background-color: #198754 !important;
    color: white !important;
    border-color: #198754 !important;
}

.appt-red {
    background-color: #fd7e14 !important;
    /* Orange */
    color: white !important;
    border-color: #fd7e14 !important;
}

.appt-yellow {
    background-color: #ffc107 !important;
    color: black !important;
    border-color: #ffc107 !important;
}

/* Specific styling overrides for time cards to keep them distinct but colored */
.appointment-time-card.appt-blue {
    background-color: #e5dbff !important;
    color: #5f3dc4 !important;
    border-left: 4px solid #7950f2 !important;
    border: 1px solid #d0bfff;
}

.appointment-time-card.appt-green {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border-left: 4px solid #198754 !important;
    border: 1px solid #badbcc;
}

.appointment-time-card.appt-red {
    background-color: #ffe8cc !important;
    color: #e8590c !important;
    border-left: 4px solid #fd7e14 !important;
    border: 1px solid #ffd8a8;
}

.appointment-time-card.appt-yellow {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border-left: 4px solid #ffc107 !important;
    border: 1px solid #ffec99;
}

.month-shift-card {
    background-color: #e7f5ff;
    border: 1px solid #74c0fc;
    color: #1864ab;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.month-shift-card:hover {
    background-color: #d0ebff;
}

.appt-pink {
    background-color: #d63384 !important;
    color: white !important;
    border-color: #d63384 !important;
}

.appointment-time-card.appt-pink {
    background-color: #fcc2d7 !important;
    color: #a61e4d !important;
    border-left: 4px solid #d63384 !important;
    border: 1px solid #f06595;
}

.appt-holiday {
    background-color: #343a40 !important;
    /* Dark Grey */
    color: white !important;
    border-color: #343a40 !important;
    font-weight: 500;
}

.appointment-time-card.appt-holiday {
    background-color: #e9ecef !important;
    color: #343a40 !important;
    border-left: 4px solid #343a40 !important;
    border: 1px solid #ced4da;
}