/* Mobile-first CSS für Werksgelände Navigation */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow: hidden;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c5234, #4a7c59);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
    gap: 1rem;
}

.header-left h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    flex-grow: 1;
    justify-content: center;
    max-width: 500px;
}

.header-nav select {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 0;
    flex: 1;
}

.header-nav select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
    background: white;
}

.header-nav select:hover {
    background: white;
    transform: translateY(-1px);
}

.header-right {
    flex-shrink: 0;
}

.menu-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Navigation Panel */
.nav-panel {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
}

.nav-panel.active {
    transform: translateY(0);
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c5234;
}

.nav-section select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s;
}

.nav-section select:focus {
    outline: none;
    border-color: #2c5234;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-location {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5234, #4a7c59);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 52, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-location {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-link {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
}

/* Status Bar */
.status-bar {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Leaflet Marker Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 1rem;
    font-size: 0.9rem;
}

.popup-title {
    font-weight: 600;
    color: #2c5234;
    margin-bottom: 0.5rem;
}

.popup-description {
    color: #666;
    font-size: 0.8rem;
}

/* Loading Animation */
.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Navigation */
.mobile-nav {
    display: block;
}

.mobile-nav-controls {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.mobile-nav-controls select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s;
}

.mobile-nav-controls select:focus {
    outline: none;
    border-color: #2c5234;
}

/* Responsive Design */
@media (max-width: 767px) {
    .header-nav {
        display: none;
    }

    .header-left h1 {
        font-size: 1rem;
    }

    .menu-btn {
        padding: 0.4rem 0.6rem;
    }

    .mobile-nav {
        display: block;
    }
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }

@media (min-width: 768px) {
    .header-left h1 {
        font-size: 1.3rem;
    }

    .header-nav select {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    .nav-panel {
        max-width: 350px;
        right: auto;
        max-height: 80vh;
    }

    .app {
        flex-direction: row;
    }

    .nav-panel {
        position: relative;
        transform: none;
        width: 350px;
        height: calc(100vh - 80px);
        flex-shrink: 0;
    }

    .nav-panel.active {
        transform: none;
    }

    .menu-btn {
        display: none;
    }
}

@media (min-width: 1200px) {
    .nav-panel {
        width: 400px;
    }
}