/* Executive calendar — week/day hour grid (RTL-first, shared with TasksDashboard). */

.scheduler-wrap {
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    overflow: auto;
    background: #fff;
}

.scheduler-grid {
    direction: rtl;
    min-width: 320px;
    padding-inline: 3px;
    box-sizing: border-box;
}

.scheduler-header {
    display: grid;
    border-bottom: 1px solid #e6eaf0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 8;
}

.scheduler-header-cell {
    padding: 10px 8px;
    text-align: center;
    border-inline-start: 1px solid #eef2f7;
    font-weight: 600;
    font-size: 0.82rem;
    min-width: 0;
}

.scheduler-header-cell:first-child {
    border-inline-start: none;
}

.scheduler-header-cell.is-today {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
    box-shadow: inset 0 -3px 0 #fb923c;
}

.scheduler-span-row {
    display: grid;
    border-bottom: 1px solid #eef2f7;
    background: #fafcff;
    min-height: 36px;
    position: relative;
    isolation: isolate;
    align-items: center;
}

.scheduler-span-col {
    position: relative;
    border-inline-start: 1px solid #eef2f7;
    min-height: 36px;
    min-width: 0;
}

.scheduler-span-col:first-child {
    border-inline-start: none;
}

.scheduler-span-col.is-today {
    background: #fffaf3;
}

/* Grid host for continuous multi-day bars (same pattern as exec-month__span-host). */
.scheduler-span-host {
    z-index: 4;
    min-width: 0;
    align-self: center;
    height: 24px;
    margin-block: 4px;
    margin-inline: 2px;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
}

.scheduler-span-bar {
    height: 24px;
    color: #fff;
    font-size: 0.68rem;
    line-height: 24px;
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.scheduler-span-ctx-continuous {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: block !important;
}

.scheduler-span-ctx-continuous .scheduler-span-activator,
.scheduler-span-ctx-continuous .mud-menu-activator {
    width: 100%;
    height: 100%;
    display: block;
}

.scheduler-span-ctx-continuous .scheduler-span-bar {
    height: 100%;
}

.scheduler-time-col {
    border-inline-start: 1px solid #eef2f7;
    background: #fafcff;
    min-width: 70px;
    max-width: 70px;
    flex-shrink: 0;
}

.scheduler-time-cell {
    height: 52px;
    border-top: 1px solid #eef2f7;
    padding-top: 2px;
    font-size: 0.72rem;
    color: #667085;
    text-align: center;
    box-sizing: border-box;
}

.scheduler-body {
    display: grid;
    align-items: stretch;
    min-height: var(--exec-cal-scheduler-body-height, 676px);
}

.scheduler-day-col {
    position: relative;
    border-inline-start: 1px solid #eef2f7;
    background: #fff;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.scheduler-day-col:first-child {
    border-inline-start: none;
}

.scheduler-day-col.is-today {
    background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.scheduler-day-col > .mud-menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    height: 100%;
}

.scheduler-day-col-activator {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    height: 100%;
}

.scheduler-day-track {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100%;
}

.scheduler-hour-line {
    height: 52px;
    border-top: 1px solid #f1f5f9;
    box-sizing: border-box;
}

.scheduler-holiday {
    position: absolute;
    top: 4px;
    inset-inline: 6px;
    z-index: 3;
    max-width: calc(100% - 12px);
}

.scheduler-holiday-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.scheduler-holiday-chip {
    max-width: 100%;
    white-space: normal;
    height: auto;
    line-height: 1.25;
}

.scheduler-holiday-thumb {
    width: 16px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    margin-inline-end: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.scheduler-holiday-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-inline: 2px;
}

.scheduler-holiday-meta-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.68rem;
    line-height: 1.25;
    color: #64748b;
    min-width: 0;
}

.scheduler-holiday-meta-line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.scheduler-holiday-reason {
    color: #b42318;
}

.scheduler-holiday-source {
    color: #124b7a;
}

.scheduler-event-host {
    position: absolute;
    z-index: 5;
    box-sizing: border-box;
    padding-inline: 3px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.scheduler-event-host > .mud-menu {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.scheduler-event-ctx {
    width: 100%;
    height: 100%;
    display: block !important;
    min-width: 0;
    position: relative;
}

.scheduler-event-ctx .scheduler-event,
.scheduler-event-host .scheduler-event {
    position: relative;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.scheduler-event {
    border-radius: 8px;
    padding: 4px 6px;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.25;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    cursor: pointer;
}

.scheduler-event-time {
    opacity: 0.92;
    font-size: 0.67rem;
    display: block;
}

.scheduler-event-meta {
    opacity: 0.88;
    font-size: 0.66rem;
    display: block;
}

.scheduler-event.event-meeting {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
}

.scheduler-event.event-reminder {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
}

.scheduler-event.event-task {
    background: linear-gradient(135deg, #475569, #334155) !important;
}

.scheduler-exam-marker {
    position: absolute;
    top: 30px;
    inset-inline: 4px;
    z-index: 4;
    max-width: calc(100% - 8px);
    border-radius: 8px;
    padding: 2px 6px;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.3;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
    animation: exec-cal-exam-blink 1.1s ease-in-out infinite;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@keyframes exec-cal-exam-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.75);
    }
    50% {
        opacity: 0.35;
        box-shadow: 0 0 2px rgba(245, 158, 11, 0.35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scheduler-exam-marker {
        animation: none;
    }
}
