/* ========== MAP VIEW ========== */
#map-view {
    flex-direction: column;
    align-items: center;
    position: relative;
    /* Body scrolls now (was: this view scrolled internally); using visible
       lets the body's overflow handle scroll-to-footer cleanly. */
    overflow-y: visible;
    z-index: 1;
}

.map-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px 4px;
    pointer-events: none;
    z-index: 10;
    flex-shrink: 0;
}

.hero-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
    pointer-events: auto;
    flex-shrink: 0;
}

.hero-text {
    pointer-events: auto;
    text-align: center;
}

.map-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
    margin: 0;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.map-subtitle {
    font-size: 1.1rem;
    color: #5a6c7d;
    font-style: italic;
    margin: 4px 0 0;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.6);
}

.map-intro {
    width: 100%;
    max-width: 800px;
    padding: 20px 20px 40px;
    flex-shrink: 0;
}

.map-intro .intro-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.map-intro .intro-section h2 {
    font-size: 18px;
    color: var(--accent);
    margin: 0 0 12px;
}

.map-intro .intro-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px;
}

.map-intro .intro-section p:last-child {
    margin-bottom: 0;
}

.map-intro .intro-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.map-intro .intro-steps li {
    color: var(--text-secondary);
    padding: 8px 0 8px 32px;
    position: relative;
    line-height: 1.5;
    counter-increment: step;
}

.map-intro .intro-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 8px;
}

/* ---- Howto / goals list base sizing ----
   Chrome (×, ≡, + Přidat) is injected and styled by js/widget-chrome.js. */
.howto-item, .goals-item {
    position: relative;
}
.howto-content, .goals-content {
    min-width: 1em;
}
.map-intro .intro-section--custom {
    position: relative;
}

#map-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    z-index: 1;
}

#map-svg {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#map-svg .region {
    fill: rgb(212, 168, 68);
    stroke: rgb(153, 115, 38);
    stroke-width: 1;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    transform-origin: center;
}

#map-svg .region:hover,
#map-svg .region.highlighted {
    filter: brightness(1.2);
    transform: translateY(-4px);
    stroke: rgb(128, 89, 26);
    stroke-width: 1.5;
}

#dot-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    will-change: left, top;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s ease;
}

.dot:hover {
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.7);
    z-index: 5;
    transform: translate(-50%, -50%) scale(1.3);
}

.dot.lifted {
    transform: translate(-50%, calc(-50% - 8px));
    filter: brightness(1.3);
}

.dot.dimmed {
    opacity: 0.3;
    width: 8px;
    height: 8px;
}

.dot.highlight-needs-prayer {
    box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6);
    background: #FFD700 !important;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot.photo-mode {
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
}

#hover-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 16px;
    background: rgba(0,0,0,0.8);
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
    pointer-events: none;
}

/* Map filter button for highlighting adopted politicians */
.map-filter-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 16px;
    color: #2c3e50;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Show button only when map view is active */
#map-view.active .map-filter-btn {
    display: flex;
}

.map-filter-btn:hover {
    background: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

.map-filter-btn .icon {
    font-size: 16px;
}

.map-filter-btn.active .icon {
    color: #FFD700;
}

