/**
 * Availability Calendar Styles
 *
 * Modern, responsive calendar component for date selection with availability display.
 */

/* Base container */
.sz-calendar {
    --calendar-bg: #ffffff;
    --calendar-border: #e5e7eb;
    --calendar-text: #1f2937;
    --calendar-text-muted: #6b7280;
    --calendar-primary: #b8860b;
    --calendar-primary-light: rgba(184, 134, 11, 0.1);
    --calendar-available: #10b981;
    --calendar-limited: #f59e0b;
    --calendar-unavailable: #ef4444;
    --calendar-today-bg: #fef3c7;
    --calendar-selected-bg: var(--calendar-primary);
    --calendar-rental-bg: rgba(184, 134, 11, 0.15);
    --calendar-hover-bg: #f3f4f6;
    --calendar-disabled: #d1d5db;
    --calendar-radius: 0.5rem;
    --calendar-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    position: relative;
    background: var(--calendar-bg);
    border: 1px solid var(--calendar-border);
    border-radius: var(--calendar-radius);
    box-shadow: var(--calendar-shadow);
    padding: 1rem;
    font-family: inherit;
    max-width: 400px;
    margin: 0 auto;
}

/* Dark theme support - system preference */
@media (prefers-color-scheme: dark) {
    .sz-calendar:not([data-theme="light"]) {
        --calendar-bg: #1f2937;
        --calendar-border: #374151;
        --calendar-text: #f9fafb;
        --calendar-text-muted: #9ca3af;
        --calendar-hover-bg: #374151;
        --calendar-disabled: #4b5563;
        --calendar-today-bg: rgba(254, 243, 199, 0.2);
    }
}

/* Dark theme support - explicit theme selector */
[data-theme="dark"] .sz-calendar {
    --calendar-bg: #1f2937;
    --calendar-border: #374151;
    --calendar-text: #f9fafb;
    --calendar-text-muted: #9ca3af;
    --calendar-hover-bg: #374151;
    --calendar-disabled: #4b5563;
    --calendar-today-bg: rgba(254, 243, 199, 0.2);
}

[data-theme="dark"] .sz-calendar-loading {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .sz-calendar-day-weekend {
    color: #f87171;
}

/* Header with navigation */
.sz-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--calendar-border);
}

.sz-calendar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--calendar-text);
}

.sz-calendar-month {
    text-transform: capitalize;
}

.sz-calendar-year {
    color: var(--calendar-text-muted);
}

.sz-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--calendar-text);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.sz-calendar-nav:hover:not(:disabled) {
    background: var(--calendar-hover-bg);
}

.sz-calendar-nav:disabled {
    color: var(--calendar-disabled);
    cursor: not-allowed;
}

.sz-calendar-nav svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Weekday headers */
.sz-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.sz-calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--calendar-text-muted);
    text-transform: uppercase;
    padding: 0.5rem 0;
}

/* Days grid */
.sz-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

/* Day cell */
.sz-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--calendar-text);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.sz-calendar-day:hover:not(:disabled):not(.sz-calendar-day-empty) {
    background: var(--calendar-hover-bg);
}

.sz-calendar-day:focus {
    outline: 2px solid var(--calendar-primary);
    outline-offset: 2px;
}

.sz-calendar-day-empty {
    cursor: default;
}

/* Day states */
.sz-calendar-day-today {
    background: var(--calendar-today-bg);
    font-weight: 700;
}

.sz-calendar-day-selected {
    background: var(--calendar-selected-bg) !important;
    color: white !important;
    font-weight: 700;
}

.sz-calendar-day-rental {
    background: var(--calendar-rental-bg);
    border-radius: 0;
}

.sz-calendar-day-rental:first-of-type,
.sz-calendar-day-rental.sz-calendar-day-selected {
    border-radius: 50% 0 0 50%;
}

.sz-calendar-day-rental:last-of-type {
    border-radius: 0 50% 50% 0;
}

.sz-calendar-day-disabled {
    color: var(--calendar-disabled);
    cursor: not-allowed;
}

/* Availability indicators */
.sz-calendar-day-available::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--calendar-available);
}

.sz-calendar-day-limited::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--calendar-limited);
}

.sz-calendar-day-unavailable::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--calendar-unavailable);
}

.sz-calendar-day-selected::after {
    background: white;
}

/* Weekend styling */
.sz-calendar-day-weekend {
    color: var(--calendar-unavailable);
}

/* Loading state for day without data */
.sz-calendar-day-loading {
    opacity: 0.5;
}

.sz-calendar-day-loading::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--calendar-disabled);
}

/* Legend */
.sz-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--calendar-border);
}

.sz-calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--calendar-text-muted);
}

.sz-calendar-legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.sz-calendar-legend-available {
    background: var(--calendar-available);
}

.sz-calendar-legend-limited {
    background: var(--calendar-limited);
}

.sz-calendar-legend-unavailable {
    background: var(--calendar-unavailable);
}

/* Rental period info */
.sz-calendar-rental-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--calendar-primary-light);
    border-radius: var(--calendar-radius);
}

.sz-calendar-rental-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--calendar-text);
    margin-bottom: 0.75rem;
    text-align: center;
}

.sz-calendar-rental-dates {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.sz-calendar-rental-date {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--calendar-bg);
    border-radius: 0.375rem;
}

.sz-calendar-rental-event {
    background: var(--calendar-primary);
    color: white;
}

.sz-calendar-rental-event .sz-calendar-rental-label,
.sz-calendar-rental-event .sz-calendar-rental-value {
    color: white;
}

.sz-calendar-rental-label {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--calendar-text-muted);
    margin-bottom: 0.25rem;
}

.sz-calendar-rental-value {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--calendar-text);
}

/* Loading state */
.sz-calendar-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--calendar-radius);
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.sz-calendar-is-loading .sz-calendar-loading {
    display: flex;
}

.sz-calendar-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--calendar-border);
    border-top-color: var(--calendar-primary);
    border-radius: 50%;
    animation: sz-calendar-spin 0.8s linear infinite;
}

