/* Standorte Page Styles */

/* Reset and base styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Add padding for nav bar */
body{
    padding-top: 66px;
}

/* Navbar Override for Standorte Page */
.custom-navbar {
    background: linear-gradient(350deg, #c64034, #ed9e57) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.custom-navbar .nav-link {
    color: white !important;
}

.custom-navbar .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.custom-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Map Container Styles */
.map-container {
    display: flex;
    height: 100%;
}

/* Sidebar Styles */
.map-sidebar {
    width: 400px;
    background: #fff;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1;
    transition: transform 0.3s ease;
}

.map-sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(350deg, #c64034, #ed9e57);
    color: white;
    position: relative;
}

/* Close Sidebar Button */
.close-sidebar-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    z-index: 10;
}

.close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.close-sidebar-btn .material-icons {
    font-size: 20px;
}

/* Reopen Sidebar Button */
.reopen-sidebar-btn {
    position: fixed;
    top: 160px;
    left: 15px;
    background: linear-gradient(350deg, #c64034, #ed9e57);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1000;
    padding: 0;
}

.reopen-sidebar-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.reopen-sidebar-btn.visible {
    display: flex;
}

.reopen-sidebar-btn .material-icons {
    font-size: 24px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #fff;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: #ffca30;
}

/* Filter Section */
.filter-section {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    display: none;
}

.filter-section.active {
    display: block;
}

.filter-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: #c64034;
}

.filter-btn.active {
    background: #c64034;
    color: white;
    border-color: #c64034;
}

/* List Items */
.list-section {
    padding: 0;
}

.list-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:hover {
    background: #f5f5f5;
}

.list-item.active {
    background: #fff3e0;
    border-left: 4px solid #c64034;
}

.list-item h4 {
    font-size: 1rem;
    margin: 0 0 5px 0;
    color: #333;
}

.list-item p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.toilet-count {
    display: inline-block;
    background: #c64034;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.toilet-icons {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.toilet-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.material-icons {
    vertical-align: middle;
    line-height: 1;
}

.filter-btn .material-icons {
    font-size: 18px;
}

/* Map Styles */
#map {
    flex: 1;
    height: 100%;
}

/* Back Button */
.back-btn {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    color: white;
    text-decoration: none;
}

.back-btn.active {
    display: inline-block;
}

.back-btn:hover {
    text-decoration: underline;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.error-message {
    padding: 20px;
    background: #ffebee;
    color: #c62828;
    border-radius: 5px;
    margin: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
        position: relative;
    }

    .map-sidebar {
        width: 100%;
        height: 50vh;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 100;
    }
    
    .map-sidebar.closed {
        transform: translateY(-100%);
    }

    #map {
        height: 100vh;
    }
    
    .close-sidebar-btn {
        display: flex;
    }
    
    .reopen-sidebar-btn {
        top: 160px;
    }
}
