﻿html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Hover cards */
.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--mud-palette-surface, #ffffff);
    border-top: none !important;
    z-index: 1200;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

@media (min-width: 960px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--mud-palette-text-secondary, #64748b);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    gap: 2px;
    transition: color 0.15s ease;
    user-select: none;
}

.mobile-bottom-nav-item.active {
    color: var(--mud-palette-primary, #2563eb);
}

.mobile-bottom-nav-item.active .mud-icon-root {
    transform: scale(1.1);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-badge {
    position: absolute;
    top: 6px;
    margin-left: 14px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9999px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
}

/* Content spacing and full-height map layout */
.main-content-container:has(.map-wrapper) {
    box-sizing: border-box !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding-top: 48px !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.map-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-bottom-preview {
    bottom: 16px !important;
}

.map-fab-location {
    position: absolute;
    right: 16px;
    z-index: 1000;
    transition: bottom 0.25s ease;
    bottom: 24px;
}

.map-fab-location.with-drawer {
    bottom: 170px;
}

@media (max-width: 959.98px) {
    .main-content-container {
        padding-bottom: 60px !important;
    }
    .main-content-container:has(.map-wrapper) {
        padding-bottom: 60px !important;
    }
    .map-bottom-preview {
        bottom: 68px !important;
    }
    .map-fab-location {
        bottom: 76px;
    }
    .map-fab-location.with-drawer {
        bottom: 220px;
    }
}

/* Filter chips scroll container & text safety */
.filter-chips-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-chips-container::-webkit-scrollbar {
    display: none;
}
.filter-chips-container .mud-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Card chips sizing */
.preview-card-chip {
    font-size: 11px !important;
    height: 22px !important;
    padding: 0 8px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Restroom Map popup & badge utility classes */
.wc-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 220px;
    max-width: 280px;
    padding: 4px;
}
.wc-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.wc-popup-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.wc-popup-desc {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}
.wc-popup-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.wc-popup-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wc-btn-primary {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}
.wc-btn-success {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
}
.wc-btn-copy {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.wc-code-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wc-code-box-open {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 10px;
    text-align: center;
}
.wc-code-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.wc-code-val {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 1px;
}
.wc-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.wc-badge-sm {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.wc-badge-amber {
    background: #fef3c7;
    color: #b45309;
}
.wc-badge-slate {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}
.wc-badge-blue {
    background: #e0f2fe;
    color: #0369a1;
}
.wc-badge-purple {
    background: #ede9fe;
    color: #6d28d9;
}
.wc-badge-green {
    background: #dcfce7;
    color: #15803d;
}
.wc-badge-red {
    background: #fee2e2;
    color: #b91c1c;
}
.wc-badge-indigo {
    background: #e0e7ff;
    color: #4338ca;
}

/* Leaflet Popup Enhancements */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    padding: 4px !important;
}

.leaflet-popup-content {
    margin: 10px 12px !important;
    line-height: 1.4 !important;
}

.leaflet-container {
    font-family: inherit !important;
}

/* User Location Pulsing Radar Pin */
.user-location-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-dot {
    width: 14px;
    height: 14px;
    background-color: #2563eb;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
    position: relative;
    z-index: 2;
}
.user-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 22px;
    height: 22px;
    background-color: rgba(37, 99, 235, 0.35);
    border-radius: 50%;
    animation: user-radar-pulse 2s infinite ease-out;
    z-index: 1;
}
@keyframes user-radar-pulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}
