/* Modern iOS/macOS Style Calendar CSS - Matching Scheduler Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Drag and Drop Styles */
.event-item[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.event-item[draggable="true"]:active {
    cursor: grabbing;
}

.event-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

.calendar-day.drag-over,
.daily-events.drag-over,
.weekly-time-slot.drag-over {
    background: rgba(0, 122, 255, 0.1) !important;
    border: 2px dashed rgba(0, 122, 255, 0.5) !important;
    transition: all 0.2s ease;
}

.weekly-event-card[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.weekly-event-card[draggable="true"]:active {
    cursor: grabbing;
}

.weekly-event-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

/* Resize handles for weekly and daily event cards */
.event-resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.event-resize-handle:hover,
.weekly-event-card:hover .event-resize-handle,
.daily-event-card:hover .event-resize-handle {
    opacity: 1;
}

.event-resize-handle.top {
    top: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 6px 6px 0 0;
}

.event-resize-handle.bottom {
    bottom: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 0 0 6px 6px;
}

.event-resize-handle.resizing {
    opacity: 1;
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 1) !important;
}

.weekly-event-card.resizing,
.daily-event-card.resizing {
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Add daily event card class for consistency */
.daily-event-card {
    position: relative;
}

/* Driving buffer styles for weekly and daily event cards */
.weekly-event-card .driving-buffer,
.daily-event-card .driving-buffer {
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3), rgba(255, 140, 0, 0.4));
    border-radius: 6px;
    border: 2px solid rgba(255, 165, 0, 0.4);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.weekly-event-card .driving-buffer.top,
.daily-event-card .driving-buffer.top {
    top: 0;
    height: 33.33%; /* 1 hour out of 3 hours total */
}

.weekly-event-card .driving-buffer.bottom,
.daily-event-card .driving-buffer.bottom {
    bottom: 0;
    height: 33.33%; /* 1 hour out of 3 hours total */
}

.weekly-event-card .cleaning-section,
.daily-event-card .cleaning-section {
    position: absolute;
    left: 0;
    right: 0;
    top: 33.33%;
    bottom: 33.33%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.daily-event-card[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.daily-event-card[draggable="true"]:active {
    cursor: grabbing;
}

.daily-event-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

/* Ensure calendar day elements have proper boundaries */
.calendar-day {
    position: relative;
    min-height: 120px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: rgba(0, 122, 255, 0.02);
}

.calendar-day.drag-over {
    background-color: rgba(0, 122, 255, 0.1) !important;
    border: 2px dashed rgba(0, 122, 255, 0.5) !important;
    transform: scale(1.02);
    z-index: 10;
}

/* Debug styling for development */
.calendar-day[data-day-index="3"] {
    border-left: 3px solid #ff0000 !important;
}

.calendar-day[data-day-index="4"] {
    border-left: 3px solid #00ff00 !important;
}

.calendar-day[data-day-index="5"] {
    border-left: 3px solid #0000ff !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #1d1d1f;
    line-height: 1.5;
}

.app-container {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100vh;
    min-height: 100vh;
    max-width: none;
    overflow-x: hidden;
}

/* Calendar Container */
.calendar-main-content {
    flex: 1 1 auto;
    margin-left: 240px;
    padding: 30px 20px 20px 20px;
    background: #f7f8fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.calendar-full-page {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    max-width: 100%;
    overflow-x: hidden;
}

/* View Menu Toggle */
.view-menu-toggle {
    position: relative;
    z-index: 10000;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

/* Navigation Menu Toggle */
.nav-menu-toggle {
    position: relative;
    z-index: 10000;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0;
    margin-right: auto;
}

.nav-menu-toggle:hover {
    background: transparent;
    transform: scale(1.05);
}

.view-menu-toggle:hover {
    background: transparent;
    transform: scale(1.05);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
    height: 16px;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.view-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.view-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.view-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* View Selector Dropdown */
.view-selector {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.view-selector.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Selector Dropdown */
.nav-selector {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-selector.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(0, 115, 230, 0.1);
    color: #0073ea;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(0, 115, 230, 0.15);
    color: #0073ea;
    font-weight: 600;
}

.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 16px;
}

/* Desktop styles - hide menu toggle, show horizontal tabs */
@media (min-width: 769px) {
    .view-menu-toggle {
        display: none;
    }
    
    .view-selector {
        position: static;
        display: flex;
        flex-direction: row;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 4px;
        margin: 12px 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.3);
        opacity: 1;
        transform: none;
        min-width: auto;
        margin-top: 8px;
    }
    
    .view-tab {
        flex: 1;
        justify-content: center;
        margin-bottom: 0;
    }
}

.view-tab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #8e8e93;
    position: relative;
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
}

.view-tab:last-child {
    margin-bottom: 0;
}

.view-tab:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.view-tab.active {
    background: #007AFF;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.view-tab i {
    font-size: 16px;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: white;
    border-bottom: 1px solid #e1e1e1;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
}

.calendar-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
}

.calendar-header-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 0;
    margin: 0;
}

.calendar-header-weekdays div {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    padding: 8px 4px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar-header-weekdays div:last-child {
    border-right: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1d1d1f;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-btn i {
    font-size: 16px;
    font-weight: 600;
}

#currentMonth {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    min-width: 200px;
    text-align: center;
}

/* Settings Button */
.settings-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.settings-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Settings Panel */
.settings-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    z-index: 1000;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.settings-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.close-settings {
    background: none;
    border: none;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.2s ease;
}

.close-settings:hover {
    color: #1d1d1f;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scale-group, .interval-group, .time-range-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale-group label, .interval-group label, .time-range-group label {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

#time-scale {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e5ea;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#time-scale::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

#time-scale::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

#scale-value {
    font-size: 12px;
    color: #8e8e93;
    text-align: center;
}

#time-interval, #start-time, #end-time {
    padding: 8px 12px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1d1d1f;
}

/* Weekdays Header */

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, minmax(120px, 1fr));
    gap: 1px;
    background: #e5e5ea;
    border-radius: 8px;
    overflow: hidden;
    height: calc(100vh - 280px);
    min-height: 600px;
    align-items: stretch;
    justify-items: stretch;
}

