/* Custom Styles for Booking System */

* {
    -webkit-tap-highlight-color: transparent;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* Smooth transitions for all elements */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Improved focus states for accessibility */
input:focus,
select:focus,
button:focus {
    outline: none;
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Admin tab active state */
.admin-tab.active {
    background-color: #f9fafb;
}

/* Admin header */
.admin-header {
    background-color: #A9A9A9 !important;
}

/* Table responsive */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Improved toast container positioning for mobile */
@media (max-width: 640px) {
    #toast-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
    
    #toast-container > div {
        width: 100%;
    }
}

/* Smooth modal transitions */
#edit-modal {
    transition: opacity 0.3s ease;
}

#edit-modal:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

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

/* Better button states */
button:disabled {
    cursor: not-allowed;
}

button:not(:disabled):active {
    transform: scale(0.98);
}

/* Improved card hover effects */
.hover\:shadow-md:hover {
    transform: translateY(-2px);
}

/* Print styles */
@media print {
    #toast-container,
    button,
    header button {
        display: none !important;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* PWA installation prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.pwa-install-prompt.show {
    transform: translateY(0);
}

/* Skeleton loading state */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Improved mobile menu */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Better spacing for form elements on mobile */
@media (max-width: 640px) {
    form input,
    form select,
    form button {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode */
    /*
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .bg-white {
        background-color: #2d2d2d !important;
    }

    .text-gray-800 {
        color: #e5e5e5 !important;
    }
    */
}
