/**
 * ParkShark NYC - Additional Custom Styles
 * These styles complement the Tailwind CSS build
 */

/* Additional utility classes not in Tailwind */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Range slider customization */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #1e293b;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    margin-top: -6px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-track {
    background: #1e293b;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Checkbox toggle animation */
input[type="checkbox"]:checked + div {
    transition: all 0.2s ease-in-out;
}

/* Table row hover effect */
tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

/* Card hover lift effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Fade in animation for page transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#page-content > div {
    animation: fadeIn 0.2s ease-out;
}

/* Loading state overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 25, 35, 0.9);
    z-index: 50;
}

/* Toast container positioning */
#toast-container {
    pointer-events: none;
}

#toast-container > div {
    pointer-events: auto;
}

/* Progress ring animation */
.circular-progress {
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Timer display font variant */
.timer-display {
    font-variant-numeric: tabular-nums;
}

/* Filter chip active state */
.filter-chip.active {
    background-color: #0066cc !important;
    color: white !important;
}

/* Select dropdown styling */
select {
    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 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Focus ring styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Scrollbar for event stream */
.event-stream::-webkit-scrollbar {
    width: 6px;
}

.event-stream::-webkit-scrollbar-track {
    background: transparent;
}

.event-stream::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 3px;
}

/* Location card map preview placeholder */
.map-preview-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Responsive sidebar collapse for mobile */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: -100%;
        z-index: 50;
        transition: left 0.3s ease-in-out;
    }
    
    #sidebar.open {
        left: 0;
    }
    
    #main-content {
        margin-left: 0 !important;
    }
}

/* Print styles */
@media print {
    #sidebar,
    #toast-container {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Leaflet Map Customizations */
.leaflet-container {
    background: #0f1923;
    font-family: 'Space Grotesk', sans-serif;
}

.leaflet-control-attribution {
    background: rgba(15, 25, 35, 0.8) !important;
    color: #64748b !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
}

.leaflet-control-attribution a {
    color: #0066cc !important;
}

/* Custom marker styles */
.custom-marker {
    background: transparent;
    border: none;
}

.user-location-marker {
    background: transparent;
    border: none;
}

/* Pulse animation for user location */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.user-pulse {
    width: 40px;
    height: 40px;
    background: rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    position: absolute;
    top: -12px;
    left: -12px;
    animation: pulse 2s infinite;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-tip {
    background: #1e293b !important;
}

.leaflet-popup-close-button {
    color: #94a3b8 !important;
}

/* Hide default Leaflet controls (we use custom ones) */
.leaflet-control-zoom {
    display: none !important;
}
