/* Smart Parking Custom Stylesheet */

/* Global Resets and Utilities */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Glassmorphism Classes */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Loader Animation */
#global-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.fade-out { opacity: 0; pointer-events: none; }

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e7ff;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Parking Map Grid Render (User Side) */
.parking-map-grid {
    background-color: #f8fafc;
    background-image: linear-gradient(rgba(203, 213, 225, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.4) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    position: relative;
    box-shadow: inset 0 2px 10px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 0 auto;
}

/* Map Elements */
.map-el {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

/* Spot Types */
.type-spot-car, .type-spot-motor, .type-spot-truck, .type-spot-bus {
    background-color: #4f46e5; color: white; border: 2px solid #312e81; cursor: pointer;
}
.type-spot-car.spot-available:hover, 
.type-spot-motor.spot-available:hover, 
.type-spot-truck.spot-available:hover, 
.type-spot-bus.spot-available:hover {
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    z-index: 20;
}
.type-road {
    background-color: #94a3b8; color: transparent; border: 2px dashed #475569; opacity: 0.8 !important;
    background-image: repeating-linear-gradient(90deg, transparent, transparent 10px, #e2e8f0 10px, #e2e8f0 20px);
    border-radius: 0;
    z-index: 5;
    box-shadow: none;
}
.type-wall {
    background-color: #334155; color: transparent; border: 1px solid #0f172a;
    border-radius: 2px;
    z-index: 10;
}

/* Spot States */
.spot-occupied { 
    background-color: #ef4444 !important; 
    border-color: #7f1d1d !important; 
    cursor: not-allowed; 
    opacity: 0.9 !important;
}
.spot-selected { 
    background-color: #ec4899 !important;
    border: 2px solid #9d174d !important; 
    box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.2) !important; 
    z-index: 50 !important; 
}

/* Custom Checkbox/Radio */
.form-radio:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
    border-color: transparent;
    background-color: currentColor;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Smooth Inputs */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Parking spots styling */
.parking-spot {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.parking-spot:hover:not(.cursor-not-allowed) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.parking-spot.selected {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Toast animation */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#success-toast {
    animation: slideIn 0.3s ease-out;
}