@keyframes sz-calendar-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .sz-calendar {
        padding: 0.75rem;
    }

    .sz-calendar-day {
        font-size: 0.75rem;
    }

    .sz-calendar-nav {
        width: 2rem;
        height: 2rem;
    }

    .sz-calendar-rental-dates {
        flex-direction: column;
    }

    .sz-calendar-rental-date {
        padding: 0.375rem;
    }

    .sz-calendar-legend {
        gap: 0.5rem;
    }
}

/* Tooltip for hover info (optional enhancement) */
.sz-calendar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--calendar-text);
    color: var(--calendar-bg);
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.sz-calendar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--calendar-text);
}

.sz-calendar-day:hover .sz-calendar-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Inline calendar variant (for embedding in forms) */
.sz-calendar--inline {
    box-shadow: none;
    border: none;
    max-width: none;
}

/* Compact variant */
.sz-calendar--compact {
    padding: 0.5rem;
}

.sz-calendar--compact .sz-calendar-day {
    font-size: 0.75rem;
}

.sz-calendar--compact .sz-calendar-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.sz-calendar--compact .sz-calendar-legend {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

/* Rental Period Info (used in checkout) */
.rental-period-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: var(--calendar-radius, 0.5rem);
}

.rental-period-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--calendar-text, #1f2937);
    margin-bottom: 0.75rem;
}

.rental-period-header svg {
    color: var(--calendar-primary, #b8860b);
}

.rental-period-dates {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.rental-date {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: white;
    border-radius: 0.375rem;
}

.rental-date-event {
    background: var(--calendar-primary, #b8860b);
    color: white;
}

.rental-date-event .rental-date-label,
.rental-date-event .rental-date-value {
    color: white;
}

.rental-date-label {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--calendar-text-muted, #6b7280);
    margin-bottom: 0.25rem;
}

.rental-date-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--calendar-text, #1f2937);
}

@media (max-width: 480px) {
    .rental-period-dates {
        flex-direction: column;
    }

    .rental-date {
        padding: 0.5rem;
    }
}

/* ============================================================================
   Admin Calendar - Multi-View System
   ============================================================================ */

/* Admin Calendar Wrapper */
.admin-calendar-wrapper {
    position: relative;
}

/* Admin Calendar - Month View Grid */
.admin-calendar {
    background: var(--bg-primary);
    border-radius: var(--rounded-xl, 0.75rem);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    width: 100%;
}

.admin-calendar .admin-calendar-grid,
.admin-calendar.calendar-month-compact .admin-calendar-grid,
.calendar-month-compact .admin-calendar-grid,
#adminCalendar .admin-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-auto-rows: auto;
    gap: 1px;
    background: var(--color-gray-200);
    width: 100%;
    box-sizing: border-box;
}

.admin-calendar .admin-calendar-header-cell {
    padding: 0.5rem 0.375rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.admin-calendar .admin-calendar-cell {
    min-height: 75px;
    padding: 0.375rem;
    background: var(--bg-primary);
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    flex-direction: column;
}

.admin-calendar .admin-calendar-cell:hover {
    background: var(--bg-secondary);
}

.admin-calendar .admin-calendar-cell.other-month {
    background: var(--bg-secondary);
}

.admin-calendar .admin-calendar-cell.other-month .calendar-day-number {
    color: var(--text-muted);
}

.admin-calendar .admin-calendar-cell.today {
    background: rgba(var(--color-primary-rgb, 255, 112, 82), 0.08);
}

.admin-calendar .admin-calendar-cell.today .calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-weight: 700;
}

.admin-calendar .admin-calendar-cell.blocked {
    background: rgba(239, 68, 68, 0.08);
}

/* Weekend styling for month view */
.admin-calendar .admin-calendar-cell.weekend {
    background: rgba(239, 68, 68, 0.04);
}

.admin-calendar .admin-calendar-cell.weekend .calendar-day-number {
    color: #dc2626;
}

/* Holiday styling for month view */
.admin-calendar .admin-calendar-cell.holiday {
    background: rgba(251, 191, 36, 0.12) !important;
}

.admin-calendar .admin-calendar-cell.holiday .calendar-day-number {
    color: #d97706;
    font-weight: 700;
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.calendar-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    cursor: grab;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.calendar-event.reservation {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.calendar-event.event-day {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
    border-left: 3px solid #10b981;
}

.calendar-event.blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.calendar-event-more-pill {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.125rem;
    cursor: pointer;
}

.calendar-event-more-pill:hover {
    color: var(--color-primary);
}

/* Day Cell Tooltip - shows all reservations on hover */
.admin-calendar-cell {
    position: relative;
}

.calendar-day-tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.6875rem;
    line-height: 1.5;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}

.admin-calendar-cell:hover .calendar-day-tooltip {
    opacity: 1;
    visibility: visible;
}

.calendar-day-tooltip-line {
    padding: 1px 0;
}

.calendar-day-tooltip-line + .calendar-day-tooltip-line {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Keep tooltip visible when near edges */
.admin-calendar-cell:first-child .calendar-day-tooltip,
.admin-calendar-cell:nth-child(2) .calendar-day-tooltip {
    left: 0;
    transform: none;
}

.admin-calendar-cell:first-child .calendar-day-tooltip::after,
.admin-calendar-cell:nth-child(2) .calendar-day-tooltip::after {
    left: 20px;
    transform: none;
}

.admin-calendar-cell:last-child .calendar-day-tooltip,
.admin-calendar-cell:nth-last-child(2) .calendar-day-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

.admin-calendar-cell:last-child .calendar-day-tooltip::after,
.admin-calendar-cell:nth-last-child(2) .calendar-day-tooltip::after {
    left: auto;
    right: 20px;
    transform: none;
}

/* View Toggle */
.calendar-view-toggle {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-gray-200);
}

.calendar-view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-view-btn:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.calendar-view-btn.active {
    color: var(--color-white);
    background: var(--color-primary);
}

.calendar-view-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   Year View - 12 mini calendars in 4x3 grid
   ============================================================================ */

.calendar-year-container {
    padding: 1rem;
}

.calendar-year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-year-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-year-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .calendar-year-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .calendar-year-grid {
        grid-template-columns: 1fr;
    }
}

/* Mini Month */
.calendar-mini-month {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--color-gray-200);
}

