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

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Search */
.search-container {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 480px;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 15px;
    background: transparent;
}

.search-box button {
    border: none;
    background: none;
    padding: 12px 14px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
}

.search-box button:hover {
    color: #1a73e8;
}

.search-results {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 2px;
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

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

.search-result-item:hover {
    background: #f5f8ff;
}

.search-result-item .result-type {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.search-no-results {
    padding: 12px 16px;
    color: #999;
    font-size: 14px;
}

/* Language switcher */
.lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    gap: 2px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    overflow: hidden;
}

.lang-btn {
    border: none;
    background: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: #f0f0f0;
}

.lang-btn.active {
    background: #1a73e8;
    color: #fff;
}

/* Logo */
.logo {
    position: absolute;
    bottom: 24px;
    left: 16px;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1a73e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

/* Coordinates panel */
.coords-panel {
    position: absolute;
    bottom: 24px;
    right: 16px;
    z-index: 1000;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    width: 300px;
    max-height: 250px;
    overflow-y: auto;
}

.coords-panel.hidden {
    display: none;
}

.coords-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.coords-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.coords-close:hover {
    color: #333;
}

#coords-body {
    padding: 10px 14px;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

#coords-body .addr-line {
    margin-bottom: 4px;
}

#coords-body .addr-coords {
    color: #888;
    font-size: 12px;
    margin-top: 6px;
    font-family: monospace;
}

/* Leaflet popup override */
.leaflet-popup-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    max-width: 250px;
}

/* Mobile */
@media (max-width: 600px) {
    .search-container {
        width: 85%;
        top: 10px;
    }

    .lang-switcher {
        top: 10px;
        right: 8px;
    }

    .lang-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .coords-panel {
        left: 8px;
        right: 8px;
        bottom: 16px;
        width: auto;
    }

    .logo {
        bottom: 16px;
        left: 8px;
        font-size: 12px;
        padding: 4px 10px;
    }
}
