/* Custom styles for the application */
body {
    font-family: 'Inter', sans-serif;
}

/* Custom animation for settings panel and modal */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Custom styles for draggable elements */
.dragging select {
    opacity: 0.5;
}

.drag-over {
    background-color: #e0f2fe !important;
}

.drag-ready {
    cursor: grab;
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}

.drag-ready select {
    pointer-events: none;
}

/* Hide the default select arrow */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Schedule table shift select - use monospace for consistent character width */
#schedule-table select,
#schedule-table select.shift-select {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* Fixed width for schedule day cells to prevent expansion */
#schedule-table td[data-day] {
    width: 2.5rem;
    min-width: 2.5rem;
    max-width: 2.5rem;
}

/* Ensure options in dropdown also use monospace */
#schedule-table select option {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

select[multiple] {
    -webkit-appearance: listbox;
    -moz-appearance: listbox;
    appearance: listbox;
}

/* Style for the sticky table headers and cells */
.sticky-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 10;
}

thead .sticky-col {
    z-index: 20;
}

.schedule-table-wrapper {
    position: relative;
    overflow: auto;
    --schedule-header-offset: 0px;
    --schedule-header-primary-height: 0px;
    --schedule-header-secondary-height: 0px;
}

.schedule-table-wrapper table {
    min-width: 100%;
}

#schedule-table {
    position: relative;
}

#schedule-table thead th {
    position: sticky;
    top: var(--schedule-header-offset, 0px);
    z-index: 25;
    background-color: #f3f4f6;
}

#schedule-table thead tr:nth-child(2) th {
    top: calc(var(--schedule-header-offset, 0px) + var(--schedule-header-primary-height, 0px));
    z-index: 24;
    background-color: #e5e7eb;
    height: var(--schedule-header-secondary-height, 5.5em);
    min-height: var(--schedule-header-secondary-height, 5.5em);
}

#schedule-table thead tr:nth-child(2) th .schedule-reminder-header-label {
    height: 100%;
    display: flex;
    align-items: center;
}

#schedule-table thead th.sticky-col {
    z-index: 30;
}

#schedule-table tbody td.sticky-col {
    background-color: #ffffff;
}

#schedule-table tbody tr:hover td.sticky-col {
    background-color: #f8fafc;
}

#schedule-table tfoot td.sticky-col {
    background-color: #e5e7eb;
}

/* Calendar reminder day styles */
.reminder-dot::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    border-radius: 9999px;
    background-color: #f59e0b;
    vertical-align: middle;
}

.reminder-clickable {
    cursor: pointer;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
    overflow: hidden;
}

.tab-content {
    transition: opacity 0.3s ease-in-out;
}

.sequence-violation-cell {
    box-shadow: inset 0 0 0 2px #9333ea;
    position: relative;
}

.sequence-violation-cell select {
    color: #dc2626 !important;
    font-weight: bold;
}

.sequence-violation-cell::after {
    content: '!';
    position: absolute;
    top: 2px;
    right: 4px;
    color: #dc2626;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    z-index: 1;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.employee-chart-container {
    position: relative;
    width: 100%;
}

#load-modal-results-table tr:hover {
    background-color: #f3f4f6;
}