.calendar-mini-month:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.calendar-mini-month-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.calendar-mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 0.25rem;
}

.calendar-mini-weekday {
    text-align: center;
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.calendar-mini-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.calendar-mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: var(--text-secondary);
    border-radius: 2px;
    position: relative;
}

.calendar-mini-day.other-month {
    color: var(--text-muted);
    opacity: 0.5;
}

.calendar-mini-day.today {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
}

.calendar-mini-day.has-reservation {
    background: rgba(59, 130, 246, 0.2);
}

.calendar-mini-day.has-event {
    background: rgba(16, 185, 129, 0.3);
}

.calendar-mini-day.blocked {
    background: rgba(239, 68, 68, 0.2);
}

.calendar-mini-day.weekend {
    color: #dc2626;
    font-weight: 600;
}

.calendar-mini-day.holiday {
    background: rgba(251, 191, 36, 0.3) !important;
    color: #92400e;
    font-weight: 600;
}

.calendar-mini-day.delivery {
    border-left: 2px solid #3b82f6;
}

.calendar-mini-day.return {
    border-right: 2px solid #f97316;
}

/* ============================================================================
   Week View - Timeline with products as rows
   ============================================================================ */

.calendar-week-container {
    padding: 1rem;
    overflow-x: auto;
}

.calendar-week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-week-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-week-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-week-grid {
    min-width: 800px;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Week Header Row */
.calendar-week-header-row {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--color-gray-200);
}

