/* ==========================================================================
   DESIGN SYSTEM & BRAND TOKENS (Kameny zmizelých v Náchodě)
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-primary: #FAF9F6;      /* Warm Ivory */
    --bg-secondary: #FFFFFF;    /* Pure White for cards/containers */
    --bg-tertiary: #F4F1EA;     /* Soft warm grey for buttons/inputs */
    --text-primary: #1C1C1A;    /* Dark Charcoal */
    --text-secondary: #605F5A;  /* Muted Slate Grey */
    --border-color: rgba(0, 0, 0, 0.09);
    
    /* Stolpersteine Brass / Gold Accent */
    --accent-color: #C59B27;
    --accent-color-hover: #AA821A;
    --accent-dark: #785507;
    --accent-light: #FFF8E1;
    
    /* Typography */
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   BASE STYLES & FULLSCREEN LAYOUT
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#map-view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background-color: #FFFFFF;
}

/* Projasněný černobílý podklad mapy: čistě bílé ulice, jemné šedé budovy a linie */
.leaflet-tile-pane,
.leaflet-tile,
.leaflet-pane.leaflet-tile-pane img {
    -webkit-filter: grayscale(100%) brightness(114%) contrast(86%) !important;
    filter: grayscale(100%) brightness(114%) contrast(86%) !important;
}

/* ==========================================================================
   LEAFLET CUSTOMIZED POPUPS & CONTROLS
   ========================================================================== */

/* ==========================================================================
   LEAFLET CUSTOMIZED POPUPS (Beige Card Style matching screenshots)
   ========================================================================== */

.leaflet-popup-content-wrapper {
    background-color: #F2ECDC !important;
    color: #262422 !important;
    border-radius: 16px !important;
    font-family: var(--font-family) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22) !important;
    border: none !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-tip-container {
    margin-top: -1px;
}

.leaflet-popup-tip {
    background-color: #F2ECDC !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 14px 18px !important;
    min-width: 250px !important;
    max-width: 320px !important;
    box-sizing: border-box;
}

.map-popup-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.map-popup-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.map-popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
    transition: background-color 0.15s ease;
}

.map-popup-item-link {
    cursor: pointer;
}

.map-popup-item-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.popup-item-media {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.popup-item-thumb-icon {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.popup-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.popup-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: #262422;
    margin: 0 0 2px 0 !important;
    line-height: 1.25;
}

.popup-item-address {
    font-size: 0.81rem;
    font-weight: 500;
    color: #58534C;
    margin: 0 !important;
    line-height: 1.3;
}

.popup-item-status {
    font-size: 0.78rem;
    font-weight: 400;
    color: #756F67;
    margin: 2px 0 0 0 !important;
    line-height: 1.25;
}

.leaflet-bar {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    transition: background-color 0.2s !important;
}

.leaflet-bar a:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--accent-color) !important;
}

/* ==========================================================================
   CUSTOM LEAFLET MARKERCLUSTER STYLES (Stolpersteine Theme)
   ========================================================================== */

.custom-cluster {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFFFFF !important;
    font-weight: 700;
    font-family: var(--font-family), sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2.5px solid #FFFFFF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-cluster:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.custom-cluster-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.custom-cluster-inner span {
    font-size: 0.88rem;
    line-height: 1;
}

.custom-cluster-stolperstein {
    background-color: var(--accent-color);
}
