* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info button {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

/* ===== 3-COLUMN LAYOUT ===== */

.content-3col {
    display: grid;
    grid-template-columns: 250px 1fr 380px;
    gap: 0;
    height: 600px;
}

/* ===== LEFT SIDEBAR ===== */

.left-sidebar {
    background: #f8f9fa;
    padding: 15px;
    overflow-y: auto;
    border-right: 2px solid #e0e0e0;
}

.left-panel {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 12px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    font-size: 13px;
    font-weight: 600;
}

.panel-header:hover {
    opacity: 0.9;
}

.panel-arrow {
    font-size: 10px;
    transition: transform 0.3s;
    display: inline-block;
    width: 12px;
}

.panel-content {
    padding: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

/* ===== MAP CENTER ===== */

.map-container {
    position: relative;
    background: #e0e0e0;
}

#map {
    height: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ===== RIGHT SIDEBAR ===== */

.right-sidebar {
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
}

.info-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

/* ===== AUTH OVERLAY ===== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.auth-form h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.auth-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 600;
}

.auth-tab.active {
    background: #667eea;
    color: white;
}

/* ===== RATING FORM ===== */

.rating-form {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rating-form h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
    font-size: 13px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
    font-size: 13px;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.privacy-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 8px;
    border-radius: 5px;
    font-size: 11px;
    margin-bottom: 12px;
}

/* ===== FORM SECTIONS ===== */

.form-section {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.section-header {
    background: #f8f9fa;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.section-header:hover {
    background: #e9ecef;
}

.section-arrow {
    font-size: 12px;
    width: 15px;
    display: inline-block;
}

.required-badge {
    color: #dc3545;
    font-size: 11px;
    font-weight: normal;
}

.optional-badge {
    color: #6c757d;
    font-size: 11px;
    font-weight: normal;
}

.section-content {
    padding: 12px;
}

.required {
    color: #dc3545;
}

/* ===== ICON RATINGS ===== */

.icon-rating {
    display: flex;
    gap: 6px;
    font-size: 28px;
    cursor: pointer;
    margin: 8px 0;
}

.rating-icon {
    opacity: 0.3;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}

.rating-icon:hover {
    transform: scale(1.15);
}

.rating-icon.active {
    opacity: 1;
}

.rating-help {
    font-size: 11px;
    color: #6c757d;
    margin: 3px 0 0 0;
    font-style: italic;
}

.input-help {
    font-size: 11px;
    color: #6c757d;
    margin: 3px 0 0 0;
}

/* ===== CHECKBOXES ===== */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 12px;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.subsection-title {
    font-weight: 600;
    color: #495057;
    margin: 12px 0 8px 0;
    font-size: 12px;
}

.subsection-title:first-child {
    margin-top: 0;
}

/* ===== FORM ACTIONS ===== */

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    flex: 1;
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ===== RESTROOM LIST ===== */

.restroom-list {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.restroom-list h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
}

.bench-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
}

.bench-item:hover {
    background: #f8f9fa;
}

.bench-rating {
    font-weight: bold;
    font-size: 13px;
}

/* ===== AMENITY BADGES ===== */

.amenity-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin: 2px;
    border: 1px solid #c8e6c9;
}

.amenity-section {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
}

.amenity-section-title {
    font-weight: 600;
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
    text-transform: uppercase;
}

/* ===== MAP POPUPS ===== */

.leaflet-popup-content {
    margin: 10px 14px !important;
    line-height: 1.4;
    font-size: 13px;
}

.popup-location {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.popup-ratings {
    margin: 8px 0;
    line-height: 1.6;
}

.popup-rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    font-size: 12px;
}

.popup-rating-label {
    min-width: 80px;
    font-size: 11px;
    color: #555;
}

.popup-rating-icons {
    font-size: 12px;
}

.popup-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    font-size: 10px;
    color: #888;
}

/* ===== CATEGORY SELECTION ===== */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 12px;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-label input[type="radio"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-text {
    flex: 1;
}

.radio-text strong {
    display: block;
    margin-bottom: 2px;
}

.radio-group-inline {
    display: flex;
    gap: 15px;
}

.radio-label-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 12px;
}

.radio-label-inline input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.category-fields {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.category-fields-header {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
    font-size: 12px;
    text-transform: uppercase;
}

/* ===== MOBILE RESPONSIVENESS ===== */

@media (max-width: 1400px) {
    .content-3col {
        grid-template-columns: 220px 1fr 350px;
    }
}

@media (max-width: 1200px) {
    .content-3col {
        grid-template-columns: 200px 1fr 320px;
    }
    
    .left-panel {
        font-size: 12px;
    }
    
    .stat-item {
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .content-3col {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .left-sidebar {
        order: 3;
        border-right: none;
        border-top: 2px solid #e0e0e0;
        max-height: 300px;
    }
    
    .map-container {
        order: 1;
    }
    
    #map {
        height: 400px;
    }
    
    .right-sidebar {
        order: 2;
    }
    
    .user-info {
        position: static;
        margin-top: 10px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .icon-rating {
        font-size: 24px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* ===== FILTER CONTROLS ===== */

.filter-section {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-section-title {
    font-weight: 700;
    font-size: 11px;
    color: #667eea;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 0;
    font-size: 12px;
    transition: background 0.2s;
    border-radius: 3px;
    padding-left: 4px;
}

.filter-checkbox-label:hover {
    background: #f8f9fa;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.filter-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    cursor: pointer;
}

.filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-slider::-webkit-slider-thumb:hover {
    background: #764ba2;
}

.filter-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.filter-slider::-moz-range-thumb:hover {
    background: #764ba2;
}

.filter-quick-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;  /* Dark gray text - readable! */
}

.filter-quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.filter-clear-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-clear-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ===== SEARCH PANEL ===== */

.search-input-group {
    margin-bottom: 15px;
    position: relative;  /* For absolute positioning of dropdown */
}

.search-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
    margin-bottom: 8px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-input::placeholder {
    color: #999;
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 38px;  /* Below input field */
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: #f0f3ff;
    color: #667eea;
}

.search-suggestion-item .suggestion-name {
    font-weight: 600;
    color: #333;
}

.search-suggestion-item.selected .suggestion-name {
    color: #667eea;
}

.search-suggestion-item .suggestion-distance {
    font-weight: 400;
    color: #888;
    font-size: 10px;
}

.search-suggestion-item.selected .suggestion-distance {
    color: #667eea;
}

.search-suggestion-item .suggestion-details {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.search-suggestions-loading {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: #999;
}

.search-suggestions-empty {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: #999;
}

.search-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.search-radius-group {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.search-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-action-btn {
    width: 100%;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;  /* Dark gray text - readable! */
}

.search-action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.search-action-btn.search-clear {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;  /* Dark yellow/brown - readable on yellow background */
}

.search-action-btn.search-clear:hover {
    background: #ffc107;
    color: #333;
    border-color: #ffc107;
}