.calendar-week-header-cell {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-week-header-cell.today {
    background: rgba(var(--color-primary-rgb), 0.1);
}

.calendar-week-header-cell.weekend {
    background: rgba(239, 68, 68, 0.08);
}

.calendar-week-header-cell.weekend .day-number {
    color: #dc2626;
}

.calendar-week-header-cell.holiday {
    background: rgba(251, 191, 36, 0.15);
}

.calendar-week-header-cell.holiday .day-number {
    color: #d97706;
}

.calendar-week-header-cell .day-number {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-week-header-cell.today .day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
}

/* Product Row */
.calendar-week-product-row {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    border-bottom: 1px solid var(--color-gray-200);
}

.calendar-week-product-row:last-child {
    border-bottom: none;
}

.calendar-week-product-cell {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-right: 1px solid var(--color-gray-200);
}

.calendar-week-product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.calendar-week-product-stock {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Day Cell in Week View */
.calendar-week-day-cell {
    padding: 0.375rem;
    min-height: 70px;
    background: var(--bg-primary);
    border-right: 1px solid var(--color-gray-200);
    position: relative;
    transition: background-color 0.2s;
}

.calendar-week-day-cell:last-child {
    border-right: none;
}

.calendar-week-day-cell:hover {
    background: var(--bg-secondary);
}

.calendar-week-day-cell.today {
    background: rgba(var(--color-primary-rgb), 0.05);
}

.calendar-week-day-cell.blocked {
    background: rgba(239, 68, 68, 0.1);
}

.calendar-week-day-cell.weekend {
    background: rgba(239, 68, 68, 0.05);
}

.calendar-week-day-cell.holiday {
    background: rgba(251, 191, 36, 0.1);
}

.calendar-week-day-cell.drop-target {
    background: rgba(59, 130, 246, 0.1);
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}

/* Reservation Bar */
.calendar-reservation-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    cursor: grab;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-reservation-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-reservation-bar.rental {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.calendar-reservation-bar.event-day {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
    border-left: 3px solid #10b981;
}

.calendar-reservation-bar.start-day {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.calendar-reservation-bar.end-day {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.calendar-reservation-bar.span {
    border-radius: 0;
}

/* ============================================================================
   Compact Month View (Enhanced Existing)
   ============================================================================ */

.calendar-month-compact .admin-calendar-cell {
    min-height: 70px;
    padding: 0.375rem;
}

.calendar-month-compact .calendar-day-number {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.calendar-month-compact .calendar-events {
    gap: 2px;
}

/* Responsive adjustments for month view */
@media (max-width: 768px) {
    .calendar-month-compact .admin-calendar-cell {
        min-height: 60px;
        padding: 0.25rem;
    }

    .calendar-month-compact .calendar-day-number {
        font-size: 0.75rem;
    }

    .calendar-month-compact .calendar-event {
        font-size: 0.5625rem;
        padding: 0.125rem 0.25rem;
    }
}

.calendar-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.calendar-event-pill.reservation {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.calendar-event-pill.event-day {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.calendar-event-pill.blocked {
    background: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

[data-theme="dark"] .calendar-event-pill.reservation {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

[data-theme="dark"] .calendar-event-pill.event-day {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

[data-theme="dark"] .calendar-event-pill.blocked {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ============================================================================
   Drag & Drop States
   ============================================================================ */

.calendar-dragging {
    opacity: 0.6;
    cursor: grabbing !important;
}

.calendar-dragging * {
    cursor: grabbing !important;
}

.calendar-drop-target {
    background: rgba(59, 130, 246, 0.1) !important;
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}

.calendar-drop-valid {
    background: rgba(16, 185, 129, 0.1) !important;
    outline-color: #10b981;
}

.calendar-drop-invalid {
    background: rgba(239, 68, 68, 0.1) !important;
    outline-color: #ef4444;
}

.calendar-drag-ghost {
    position: fixed;
    z-index: var(--z-tooltip, 1070);
    pointer-events: none;
    padding: 0.5rem 1rem;
    background: var(--color-primary, #b8860b);
    color: #ffffff;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translate(-50%, -50%);
}

/* ============================================================================
   Order Edit Modal - Compact Version
   ============================================================================ */

.order-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop, 1040);
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.order-edit-modal.active {
    display: flex;
}

.order-edit-content {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.order-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1rem;
    background: linear-gradient(90deg, var(--color-primary) 0%, rgba(255, 112, 82, 0.1) 100%);
    border-bottom: 1px solid var(--color-gray-200);
}

.order-edit-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.order-edit-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: white;
    border-radius: var(--rounded-md);
    line-height: 1;
}

.order-edit-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Tab Navigation - Compact */
.order-edit-tabs {
    display: flex;
    gap: 0.125rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--color-gray-200);
    overflow-x: auto;
}

.order-edit-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.order-edit-tab:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.order-edit-tab.active {
    color: var(--color-white);
    background: var(--color-primary);
}

.order-edit-tab svg {
    width: 14px;
    height: 14px;
}

/* Tab Content - Compact */
.order-edit-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.875rem;
}

.order-edit-tab-content {
    display: none;
}

.order-edit-tab-content.active {
    display: block;
}

/* Rental Period Preview - Compact */
.rental-period-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

.rental-period-preview-item {
    flex: 1;
    text-align: center;
}

.rental-period-preview-label {
    display: block;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.rental-period-preview-value {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rental-period-preview-arrow {
    color: var(--text-muted);
}

/* Rental Days Controls - Compact */
.rental-days-controls {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.rental-days-control {
    flex: 1;
}

.rental-days-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.rental-days-input {
    width: 100%;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.375rem;
    text-align: center;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Product Card in Modal - Compact */
.order-product-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--color-gray-200);
    margin-bottom: 0.5rem;
}

.order-product-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.375rem;
    background: var(--bg-tertiary, #f3f4f6);
}

.order-product-info {
    flex: 1;
}

.order-product-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.order-product-price {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.order-product-actions {
    display: flex;
    gap: 0.5rem;
}

/* Addons List - Compact */
.order-addons-list {
    margin-top: 0.625rem;
}

.order-addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.375rem;
    margin-bottom: 0.375rem;
}

.order-addon-name {
    font-size: 0.75rem;
    color: var(--text-primary);
}

.order-addon-price {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.order-addon-remove {
    background: none;
    border: none;
    color: var(--color-error);
    cursor: pointer;
    padding: 0.25rem;
}

/* Price Summary - Compact */
.order-price-summary {
    margin-top: 0.75rem;
    padding: 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
}

.order-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.order-price-row.total {
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-gray-300);
    margin-top: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
}

.order-price-change {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-price-change.positive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.order-price-change.negative {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* History Timeline - Compact */
.order-history-timeline {
    margin-top: 0.625rem;
}

.order-history-item {
    display: flex;
    gap: 0.625rem;
    padding-bottom: 0.625rem;
    border-left: 2px solid var(--color-gray-200);
    margin-left: 0.375rem;
    padding-left: 0.75rem;
    position: relative;
}

.order-history-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 6px;
    height: 6px;
    background: var(--color-gray-400);
    border-radius: 50%;
}

.order-history-item:last-child {
    border-left-color: transparent;
}

.order-history-content {
    flex: 1;
}

.order-history-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.order-history-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.order-history-changes {
    margin-top: 0.375rem;
    padding: 0.375rem;
    background: var(--bg-tertiary);
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-primary);
}

/* Footer - Compact */
.order-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--color-gray-200);
}

/* ============================================================================
   Move Confirmation Dialog
   ============================================================================ */

.move-confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal, 1050);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.move-confirm-dialog.active {
    display: flex;
}

.move-confirm-content {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
}

.move-confirm-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.move-confirm-dates {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.move-confirm-date {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
}

.move-confirm-date-label {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.move-confirm-date-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.move-confirm-arrow {
    color: var(--color-primary);
}

.move-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================================================
   Loading State
   ============================================================================ */

.calendar-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

[data-theme="dark"] .calendar-loading-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.calendar-loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: calendar-spin 0.8s linear infinite;
}

@keyframes calendar-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   Dark Mode Support for Admin Calendar
   Uses [data-theme="dark"] to match app's theme system
   Most styles are handled automatically via CSS variables from variables.css
   These are additional overrides for elements with hardcoded RGBA colors
   ============================================================================ */

/* Dark mode overrides for elements that use RGBA or need special handling */
[data-theme="dark"] .calendar-event.reservation {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

[data-theme="dark"] .calendar-event.event-day {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

[data-theme="dark"] .calendar-event.blocked {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

[data-theme="dark"] .calendar-mini-day.has-reservation {
    background: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .calendar-mini-day.has-event {
    background: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .calendar-mini-day.blocked {
    background: rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .calendar-reservation-bar.rental {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

[data-theme="dark"] .calendar-reservation-bar.event-day {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

[data-theme="dark"] .admin-calendar-cell.today {
    background: rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .admin-calendar-cell.blocked {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .calendar-week-day-cell.blocked {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .calendar-drop-target {
    background: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] .calendar-drop-valid {
    background: rgba(16, 185, 129, 0.2) !important;
}

[data-theme="dark"] .calendar-drop-invalid {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* Legacy prefers-color-scheme support for browsers not using data-theme */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .calendar-loading-overlay {
        background: rgba(0, 0, 0, 0.7);
    }

    :root:not([data-theme="light"]) .calendar-event.reservation {
        background: rgba(59, 130, 246, 0.25);
        color: #93c5fd;
    }

    :root:not([data-theme="light"]) .calendar-event.event-day {
        background: rgba(16, 185, 129, 0.25);
        color: #6ee7b7;
    }

    :root:not([data-theme="light"]) .calendar-event.blocked {
        background: rgba(239, 68, 68, 0.25);
        color: #fca5a5;
    }
}

/* ============================================================================
   Complete Dark Mode for Year View
   ============================================================================ */

[data-theme="dark"] .calendar-year-container {
    background: var(--bg-secondary);
}

[data-theme="dark"] .calendar-mini-month {
    background: var(--bg-tertiary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-mini-month:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .calendar-mini-month-title {
    color: var(--text-primary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-mini-weekday {
    color: var(--text-muted);
}

[data-theme="dark"] .calendar-mini-day {
    color: var(--text-secondary);
}

[data-theme="dark"] .calendar-mini-day.other-month {
    color: var(--text-muted);
}

[data-theme="dark"] .calendar-mini-day.today {
    background: var(--color-primary);
    color: var(--color-white);
}

[data-theme="dark"] .calendar-mini-day.has-reservation {
    background: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

[data-theme="dark"] .calendar-mini-day.has-event {
    background: rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

[data-theme="dark"] .calendar-mini-day.blocked {
    background: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

[data-theme="dark"] .calendar-mini-day.delivery {
    border-left-color: #60a5fa;
}

[data-theme="dark"] .calendar-mini-day.return {
    border-right-color: #fb923c;
}

[data-theme="dark"] .calendar-mini-day.weekend {
    color: #f87171;
}

[data-theme="dark"] .calendar-mini-day.holiday {
    background: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d;
}

/* ============================================================================
   Complete Dark Mode for Week View
   ============================================================================ */

[data-theme="dark"] .calendar-week-container {
    background: var(--bg-secondary);
}

[data-theme="dark"] .calendar-week-grid {
    border-color: var(--color-gray-300);
    background: var(--bg-tertiary);
}

[data-theme="dark"] .calendar-week-header-row {
    background: var(--bg-tertiary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-week-header-cell {
    color: var(--text-secondary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-week-header-cell .day-number {
    color: var(--text-primary);
}

[data-theme="dark"] .calendar-week-header-cell.today {
    background: rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .calendar-week-header-cell.today .day-number {
    background: var(--color-primary);
    color: var(--color-white);
}

[data-theme="dark"] .calendar-week-product-row {
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-week-product-cell {
    background: var(--bg-tertiary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-week-product-name {
    color: var(--text-primary);
}

[data-theme="dark"] .calendar-week-product-stock {
    color: var(--text-muted);
}

[data-theme="dark"] .calendar-week-day-cell {
    background: var(--bg-secondary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-week-day-cell:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .calendar-week-day-cell.today {
    background: rgba(var(--color-primary-rgb), 0.1);
}

[data-theme="dark"] .calendar-week-day-cell.blocked {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .calendar-week-day-cell.weekend {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .calendar-week-day-cell.holiday {
    background: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .calendar-week-header-cell.weekend {
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .calendar-week-header-cell.weekend .day-number {
    color: #f87171;
}

[data-theme="dark"] .calendar-week-header-cell.holiday {
    background: rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .calendar-week-header-cell.holiday .day-number {
    color: #fbbf24;
}

[data-theme="dark"] .calendar-reservation-bar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .calendar-reservation-bar.rental {
    background: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    border-left-color: #60a5fa;
}

[data-theme="dark"] .calendar-reservation-bar.event-day {
    background: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    border-left-color: #34d399;
}

/* ============================================================================
   Complete Dark Mode for Month View
   ============================================================================ */

[data-theme="dark"] .admin-calendar {
    background: var(--bg-secondary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .admin-calendar .admin-calendar-grid {
    background: var(--color-gray-300);
}

[data-theme="dark"] .admin-calendar .admin-calendar-header-cell {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell {
    background: var(--bg-secondary);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.other-month {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.other-month .calendar-day-number {
    color: var(--text-muted);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.today {
    background: rgba(var(--color-primary-rgb), 0.12);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.blocked {
    background: rgba(239, 68, 68, 0.12);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.weekend {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.weekend .calendar-day-number {
    color: #f87171;
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.holiday {
    background: rgba(251, 191, 36, 0.15) !important;
}

[data-theme="dark"] .admin-calendar .admin-calendar-cell.holiday .calendar-day-number {
    color: #fbbf24;
}

[data-theme="dark"] .calendar-day-number {
    color: var(--text-primary);
}

[data-theme="dark"] .calendar-event-more-pill {
    color: var(--text-muted);
}

[data-theme="dark"] .calendar-event-more-pill:hover {
    color: var(--color-primary);
}

/* ============================================================================
   Dark Mode for View Toggle and Navigation
   ============================================================================ */

[data-theme="dark"] .calendar-view-toggle {
    background: var(--bg-tertiary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .calendar-view-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .calendar-view-btn:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .calendar-view-btn.active {
    color: var(--color-white);
    background: var(--color-primary);
}

/* ============================================================================
   Dark Mode for Drag Ghost
   ============================================================================ */

[data-theme="dark"] .calendar-drag-ghost {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   Dark Mode for Order Edit Modal (Additional)
   ============================================================================ */

[data-theme="dark"] .order-edit-modal {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .order-price-change.positive {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

[data-theme="dark"] .order-price-change.negative {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

[data-theme="dark"] .calendar-event-pill.reservation {
    background: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

[data-theme="dark"] .calendar-event-pill.event-day {
    background: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

[data-theme="dark"] .calendar-event-pill.blocked {
    background: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* ============================================================================
   Rental Period Visual Indicators
   Shows the full rental period (delivery → event → return)
   ============================================================================ */

/* Base rental period style - light blue background */
.admin-calendar-cell.has-rental {
    background: rgba(59, 130, 246, 0.08) !important;
    position: relative;
}

/* Event day - stronger green */
.admin-calendar-cell.has-event {
    background: rgba(16, 185, 129, 0.15) !important;
}

/* Delivery day indicator - blue accent */
.admin-calendar-cell.is-delivery-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3b82f6;
}

/* Return day indicator - orange accent */
.admin-calendar-cell.is-return-day::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #f97316;
}

/* Combined styles for cells that are both delivery and return (single day rental) */
.admin-calendar-cell.is-delivery-day.is-return-day::before {
    width: 4px;
}

.admin-calendar-cell.is-delivery-day.is-return-day::after {
    width: 4px;
}

/* Event day styling - override rental styling */
.admin-calendar-cell.has-event .calendar-day-number {
    color: #065f46;
    font-weight: 700;
}

/* Rental day number styling */
.admin-calendar-cell.has-rental:not(.has-event) .calendar-day-number {
    color: #1e40af;
}

/* Dark mode support for rental period */
[data-theme="dark"] .admin-calendar-cell.has-rental {
    background: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .admin-calendar-cell.has-event {
    background: rgba(16, 185, 129, 0.2) !important;
}

[data-theme="dark"] .admin-calendar-cell.has-event .calendar-day-number {
    color: #6ee7b7;
}

[data-theme="dark"] .admin-calendar-cell.has-rental:not(.has-event) .calendar-day-number {
    color: #93c5fd;
}

[data-theme="dark"] .admin-calendar-cell.is-delivery-day::before {
    background: #60a5fa;
}

[data-theme="dark"] .admin-calendar-cell.is-return-day::after {
    background: #fb923c;
}

/* ============================================================================
   Interactive Date Selection
   ============================================================================ */

.admin-calendar-cell.selectable {
    cursor: pointer;
}

.admin-calendar-cell.selectable:hover {
    background: rgba(var(--color-primary-rgb), 0.1) !important;
}

.admin-calendar-cell.selected {
    background: rgba(var(--color-primary-rgb), 0.2) !important;
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.admin-calendar-cell.selected .calendar-day-number {
    color: var(--color-primary);
    font-weight: 700;
}

[data-theme="dark"] .admin-calendar-cell.selectable:hover {
    background: rgba(var(--color-primary-rgb), 0.15) !important;
}

[data-theme="dark"] .admin-calendar-cell.selected {
    background: rgba(var(--color-primary-rgb), 0.25) !important;
}

/* ============================================================================
   Date Context Menu
   ============================================================================ */

.date-context-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: var(--z-modal, 1050);
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
}

.date-context-menu.active {
    display: flex;
}

.date-context-content {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 0;
    min-width: 240px;
    max-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: context-menu-appear 0.15s ease-out;
    overflow: hidden;
}

@keyframes context-menu-appear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.date-context-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--color-gray-200);
}

.date-context-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.date-context-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.15s;
}

.date-context-close:hover {
    color: var(--text-primary);
    background: var(--color-gray-200);
}

.date-context-options {
    padding: 0.5rem;
}

.date-context-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.date-context-option:hover {
    background: var(--bg-tertiary);
    color: var(--color-primary);
}

.date-context-option:hover svg {
    color: var(--color-primary);
}

.date-context-option svg {
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.15s;
}

.date-context-option.secondary {
    color: var(--text-secondary);
    font-weight: 400;
}

.date-context-option.secondary:hover {
    color: var(--text-primary);
}

.date-context-divider {
    height: 1px;
    background: var(--color-gray-200);
    margin: 0.5rem 0;
}

/* Toast notification */
.calendar-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: var(--z-notification, 1080);
}

.calendar-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Dark mode for context menu */
[data-theme="dark"] .date-context-menu {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .date-context-content {
    background: var(--bg-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .date-context-header {
    background: var(--bg-tertiary);
    border-color: var(--color-gray-300);
}

[data-theme="dark"] .date-context-close:hover {
    background: var(--color-gray-300);
}

[data-theme="dark"] .date-context-option:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .date-context-divider {
    background: var(--color-gray-300);
}

[data-theme="dark"] .calendar-toast {
    background: var(--bg-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Holiday Styles
   ============================================================================ */

.admin-calendar-cell.holiday {
    background: rgba(251, 191, 36, 0.1) !important;
}

.admin-calendar-cell.holiday .calendar-day-number {
    color: #d97706;
}

.calendar-event.holiday {
    background: rgba(251, 191, 36, 0.25);
    color: #92400e;
    border-left: 3px solid #f59e0b;
    font-size: 0.625rem;
    padding: 0.125rem 0.25rem;
}

.calendar-mini-day.holiday {
    background: rgba(251, 191, 36, 0.3) !important;
    color: #92400e;
}

/* Dark mode holidays */
[data-theme="dark"] .admin-calendar-cell.holiday {
    background: rgba(251, 191, 36, 0.15) !important;
}

[data-theme="dark"] .admin-calendar-cell.holiday .calendar-day-number {
    color: #fbbf24;
}

[data-theme="dark"] .calendar-event.holiday {
    background: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
    border-left-color: #fbbf24;
}

[data-theme="dark"] .calendar-mini-day.holiday {
    background: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d;
}

/* Note: Notification styles are in notifications.css */

/* ============================================================================
   Responsive & Compact Styles - v2.1.1 (2026-02-02)
   Compact design for admin calendar - reduced cell heights (75px from 100px)
   ============================================================================ */

/* -------------------------------------------------------------------------
   Admin Calendar Header - Compact & Responsive (v2.1.0)
   ------------------------------------------------------------------------- */

.admin-calendar-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

@media (max-width: 767px) {
    .admin-calendar-header {
        flex-direction: column;
        gap: 0.375rem !important;
    }
}

/* -------------------------------------------------------------------------
   View Toggle - Compact Design (v2.1.0)
   ------------------------------------------------------------------------- */

.calendar-view-toggle {
    padding: 0.1875rem !important;
    gap: 0.125rem !important;
    border-radius: 0.375rem !important;
}

.calendar-view-btn {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.8125rem !important;
    gap: 0.375rem !important;
}

.calendar-view-btn svg {
    width: 14px !important;
    height: 14px !important;
}

/* Mobile - icon only */
@media (max-width: 480px) {
    .calendar-view-btn span {
        display: none;
    }

    .calendar-view-btn {
        padding: 0.375rem 0.5rem !important;
    }
}

/* -------------------------------------------------------------------------
   Calendar Navigation - Compact (v2.1.0)
   ------------------------------------------------------------------------- */

.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem !important;
}

#calendarTitle {
    font-size: 1.125rem !important;
    min-width: 150px !important;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

#calendarPrev,
#calendarNext {
    padding: 0.375rem !important;
}

#calendarPrev svg,
#calendarNext svg {
    width: 18px !important;
    height: 18px !important;
}

#calendarToday {
    margin-left: 0.25rem !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Mobile - navigation on top */
@media (max-width: 767px) {
    .calendar-navigation {
        order: -1;
        width: 100%;
    }

    #calendarTitle {
        font-size: 1rem !important;
        min-width: 130px !important;
    }
}

/* -------------------------------------------------------------------------
   Calendar Legend - Compact (v2.1.0)
   ------------------------------------------------------------------------- */

.calendar-legend {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.6875rem !important;
    flex-wrap: wrap !important;
}

.calendar-legend .legend-item,
.calendar-legend > span {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap;
}

.calendar-legend .legend-dot,
.calendar-legend > span > span:first-child {
    width: 10px !important;
    height: 10px !important;
    flex-shrink: 0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legend dot colors */
.legend-dot.legend-weekend {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-size: 6px;
    font-weight: bold;
}

.legend-dot.legend-holiday {
    background: rgba(251, 191, 36, 0.3);
}

.legend-dot.legend-delivery {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
}

.legend-dot.legend-rental {
    background: rgba(59, 130, 246, 0.12);
}

.legend-dot.legend-event {
    background: rgba(16, 185, 129, 0.2);
}

.legend-dot.legend-return {
    background: rgba(59, 130, 246, 0.12);
    border-right: 3px solid #f97316;
}

.legend-dot.legend-blocked {
    background: rgba(239, 68, 68, 0.2);
}

/* Mobile legend - centered, wrap */
@media (max-width: 767px) {
    .calendar-legend {
        width: 100%;
        justify-content: center;
        gap: 0.375rem !important;
        font-size: 0.625rem !important;
    }
}

/* -------------------------------------------------------------------------
   Month View Grid - Compact Cells (v2.1.0)
   Reduced cell heights for all screen sizes, not just mobile
   ------------------------------------------------------------------------- */

/* Desktop-first: Default compact cells */
.admin-calendar .admin-calendar-header-cell {
    padding: 0.5rem 0.375rem !important;
    font-size: 0.6875rem !important;
}

.admin-calendar .admin-calendar-cell {
    min-height: 75px !important;
    padding: 0.375rem !important;
}

/* Day number - always readable */
.calendar-day-number {
    font-size: 0.8125rem !important;
    font-weight: 600;
}

/* Mobile adjustments - slightly smaller */
@media (max-width: 639px) {
    .admin-calendar .admin-calendar-header-cell {
        padding: 0.375rem 0.25rem !important;
        font-size: 0.625rem !important;
    }

    .admin-calendar .admin-calendar-cell {
        min-height: 60px !important;
        padding: 0.25rem !important;
    }

    .calendar-day-number {
        font-size: 0.75rem !important;
    }
}

/* Very small screens */
@media (max-width: 479px) {
    .admin-calendar .admin-calendar-cell {
        min-height: 50px !important;
    }
}

/* -------------------------------------------------------------------------
   Calendar Events - Compact Pills (v2.1.0)
   Readable font sizes with proper truncation
   ------------------------------------------------------------------------- */

/* Desktop-first: Default readable events */
.calendar-event {
    font-size: 0.625rem !important;
    padding: 0.1875rem 0.375rem !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile - slightly smaller */
@media (max-width: 639px) {
    .calendar-event {
        font-size: 0.5625rem !important;
        padding: 0.125rem 0.25rem !important;
    }
}

/* -------------------------------------------------------------------------
   Year View - Compact Mini Months
   ------------------------------------------------------------------------- */

.calendar-year-container {
    padding: 0.5rem !important;
}

@media (min-width: 640px) {
    .calendar-year-container {
        padding: 0.75rem !important;
    }
}

@media (min-width: 768px) {
    .calendar-year-container {
        padding: 1rem !important;
    }
}

.calendar-year-header {
    margin-bottom: 0.75rem !important;
}

@media (min-width: 640px) {
    .calendar-year-header {
        margin-bottom: 1rem !important;
    }
}

.calendar-year-title {
    font-size: 1.125rem !important;
}

@media (min-width: 640px) {
    .calendar-year-title {
        font-size: 1.25rem !important;
    }
}

@media (min-width: 768px) {
    .calendar-year-title {
        font-size: 1.5rem !important;
    }
}

.calendar-year-grid {
    gap: 0.5rem !important;
}

@media (min-width: 640px) {
    .calendar-year-grid {
        gap: 0.75rem !important;
    }
}

@media (min-width: 768px) {
    .calendar-year-grid {
        gap: 1rem !important;
    }
}

.calendar-mini-month {
    padding: 0.5rem !important;
}

@media (min-width: 640px) {
    .calendar-mini-month {
        padding: 0.625rem !important;
    }
}

@media (min-width: 768px) {
    .calendar-mini-month {
        padding: 0.75rem !important;
    }
}

.calendar-mini-month-title {
    font-size: 0.75rem !important;
    margin-bottom: 0.375rem !important;
    padding-bottom: 0.375rem !important;
}

@media (min-width: 640px) {
    .calendar-mini-month-title {
        font-size: 0.8125rem !important;
    }
}

@media (min-width: 768px) {
    .calendar-mini-month-title {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* -------------------------------------------------------------------------
   Week View - Compact & Scrollable
   ------------------------------------------------------------------------- */

.calendar-week-container {
    padding: 0.5rem !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .calendar-week-container {
        padding: 1rem !important;
    }
}

.calendar-week-grid {
    min-width: 600px;
}

@media (min-width: 1024px) {
    .calendar-week-grid {
        min-width: 800px;
    }
}

.calendar-week-header-row {
    grid-template-columns: 100px repeat(7, 1fr) !important;
}

@media (min-width: 768px) {
    .calendar-week-header-row {
        grid-template-columns: 120px repeat(7, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-header-row {
        grid-template-columns: 150px repeat(7, 1fr) !important;
    }
}

.calendar-week-product-row {
    grid-template-columns: 100px repeat(7, 1fr) !important;
}

@media (min-width: 768px) {
    .calendar-week-product-row {
        grid-template-columns: 120px repeat(7, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-product-row {
        grid-template-columns: 150px repeat(7, 1fr) !important;
    }
}

.calendar-week-header-cell {
    padding: 0.5rem !important;
    font-size: 0.625rem !important;
}

@media (min-width: 768px) {
    .calendar-week-header-cell {
        padding: 0.75rem !important;
        font-size: 0.75rem !important;
    }
}

.calendar-week-header-cell .day-number {
    font-size: 0.875rem !important;
}

@media (min-width: 768px) {
    .calendar-week-header-cell .day-number {
        font-size: 1rem !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-header-cell .day-number {
        font-size: 1.125rem !important;
    }
}

.calendar-week-product-cell {
    padding: 0.5rem !important;
}

@media (min-width: 768px) {
    .calendar-week-product-cell {
        padding: 0.75rem !important;
    }
}

.calendar-week-product-name {
    font-size: 0.75rem !important;
}

@media (min-width: 768px) {
    .calendar-week-product-name {
        font-size: 0.8125rem !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-product-name {
        font-size: 0.875rem !important;
    }
}

.calendar-week-product-stock {
    font-size: 0.625rem !important;
}

@media (min-width: 768px) {
    .calendar-week-product-stock {
        font-size: 0.6875rem !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-product-stock {
        font-size: 0.75rem !important;
    }
}

.calendar-week-day-cell {
    min-height: 60px !important;
    padding: 0.25rem !important;
}

@media (min-width: 768px) {
    .calendar-week-day-cell {
        min-height: 70px !important;
        padding: 0.375rem !important;
    }
}

@media (min-width: 1024px) {
    .calendar-week-day-cell {
        min-height: 80px !important;
        padding: 0.5rem !important;
    }
}

/* -------------------------------------------------------------------------
   Order Edit Modal - Compact Mobile
   ------------------------------------------------------------------------- */

.order-edit-content {
    max-width: 100% !important;
    max-height: 95vh !important;
    border-radius: 0.5rem !important;
    margin: 0.5rem;
}

@media (min-width: 640px) {
    .order-edit-content {
        max-width: 560px !important;
        max-height: 85vh !important;
        border-radius: 0.75rem !important;
        margin: 0;
    }
}

.order-edit-header {
    padding: 0.5rem 0.75rem !important;
}

@media (min-width: 640px) {
    .order-edit-header {
        padding: 0.625rem 1rem !important;
    }
}

.order-edit-tabs {
    padding: 0.25rem 0.5rem !important;
    gap: 0 !important;
}

@media (min-width: 640px) {
    .order-edit-tabs {
        padding: 0.375rem 0.75rem !important;
        gap: 0.125rem !important;
    }
}

.order-edit-tab {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.6875rem !important;
}

@media (min-width: 640px) {
    .order-edit-tab {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
}

.order-edit-tab svg {
    width: 12px !important;
    height: 12px !important;
}

@media (min-width: 640px) {
    .order-edit-tab svg {
        width: 14px !important;
        height: 14px !important;
    }
}

.order-edit-body {
    padding: 0.625rem !important;
}

@media (min-width: 640px) {
    .order-edit-body {
        padding: 0.875rem !important;
    }
}

/* -------------------------------------------------------------------------
   Move Confirm Dialog - Compact
   ------------------------------------------------------------------------- */

.move-confirm-content {
    padding: 1rem !important;
    max-width: 100% !important;
    margin: 0.5rem;
}

@media (min-width: 480px) {
    .move-confirm-content {
        padding: 1.25rem !important;
        max-width: 380px !important;
        margin: 0;
    }
}

@media (min-width: 640px) {
    .move-confirm-content {
        padding: 1.5rem !important;
        max-width: 400px !important;
    }
}

.move-confirm-title {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
}

@media (min-width: 640px) {
    .move-confirm-title {
        font-size: 1.125rem !important;
        margin-bottom: 1rem !important;
    }
}

.move-confirm-dates {
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
}

@media (min-width: 640px) {
    .move-confirm-dates {
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
}

.move-confirm-date {
    padding: 0.5rem !important;
}

@media (min-width: 640px) {
    .move-confirm-date {
        padding: 0.75rem !important;
    }
}

/* -------------------------------------------------------------------------
   Date Context Menu - Compact Mobile
   ------------------------------------------------------------------------- */

.date-context-content {
    min-width: 200px !important;
    max-width: 260px !important;
}

@media (min-width: 480px) {
    .date-context-content {
        min-width: 220px !important;
        max-width: 280px !important;
    }
}

@media (min-width: 640px) {
    .date-context-content {
        min-width: 240px !important;
    }
}

.date-context-option {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.8125rem !important;
    gap: 0.5rem !important;
}

@media (min-width: 640px) {
    .date-context-option {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.875rem !important;
        gap: 0.75rem !important;
    }
}

/* -------------------------------------------------------------------------
   Today indicator - Consistent sizing
   ------------------------------------------------------------------------- */

.admin-calendar .admin-calendar-cell.today .calendar-day-number {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
}

@media (min-width: 640px) {
    .admin-calendar .admin-calendar-cell.today .calendar-day-number {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.8125rem !important;
    }
}

@media (min-width: 768px) {
    .admin-calendar .admin-calendar-cell.today .calendar-day-number {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.875rem !important;
    }
}

/* -------------------------------------------------------------------------
   Touch-Friendly Interactions
   ------------------------------------------------------------------------- */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets on touch devices */
    .calendar-view-btn {
        min-height: 40px;
    }

    #calendarPrev,
    #calendarNext {
        min-width: 40px;
        min-height: 40px;
    }

    #calendarToday {
        min-height: 36px;
    }

    .admin-calendar .admin-calendar-cell {
        min-height: 60px !important;
    }

    /* Disable hover effects that don't work well on touch */
    .calendar-event:hover {
        transform: none;
        box-shadow: none;
    }
}

/* -------------------------------------------------------------------------
   Print Styles
   ------------------------------------------------------------------------- */

@media print {
    .calendar-view-toggle,
    .calendar-navigation button,
    .calendar-filter-bar,
    .calendar-actions {
        display: none !important;
    }

    .admin-calendar-container {
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    .admin-calendar .admin-calendar-cell {
        min-height: 60px !important;
        border: 1px solid #ddd !important;
    }
}
