/* Mobile-optimized Staff Schedule CSS */
.staff-schedule-mobile-container {
    max-width: 100%;
    margin: 0;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Mobile Controls */
.mobile-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    color: #495057;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.mobile-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Mobile Calendar */
.staff-calendar-mobile {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 15px;
}

/* Mobile Navigation */
.mobile-nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.mobile-nav-btn {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.mobile-nav-btn:active {
    transform: translateY(1px);
}

.mobile-nav-btn.today-btn {
    background-color: #007bff;
    color: white;
}

.mobile-nav-btn:hover {
    background-color: #007bff;
    color: white;
}

/* FullCalendar Mobile Overrides */
.staff-calendar-mobile .fc {
    font-size: 14px;
}

.staff-calendar-mobile .fc-header-toolbar {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.staff-calendar-mobile .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
}

.staff-calendar-mobile .fc-button {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
}

.staff-calendar-mobile .fc-button-group {
    display: none; /* Hide default buttons, we use our custom nav */
}

.staff-calendar-mobile .fc-toolbar-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

/* List View Optimizations */
.staff-calendar-mobile .fc-list {
    border: none;
}

.staff-calendar-mobile .fc-list-event {
    border-left: 4px solid;
    margin-bottom: 1px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    min-height: 50px;
}

.staff-calendar-mobile .fc-list-event:hover {
    background-color: #f8f9fa;
}

.staff-calendar-mobile .fc-list-event-dot {
    display: none; /* Hide dots in mobile */
}

.staff-calendar-mobile .fc-list-event-time {
    font-size: 13px;
    color: #6c757d;
    padding: 8px 15px;
    font-weight: 500;
    flex: 0 0 auto;
    min-width: 120px;
}

.staff-calendar-mobile .fc-list-event-title {
    font-weight: 600;
    font-size: 15px;
    padding: 12px 15px;
    flex: 1;
    text-align: right;
    color: #495057;
}

.staff-calendar-mobile .fc-list-day-cushion {
    background-color: #e9ecef;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 16px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

/* Day Grid Mobile Optimizations */
.staff-calendar-mobile .fc-daygrid-event {
    font-size: 11px;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
}

.staff-calendar-mobile .fc-daygrid-day-number {
    font-size: 14px;
    font-weight: 600;
    padding: 8px;
}

.staff-calendar-mobile .fc-col-header-cell {
    padding: 8px 4px;
    font-weight: 600;
    font-size: 12px;
}

/* Event Colors */
.event-regular-shift {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.event-special-shift {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.event-day-off {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.event-google-calendar {
    background-color: #fd7e14 !important;
    border-color: #fd7e14 !important;
    color: white !important;
}

/* Mobile Modal */
.mobile-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.mobile-modal-content {
    background-color: white;
    margin: 20% auto;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.mobile-modal-header {
    padding: 20px;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    line-height: 1;
    padding: 4px;
}

.mobile-modal-body {
    padding: 20px;
}

.shift-detail-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.shift-detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.shift-detail-item strong {
    display: block;
    color: #495057;
    font-size: 14px;
    margin-bottom: 4px;
}

.shift-detail-item span {
    font-size: 16px;
    color: #212529;
}

.mobile-modal-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    text-align: right;
}

.mobile-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

.mobile-btn:active {
    transform: translateY(1px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Hide desktop controls in mobile layout */
.staff-calendar-mobile .fc-toolbar {
    display: none !important;
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .staff-calendar-mobile .fc-list-event {
        min-height: 44px; /* Apple recommended touch target size */
        display: flex;
        align-items: center;
    }
    
    .mobile-nav-btn {
        min-height: 44px;
    }
    
    .mobile-select {
        min-height: 44px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .staff-schedule-mobile-container {
        padding: 5px;
    }
    
    .mobile-controls {
        padding: 10px;
    }
    
    .mobile-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .staff-calendar-mobile .fc-list-event-title {
        font-size: 14px;
    }
    
    .staff-calendar-mobile .fc-list-event-time {
        font-size: 12px;
    }
}