/* Utilization bar width (moved from inline style) */
.utilization-bar {
    width: 84%;
    transition: width 0.3s;
}

/* Hidden elements (moved from inline styles) */
.hidden-element {
    display: none;
}

/* Mobile overlay for sidebar */
@media (max-width: 1023px) {
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 30;
    }
}

/* Enhanced responsive adjustments for mobile */
@media (max-width: 640px) {
    .sidebar-link, .sidebar-link span {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    .content-section, main, .p-8, .p-6, .p-4 {
        padding: 1rem !important;
    }
    .rounded-xl, .rounded-2xl {
        border-radius: 0.75rem !important;
    }
    .shadow-md, .shadow-xl, .shadow-2xl, .shadow-sm {
        box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07) !important;
    }
    .grid, .grid-cols-1, .md\:grid-cols-2, .md\:grid-cols-3, .lg\:grid-cols-3, .lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .max-w-lg, .max-w-2xl, .max-w-sm, .max-w-xl {
        max-width: 100% !important;
    }
    .w-64 {
        width: 100% !important;
    }
    .h-screen {
        height: auto !important;
    }
    .flex {
        flex-direction: column !important;
    }
    .overflow-y-auto {
        overflow-y: visible !important;
    }
    
    /* Mobile-specific adjustments */
    .text-3xl {
        font-size: 1.875rem !important;
    }
    .text-2xl {
        font-size: 1.5rem !important;
    }
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    .gap-6 {
        gap: 1rem !important;
    }
    
    /* Form inputs mobile optimization */
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* Button touch targets */
    button {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Table responsiveness */
    .table-container {
        overflow-x: auto !important;
    }
    
    table {
        min-width: 600px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1023px) {
    .grid-cols-1.sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .p-4.lg\:p-6 {
        padding: 1.25rem !important;
    }
    
    .gap-4.lg\:gap-6 {
        gap: 1.25rem !important;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* A warm neutral: slate-50 */
}
.sidebar-link {
    transition: all 0.2s ease-in-out;
}
.sidebar-link:hover, .sidebar-link.active {
    background-color: #e0f2fe; /* A complimentary color: sky-100 */
    color: #0c4a6e; /* An accent color: sky-900 */
    transform: translateX(4px);
}
.content-section {
    display: none;
}
.content-section.active {
    display: block;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 350px;
}
@media (min-width: 768px) {
    .chart-container {
        height: 350px;
    }
}

@media (max-width: 640px) {
    .chart-container {
        height: 250px;
    }
    
    /* Make charts more touch-friendly on mobile */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Overlay popup message styles */
.overlay-message-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay-message-container.show {
    opacity: 1;
    visibility: visible;
}

.overlay-message-container.hide {
    opacity: 0;
    visibility: hidden;
}

.overlay-message-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    margin: 20px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.overlay-message-container.show .overlay-message-box {
    transform: scale(1) translateY(0);
}

.overlay-message-content {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.overlay-message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.overlay-message-box.success .overlay-message-icon {
    background-color: #dcfce7;
    color: #16a34a;
}

.overlay-message-box.error .overlay-message-icon {
    background-color: #fef2f2;
    color: #dc2626;
}

.overlay-message-box.info .overlay-message-icon {
    background-color: #dbeafe;
    color: #2563eb;
}

.overlay-message-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: #374151;
    margin-top: 8px;
}

.overlay-message-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.overlay-message-close:hover {
    color: #6b7280;
    background-color: #f3f4f6;
}

/* Animation keyframes */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
        visibility: hidden;
    }
    to {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes overlayFadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes messageSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes messageSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
}

/* Responsive design for overlay messages */
@media (max-width: 640px) {
    .overlay-message-box {
        max-width: 320px;
        margin: 16px;
    }
    
    .overlay-message-content {
        padding: 20px;
        gap: 12px;
    }
    
    .overlay-message-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .overlay-message-text {
        font-size: 14px;
    }
    
    .overlay-message-close {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }
}

/* Email field styling - auto-fill styles removed */

/* Time Picker Styles */
.time-picker-container {
    position: relative;
}

.time-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
}

.time-picker-dropdown.hidden {
    display: none;
}

.time-picker-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.time-picker-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

.time-picker-periods {
    padding: 16px 20px;
}

.time-period {
    margin-bottom: 20px;
}

.time-period:last-child {
    margin-bottom: 0;
}

.period-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.time-slot:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
    transform: translateY(-1px);
}

.time-slot.selected {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
    font-weight: 600;
}

.time-slot.unavailable {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot.unavailable:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    transform: none;
}

.time-picker-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.time-picker-footer button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.clear-btn {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

.clear-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.close-btn {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.close-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
}

/* Responsive design for time picker */
@media (max-width: 640px) {
    .time-picker-dropdown {
        left: -10px;
        right: -10px;
        max-height: 350px;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .time-slot {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .time-picker-header,
    .time-picker-periods,
    .time-picker-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .period-title {
        font-size: 12px;
    }
    
    .time-picker-header h3 {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-slot {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Animation for time picker dropdown */
@keyframes timePickerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-picker-dropdown:not(.hidden) {
    animation: timePickerSlideDown 0.2s ease-out;
}

/* Enhanced input field for time picker */
.time-picker-container input[readonly] {
    background: white;
    position: relative;
}

.time-picker-container input[readonly]:after {
    content: '🕐';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Focus states */
.time-picker-container input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0ea5e9;
    border-color: #0ea5e9;
}

/* Time picker active state */
.time-picker-container.active input {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Quick Actions Modal Styles */
.modal-backdrop {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
    transform-origin: center;
}

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

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

/* Modal responsive adjustments */
@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-content .p-6 {
        padding: 1rem !important;
    }
}

/* Ensure modals are properly centered */
.modal-backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Modal close button hover effect */
.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}