.calendar-day {
    background: white;
    min-height: 100%;
    max-height: none;
    padding: 6px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.today {
    background: #f0f8ff;
    border: 1px solid #007AFF;
    box-shadow: 0 0 0 1px #007AFF;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #c7c7cc;
}

.calendar-day.selected {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    box-shadow: 0 0 0 1px #2196f3;
}

.day-number {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0;
}

.day-number.today {
    color: #007AFF;
    font-weight: 700;
}

.day-number.other-month {
    color: #c7c7cc;
}

/* Day header styling */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    min-height: 16px;
}

/* Events */
.day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}

.event-item {
    background: #007AFF;
    color: white;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    line-height: 1.2;
}

.event-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.event-item.event-blue { background: #007AFF; }
.event-item.event-green { background: #34C759; }
.event-item.event-orange { background: #FF9500; }
.event-item.event-red { background: #FF3B30; }
.event-item.event-purple { background: #AF52DE; }

/* Recurring frequency colors */
.event-item.event-weekly { background: #00BCD4; } /* Teal for weekly */
.event-item.event-biweekly { background: #34C759; } /* Green for biweekly */
.event-item.event-triweekly { background: #FFC107; } /* Amber for triweekly */
.event-item.event-monthly { background: #E91E63; } /* Pink for monthly */

/* On-demand cleaning color */
.event-item.event-ondemand { background: #9C27B0; } /* Purple for on-demand */

/* Overlap warning styles */
.event-item.event-overlap-warning {
    border: 2px solid #FF3B30 !important;
    background: linear-gradient(135deg, #FF3B30, #FF6B6B) !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4) !important;
    animation: overlapPulse 2s infinite;
}

.event-item.event-overlap-warning:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.6) !important;
}

@keyframes overlapPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 59, 48, 0.7);
    }
}

/* Event More Indicator - Apple Calendar Style */
.event-more-indicator {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 1px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.2;
}

/* Compact day header more indicator */
.event-more-indicator.day-header-more {
    padding: 1px 3px;
    font-size: 9px;
    font-weight: 700;
    margin-top: 0;
    margin-left: 3px;
    border-radius: 3px;
    min-width: 18px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.2);
}

.event-more-indicator:hover {
    background: rgba(0, 122, 255, 0.2);
    color: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.event-more-indicator.day-header-more:hover {
    background: rgba(0, 122, 255, 0.25);
    color: #0056CC;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    border-color: rgba(0, 122, 255, 0.5);
}

.event-more-indicator:active {
    transform: translateY(0);
    background: rgba(0, 122, 255, 0.3);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
}

.event-more-indicator.day-header-more:active {
    transform: scale(0.95);
    background: rgba(0, 122, 255, 0.35);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.4);
    color: #0056CC;
}

/* Expanded event items in the modal */
.event-item-expanded {
    position: relative;
    overflow: hidden;
}

.event-item-expanded::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 2px 2px 0;
}

/* Color Legend Styles */
.color-legend-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.color-legend-group h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.color-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Weekly View */
.weekly-view {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.weekly-calendar {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.weekly-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    background: rgba(0, 122, 255, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 60px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.weekly-time-slots {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    grid-auto-rows: 1fr;
    width: 100%;
    max-width: 100%;
}

.weekly-event-card {
    border-radius: 6px;
    font-family: inherit;
    max-width: 100%;
    background: #007AFF;
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.weekly-event-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Overlap warning styles for weekly and daily event cards */
.weekly-event-card.event-overlap-warning,
.daily-event-card.event-overlap-warning,
.weekly-event-element.event-overlap-warning {
    border: 2px solid #FF3B30 !important;
    background: linear-gradient(135deg, #FF3B30, #FF6B6B) !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4) !important;
    animation: overlapPulse 2s infinite;
}

.weekly-event-card.event-overlap-warning:hover,
.daily-event-card.event-overlap-warning:hover,
.weekly-event-element.event-overlap-warning:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.6) !important;
}

/* Time column styling */
.weekly-calendar .weekly-header > div:first-child,
.weekly-calendar .weekly-time-slots > div:nth-child(7n+1) {
    background: rgba(255, 255, 255, 0.7);
    border-right: 2px solid rgba(0, 122, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .weekly-header,
    .weekly-time-slots {
        grid-template-columns: 80px repeat(7, 1fr);
    }
    
    .weekly-calendar {
        margin-top: 15px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .weekly-header,
    .weekly-time-slots {
        grid-template-columns: 70px repeat(7, 1fr);
    }
    
    .weekly-calendar {
        margin-top: 10px;
        border-radius: 12px;
    }
    
    .calendar-full-page {
        padding: 15px;
    }
}

/* Daily View */
.daily-view {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.daily-calendar {
    margin-top: 20px;
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    max-width: none;
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.daily-header {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    padding: 25px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.daily-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.daily-header p {
    margin: 0;
    font-size: 13px;
    color: #86868b;
    font-weight: 500;
    line-height: 1.2;
}

.daily-time-slots {
    max-height: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-auto-rows: 1fr;
}

.daily-time-slot {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #86868b;
    border-right: 2px solid rgba(0, 122, 255, 0.1);
}

.daily-events {
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    padding: 6px;
    transition: all 0.2s ease;
}

.daily-events:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .daily-view {
        width: 100vw;
        max-width: 100vw;
        margin-top: 0;
    }
    
    .daily-calendar {
        margin-top: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        min-height: auto;
    }
    
    .daily-header {
        padding: 15px 20px;
        min-height: 80px;
    }
    
    .daily-header h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .daily-header p {
        font-size: 12px;
    }
    
    .daily-time-slots {
        grid-template-columns: 60px 1fr;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .daily-time-slot {
        font-size: 12px;
        height: 40px;
    }
    
    .daily-events {
        padding: 4px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .daily-time-slots {
        grid-template-columns: 50px 1fr;
    }
    
    .daily-time-slot {
        font-size: 11px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex !important;
}

.modal-overlay.active .modal {
    display: block !important;
    background: white !important;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    z-index: 1001;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e5ea;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.2s ease;
    padding: 4px;
    border-radius: 6px;
}

.close-button:hover {
    color: #1d1d1f;
    background: #f2f2f7;
    }
    
    .event-form {
    padding: 24px;
    }
    
    .form-group {
    margin-bottom: 20px;
    }
    
    .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    }
    
    .form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #1d1d1f;
    transition: all 0.2s ease;
    }
    
    .form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
        position: relative;
    }
    
.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

input[type="radio"]:checked + .color-option {
    border-color: #1d1d1f;
    transform: scale(1.1);
}

input[type="radio"] {
    display: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e5ea;
}

.button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.button.primary {
    background: #007AFF;
    color: white;
}

.button.primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.button.secondary {
    background: #f2f2f7;
    color: #1d1d1f;
}

.button.secondary:hover {
    background: #e5e5ea;
    transform: translateY(-1px);
}

/* iOS-Style Mobile Responsive Design */
@media (max-width: 768px) {
    /* Reset any conflicting styles for mobile */
    .calendar-day {
        margin: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        background: white !important;
        position: relative !important;
        min-height: 100% !important;
        max-height: none !important;
        padding: 8px 4px !important;
        width: 100% !important;
        height: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        flex-direction: column !important;
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1) !important;
    }
    
    .calendar-day:nth-child(7n) {
        border-right: none !important;
    }
    
    .calendar-header-weekdays > div {
        margin: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
        background: transparent !important;
        padding: 12px 8px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #8e8e93 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .calendar-header-weekdays > div:last-child {
        border-right: none !important;
    }
    
    /* Force override any inline styles that might cause weird lines */
    .calendar-header-weekdays[style*="display: grid"] {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 0 !important;
    }
    
    /* Override any inline border-right: none styles */
    .calendar-header-weekdays > div[style*="border-right: none"],
    .calendar-day[style*="border-right: none"] {
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Ensure last column has no right border */
    .calendar-header-weekdays > div:nth-child(7),
    .calendar-day:nth-child(7n) {
        border-right: none !important;
    }
    .calendar-main-content {
        margin-left: 0;
        padding: 0;
        background: #f2f2f7;
    }
    
    .calendar-full-page {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: #f2f2f7;
        min-height: 100vh;
    }
    
    /* Show view menu toggle on mobile */
    .view-menu-toggle {
        display: flex;
    }
    
    /* Hide view selector on mobile (shown via menu) */
    .view-selector {
        display: none;
    }
    
    .view-selector.show {
        display: flex;
    }
    
    .view-tab {
        padding: 12px 16px;
        font-size: 16px;
        font-weight: 500;
        border-radius: 8px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* iOS-style header */
    .calendar-header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        flex-direction: column;
    }
    
    /* Hide navigation buttons on mobile */
    .nav-btn {
        display: none;
    }
    
    #currentMonth {
        font-size: 22px;
        font-weight: 600;
        color: #1d1d1f;
        text-align: center;
        flex: 1;
        position: relative;
    }
    
    
    /* Hide settings button on mobile for cleaner look */
    .settings-button {
        display: none !important;
    }
    
    /* iOS-style weekdays */
    .calendar-header-weekdays {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        position: sticky !important;
        top: 148px !important;
        z-index: 1001 !important;
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 0 !important;
        margin-bottom: 0px !important;
        padding-bottom: 0px !important;
        height: auto !important;
        min-height: 40px !important;
    }
    
    .calendar-header-weekdays > div {
        padding: 12px 8px;
        font-size: 13px;
        font-weight: 500;
        color: #8e8e93;
        background: transparent;
        text-align: center;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        box-sizing: border-box;
    }
    
    .calendar-header-weekdays > div:last-child {
        border-right: none;
    }
    
    /* iOS-style calendar grid */
    .calendar-grid {
        background: white !important;
        border-radius: 0 !important;
        margin: 0 !important;
        margin-top: 1px !important;
        padding-top: 0px !important;
        height: calc(100vh - 200px) !important;
        min-height: calc(100vh - 200px) !important;
        gap: 0 !important;
        border: none !important;
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        grid-template-rows: repeat(6, minmax(80px, 1fr)) !important;
        position: relative !important;
        z-index: 1 !important;
        align-items: stretch !important;
        justify-items: stretch !important;
    }
    
    /* Force override any inline styles for calendar grid */
    .calendar-grid[style*="display: grid"] {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 0 !important;
    }
    
    .calendar-day {
        min-height: 100%;
        max-height: none;
        padding: 8px 4px;
        border: none;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        background: white;
        position: relative;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .calendar-day:nth-child(7n) {
        border-right: none;
    }
    
    .calendar-day:hover {
        background: rgba(0, 122, 255, 0.02);
    }
    
    .calendar-day.today {
        background: rgba(0, 122, 255, 0.05);
        border: none;
    }
    
    .calendar-day.today::before {
        content: '';
        position: absolute;
        top: 4px;
        left: 4px;
        right: 4px;
        height: 2px;
        background: #007AFF;
        border-radius: 1px;
    }
    
    .day-number {
        font-size: 16px;
        font-weight: 500;
        color: #1d1d1f;
        margin-bottom: 4px;
    }
    
    .day-number.today {
        color: #007AFF;
        font-weight: 600;
    }
    
    .day-number.other-month {
        color: #c7c7cc;
    }
    
    /* iOS-style events */
    .day-events {
        gap: 2px;
    }
    
    .event-item {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 6px;
        font-weight: 500;
        margin-bottom: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        position: relative;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Mobile styling for more indicator */
    .event-more-indicator {
        font-size: 10px;
        padding: 2px 4px;
        margin-top: 1px;
        border-radius: 3px;
        background: rgba(142, 142, 147, 0.15);
        color: #8e8e93;
        border: 1px solid rgba(142, 142, 147, 0.25);
    }
    
    /* Mobile day header more indicator */
    .event-more-indicator.day-header-more {
        padding: 1px 3px;
        font-size: 9px;
        font-weight: 700;
        margin-top: 0;
        margin-left: 3px;
        border-radius: 2px;
        min-width: 16px;
        height: 14px;
        background: rgba(0, 122, 255, 0.2);
        color: #007AFF;
        border: 1px solid rgba(0, 122, 255, 0.4);
        box-shadow: 0 1px 2px rgba(0, 122, 255, 0.3);
    }
    
    .event-more-indicator:hover {
        background: rgba(142, 142, 147, 0.25);
        transform: none; /* Disable transform on mobile for better touch interaction */
    }
    
    .event-more-indicator.day-header-more:hover {
        background: rgba(0, 122, 255, 0.3);
        color: #0056CC;
        border-color: rgba(0, 122, 255, 0.5);
        transform: none; /* Disable transform on mobile for better touch interaction */
    }
    
    .event-more-indicator:active {
        background: rgba(142, 142, 147, 0.35);
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    .event-more-indicator.day-header-more:active {
        background: rgba(0, 122, 255, 0.4);
        color: #0056CC;
        border-color: rgba(0, 122, 255, 0.6);
        transform: scale(0.95);
        transition: all 0.1s ease;
    }
    
    .event-item:hover {
        transform: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    .event-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* iOS-style event colors */
    .event-item.event-blue {
        background: linear-gradient(135deg, #007AFF, #0056CC);
        color: white;
    }
    
    .event-item.event-green {
        background: linear-gradient(135deg, #34C759, #28A745);
        color: white;
    }
    
    .event-item.event-orange {
        background: linear-gradient(135deg, #FF9500, #E6850E);
        color: white;
    }
    
    .event-item.event-red {
        background: linear-gradient(135deg, #FF3B30, #DC3545);
        color: white;
    }
    
    .event-item.event-purple {
        background: linear-gradient(135deg, #AF52DE, #9C27B0);
        color: white;
    }
    
    /* Event time indicator */
    .event-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 0 2px 2px 0;
    }
    
    /* iOS-style modals */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .modal-overlay.active .modal {
        width: 100%;
        max-width: 100%;
        height: 90vh;
        border-radius: 20px 20px 0 0;
        margin: 0;
        animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        border: none;
    }
    
    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    /* Modal handle indicator */
    .modal-overlay.active .modal::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: #c7c7cc;
        border-radius: 2px;
    }
    
    .modal-header {
        padding: 20px 20px 16px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .modal-header h3 {
        font-size: 18px;
        font-weight: 600;
    }
    
    .event-form {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 16px;
        font-size: 16px;
        border-radius: 12px;
        border: 2px solid #e5e5ea;
        background: #f8f9fa;
        transition: all 0.2s ease;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #007AFF;
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
        background: white;
        transform: translateY(-1px);
    }
    
    .form-group input:active,
    .form-group textarea:active,
    .form-group select:active {
        transform: scale(0.98);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        position: sticky;
        bottom: 0;
        margin: 0;
    }
    
    .button {
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        min-height: 50px;
    }
    
    .button.primary {
        background: #007AFF;
        color: white;
    }
    
    .button.secondary {
        background: #f2f2f7;
        color: #1d1d1f;
        border: 1px solid #e5e5ea;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .view-tab {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .calendar-header {
        padding: 0;
    }
    
    /* Ensure nav buttons stay hidden on small screens */
    .nav-btn {
        display: none !important;
    }
    
    #currentMonth {
        font-size: 20px;
    }
    
    .calendar-header-weekdays > div {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 100%;
        max-height: none;
        padding: 6px 3px;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .event-item {
        font-size: 10px;
        padding: 2px 4px;
        border-radius: 3px;
    }
    
    .modal-header {
        padding: 16px 16px 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .event-form {
        padding: 16px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px;
        font-size: 16px;
    }
    
    .button {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }
}

/* Mobile dropdown positioning */
@media (max-width: 768px) {
    .event-details-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90vw !important;
        max-width: 400px !important;
        min-width: 300px !important;
        max-height: 70vh !important;
        z-index: 10001 !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }
}

/* iOS-style touch interactions */
@media (hover: none) and (pointer: coarse) {
    .calendar-day {
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    }
    
    .calendar-day:active {
        background: rgba(0, 122, 255, 0.1);
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    .event-item:active {
        transform: scale(0.95);
        transition: all 0.1s ease;
    }
    
    .nav-btn:active {
        transform: scale(0.95);
        background: rgba(0, 122, 255, 0.3);
    }
    
    .view-tab:active {
        transform: scale(0.98);
    }
    
    .button:active {
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
}

/* Weekly View Styles */
.weekly-view {
    overflow-y: auto;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

.weekly-calendar {
    min-height: auto;
}

/* iOS-style scroll behavior */
@media (max-width: 768px) {
    .calendar-grid {
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-overlay.active .modal {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Weekly view scrolling on mobile */
    .weekly-view {
        overflow-y: auto;
        max-height: 100vh;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0px;
    }
    
    .weekly-calendar {
        min-height: auto;
        margin-bottom: 0px;
    }
}

/* iOS-style safe area support */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .calendar-main-content {
            padding-left: max(0px, env(safe-area-inset-left));
            padding-right: max(0px, env(safe-area-inset-right));
        }
        
        .view-selector {
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
        }
        
        .calendar-header {
            padding: 0;
        }
        
        .calendar-header-top {
            margin: 0;
            padding: 0;
        }
        
        .form-actions {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
    }
}

/* iOS-style animations */
@keyframes refreshSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes refreshSlideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Pull-to-refresh indicator */
.pull-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #007AFF;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pull-indicator::before {
    content: '↓';
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.pull-indicator.active {
    opacity: 1;
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.pull-indicator.active::before {
    transform: rotate(180deg);
}

/* iOS-style loading states */
.calendar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #8e8e93;
    font-size: 16px;
    font-weight: 500;
}

.calendar-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e5ea;
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Modal Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Modern Events Modal Styling */
.modern-events-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modern-events-modal::-webkit-scrollbar {
    width: 6px;
}

.modern-events-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.modern-events-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 122, 255, 0.3);
    border-radius: 3px;
}

.modern-events-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 122, 255, 0.5);
}

/* Event Details Dropdown */
.event-details-dropdown {
    position: fixed;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 10000;
    min-width: 350px;
    max-width: 400px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: dropdownFadeIn 0.2s ease-out;
    overflow: hidden;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-details-dropdown h3 {
  margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
}

.event-details-dropdown button {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
        border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
        font-weight: 500;
        cursor: pointer;
    transition: all 0.2s ease;
}

.event-details-dropdown button:hover {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.5);
}

.event-details-dropdown button:last-child {
    background: rgba(142, 142, 147, 0.1);
    color: #8E8E93;
    border-color: rgba(142, 142, 147, 0.3);
}

.event-details-dropdown button:last-child:hover {
    background: rgba(142, 142, 147, 0.2);
    border-color: rgba(142, 142, 147, 0.5);
}

/* Dropdown Action Buttons Spacing */
.event-details-dropdown .form-actions,
.event-details-dropdown [style*="justify-content: flex-end"] {
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Enhanced Modal Form Styling */
#eventModal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

#eventModal .form-group {
    margin-bottom: 20px;
}

/* Enhanced Booking Modal Styles */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.booking-modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding-top: 20px;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button styling - now positioned on the modal content */
.booking-modal-content .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #666;
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.booking-modal-content .close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: scale(1.1);
}

.booking-modal-body {
    padding: 40px;
}

.booking-form-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 20px;
    margin-bottom: 30px;
}

.booking-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.booking-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.booking-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 2px;
}

.booking-form-group {
    margin-bottom: 20px;
}

.booking-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.booking-form-group input,
.booking-form-group select,
.booking-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    color: #1d1d1f;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.booking-form-group input:focus,
.booking-form-group select:focus,
.booking-form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: translateY(-1px);
}

.booking-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.booking-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.booking-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e5ea;
}

.booking-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.booking-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.booking-btn:hover::before {
    left: 100%;
}

.booking-btn-primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.booking-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

.booking-btn-secondary {
    background: #f2f2f7;
    color: #1d1d1f;
    border: 2px solid #e5e5ea;
}

.booking-btn-secondary:hover {
    background: #e5e5ea;
    transform: translateY(-1px);
}

/* Client Selection Styling */
.client-list-container {
    position: relative;
    max-height: 250px;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    background: white;
    overflow: hidden;
}

.client-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 4px;
}

.client-list-loading {
    padding: 20px;
    text-align: center;
    color: #8e8e93;
    font-style: italic;
}

.client-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border: 1px solid transparent;
}

.client-item:hover {
    background: #f0f8ff;
    border-color: rgba(0, 122, 255, 0.2);
    transform: translateY(-1px);
}

.client-item.selected {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    border-color: #007AFF;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
}

.client-item:last-child {
    margin-bottom: 0;
}

.client-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 11px;
    margin-right: 8px;
    flex-shrink: 0;
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-details {
    font-size: 10px;
    color: #8e8e93;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.client-item.selected .client-check {
    background: #007AFF;
    border-color: #007AFF;
    color: white;
}

.client-check::before {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.client-item.selected .client-check::before {
    opacity: 1;
}

/* Cleaning Type Selection */
.cleaning-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.cleaning-type-option {
    position: relative;
    cursor: pointer;
}

.cleaning-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cleaning-type-card {
    background: white;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cleaning-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cleaning-type-card:hover {
    border-color: #007AFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.15);
}

.cleaning-type-option input[type="radio"]:checked + .cleaning-type-card {
    border-color: #007AFF;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.2);
}

.cleaning-type-option input[type="radio"]:checked + .cleaning-type-card::before {
    opacity: 0.1;
}

.cleaning-type-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.cleaning-type-name {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0;
}

/* Responsive Design for Booking Modals */
@media (max-width: 768px) {
    .booking-modal {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    
    .booking-modal-content {
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .booking-modal-content .close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .booking-modal-body {
        padding: 25px 20px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .booking-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .booking-time-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cleaning-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .client-list-container {
        max-height: 220px;
    }
    
    .client-list {
        max-height: 220px;
    }
    
    .booking-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .booking-btn {
        width: 100%;
    }
    
    /* Add 120px bottom spacing for existing client modal on mobile */
    #existing-client-booking-modal .booking-modal-body {
        padding-bottom: 120px;
    }
}

@media (max-width: 480px) {
    .booking-modal-content .close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .booking-modal-body {
        padding: 20px 15px;
    }
    
    .booking-section {
        padding: 20px 15px;
    }
    
    .booking-section h3 {
        font-size: 18px;
    }
    
    .cleaning-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-list-container {
        max-height: 180px;
    }
    
    .client-list {
        max-height: 180px;
    }
    
    .client-item {
        padding: 3px 6px;
    }
    
    .client-avatar {
        width: 20px;
        height: 20px;
        font-size: 10px;
        margin-right: 6px;
    }
    
    .client-name {
        font-size: 11px;
    }
    
    .client-details {
        font-size: 9px;
    }
    
    /* Add 120px bottom spacing for existing client modal on small mobile */
    #existing-client-booking-modal .booking-modal-body {
        padding-bottom: 120px;
    }
}

#eventModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

#eventModal .form-group input,
#eventModal .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #1d1d1f;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#eventModal .form-group input:focus,
#eventModal .form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Input field containment */
.event-details-dropdown input,
.event-details-dropdown select,
.event-details-dropdown textarea {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.event-details-dropdown .edit-input {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Calendar Picker Styles for Event Details Dropdown */
.event-details-dropdown .calendar-picker-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

.event-details-dropdown .calendar-picker {
    background: white;
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-details-dropdown .calendar-picker .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.event-details-dropdown .calendar-picker .calendar-nav-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: #666;
}

.event-details-dropdown .calendar-picker .calendar-nav-btn:hover {
    background: #e9ecef;
}

.event-details-dropdown .calendar-picker .calendar-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.event-details-dropdown .calendar-picker .calendar-ui {
    padding: 0.5rem;
}

.event-details-dropdown .calendar-picker .calendar-ui table {
    width: 100%;
    border-collapse: collapse;
    min-height: 200px;
}

.event-details-dropdown .calendar-picker .calendar-ui th {
    padding: 0.4rem;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 0.75rem;
}

.event-details-dropdown .calendar-picker .calendar-ui td {
    padding: 0.4rem;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.8rem;
    min-width: 28px;
    height: 28px;
    line-height: 1;
}

.event-details-dropdown .calendar-picker .calendar-ui td:hover:not(.past):not(.booked) {
    background: #f0f8ff;
    transform: scale(1.05);
}

.event-details-dropdown .calendar-picker .calendar-day.selected {
    background: #4CAF50 !important;
    color: white !important;
    font-weight: bold;
}

.event-details-dropdown .calendar-picker .calendar-day.booked {
    background: #f1f1f1;
    color: #999;
    cursor: not-allowed;
}

.event-details-dropdown .calendar-picker .calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
}

/* Responsive adjustments for calendar picker in dropdown */
@media (max-width: 768px) {
    .event-details-dropdown .calendar-picker .calendar-ui td {
        padding: 0.3rem;
        font-size: 0.75rem;
        min-width: 24px;
        height: 24px;
    }
    
    .event-details-dropdown .calendar-picker .calendar-ui th {
        padding: 0.3rem;
        font-size: 0.7rem;
    }
    
    .event-details-dropdown .calendar-picker .calendar-header {
        padding: 0.4rem;
    }
    
    .event-details-dropdown .calendar-picker .calendar-title {
        font-size: 0.8rem;
    }
}

/* Calendar Picker Styles for Event Modal */
#eventModal .calendar-picker {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#eventModal .calendar-picker .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#eventModal .calendar-picker .calendar-nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#eventModal .calendar-picker .calendar-nav-btn:hover {
    background: #e9ecef;
}

#eventModal .calendar-picker .calendar-title {
    font-weight: 600;
    color: #333;
}

#eventModal .calendar-picker .calendar-ui {
    padding: 0.5rem;
}

#eventModal .calendar-picker .calendar-ui table {
    width: 100%;
    border-collapse: collapse;
}

#eventModal .calendar-picker .calendar-ui th {
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
}

#eventModal .calendar-picker .calendar-ui td {
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

#eventModal .calendar-picker .calendar-ui td:hover:not(.past):not(.booked) {
    background: #f0f8ff;
    transform: scale(1.05);
}

#eventModal .calendar-picker .calendar-day.selected {
    background: #4CAF50 !important;
    color: white !important;
    font-weight: bold;
}

#eventModal .calendar-picker .calendar-day.booked {
    background: #f1f1f1;
    color: #999;
    cursor: not-allowed;
}

#eventModal .calendar-picker .calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
}

/* Time Picker Styles for Event Modal */
#eventModal .time-picker {
    position: relative;
    width: 100%;
}

#eventModal .time-picker .time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e5e5ea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

#eventModal .time-picker .time-display:hover {
    border-color: #007AFF;
}

#eventModal .time-picker .time-display.active {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#eventModal .time-picker .time-value {
    color: #1d1d1f;
    font-weight: 500;
}

#eventModal .time-picker .time-display i {
    color: #666;
    font-size: 1rem;
}

#eventModal .time-picker .time-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e5ea;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

#eventModal .time-picker .time-dropdown.active {
    display: block;
}

#eventModal .time-picker .time-slots {
    padding: 0.5rem 0;
}

#eventModal .time-picker .time-slot {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 16px;
    color: #1d1d1f;
}

#eventModal .time-picker .time-slot:hover {
    background: #f0f8ff;
}

#eventModal .time-picker .time-slot.selected {
    background: #007AFF;
    color: white;
    font-weight: 600;
}