/* Varna soseska: odziven videz za telefon in namizje */
:root {
    --vs-navy: #102b3b;
    --vs-bg: #f3f6f8;
    --vs-border: #dbe5ec;
    --vs-text: #172d3a;
}
html { scroll-behavior: smooth; }
body { min-height: 100vh; background: var(--vs-bg); color: var(--vs-text); font-size: 1rem; }
.navbar { background: var(--vs-navy); }
.navbar-brand { letter-spacing: -.02em; white-space: normal; }
.navbar .nav-link { border-radius: .55rem; padding: .55rem .75rem; }
.navbar .nav-link:hover, .navbar .nav-link:focus-visible { background: rgba(255,255,255,.11); }
.navbar-toggler { border-color: rgba(255,255,255,.35); }
main.container { min-height: 60vh; }
.card { border: 1px solid var(--vs-border); border-radius: 16px; box-shadow: 0 4px 18px rgba(16,43,59,.045); }
.card-body { min-width: 0; }
a.card { color: inherit; transition: transform .16s ease, box-shadow .16s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16,43,59,.11); }
.map { height: 360px; min-height: 260px; border-radius: 12px; overflow: hidden; background: #e9eef1; position: relative; z-index: 0; }
.big-map { height: min(60vh, 560px); min-height: 340px; }
.map-error { position: absolute; bottom: 32px; left: 12px; right: 12px; z-index: 1000; background: #fff3cd; color: #664d03; border-radius: 8px; padding: 10px 14px; font-size: .85rem; }
.map-error[hidden] { display: none; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { overflow-wrap: anywhere; }
.btn { border-radius: .65rem; }
.btn-lg { padding: .8rem 1.3rem; }
.form-label { font-weight: 600; margin-bottom: .4rem; }
form input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
form select, form textarea {
    display: block; width: 100%; max-width: 100%; min-width: 0;
    border: 1px solid #cbd5df; border-radius: .65rem;
    background: #fff; padding: .65rem .8rem;
}
form input[type=file] { padding: .55rem; }
form textarea { resize: vertical; min-height: 90px; }
form input:focus-visible, form select:focus-visible, form textarea:focus-visible {
    border-color: #3d85b2; outline: 3px solid rgba(61,133,178,.18);
}
form input[type=checkbox], form input[type=radio] { width: auto; }
.errorlist { color: #b42318; margin: .4rem 0; padding-left: 1.2rem; font-size: .9rem; }
.helptext { color: #64748b; font-size: .88rem; }
.auth-card { max-width: 560px; width: 100%; margin: 1.5rem auto 3rem; }
.auth-card .card-body { padding: clamp(1.25rem, 4vw, 2.5rem); }
.auth-card h1, .auth-card h2 { color: var(--vs-navy); }
.auth-card form p { margin-bottom: 1rem; }
.auth-card form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.auth-card .auth-icon { display: inline-flex; justify-content: center; align-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e9f5ff; color: #155b91; font-size: 2rem; }
.auth-card a { overflow-wrap: anywhere; }
.alert { border-radius: 12px; }
footer { line-height: 1.65; }
@media (max-width: 991.98px) {
    .navbar-collapse { padding: .75rem 0 1rem; }
    .navbar-nav { align-items: stretch !important; }
    .navbar .nav-link { padding: .8rem .65rem; }
    #enable-push { align-self: stretch !important; padding: .75rem; }
    .navbar form, .navbar form button { width: 100%; text-align: left; }
}
@media (max-width: 575.98px) {
    body { font-size: 1rem; }
    main.container { padding-top: 1.2rem !important; }
    h1.h2 { font-size: 1.65rem; }
    .card-body { padding: 1.1rem; }
    .map { height: 310px; min-height: 310px; }
    .big-map { height: 390px; min-height: 320px; }
    .btn-lg, .mobile-full { width: 100%; }
    .location-controls { flex-direction: column; align-items: stretch !important; }
    .location-controls .btn { width: 100%; min-height: 44px; }
    .auth-card { margin-top: .5rem; }
    input, select, textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Compact area filters and notes beneath the content. */
.event-filters { padding: 1rem; }
.event-filter-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, .65fr); align-items: end; gap: 1rem; }
.event-filter-field { min-width: 0; }
.event-filters select { padding: .5rem .7rem; min-height: 42px; }
.event-filters button { min-height: 42px; }
.map-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1rem; margin: .6rem 0 1.3rem; color: #536574; }
.spin-text { color: #0f766e; }
.weather-text { color: #955500; }
.feed-notes { line-height: 1.55; }
.site-purpose { line-height: 1.6; }
@media (max-width: 767.98px) {
    .event-filters { padding: .75rem; }
    .event-filter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem .7rem; }
    .event-filters .form-label { font-size: .8rem; margin-bottom: .2rem; }
    .event-filters select { min-height: 44px; padding: .4rem 1.8rem .4rem .5rem; border-radius: .5rem; text-overflow: ellipsis; }
    .event-filters button { min-height: 44px; }
    .map-legend { font-size: .72rem; gap: .3rem .7rem; margin-bottom: 1rem; }
    .feed-notes { font-size: .75rem; }
}

.weather-level-2 { background: #facc15; color: #422006; }
.weather-level-3 { background: #ea580c; color: white; }
.weather-level-4 { background: #b91c1c; color: white; }

.event-popup-description { max-height: 180px; overflow-y: auto; line-height: 1.45; margin: .6rem 0; white-space: pre-line; }
.leaflet-popup-content { max-width: min(320px, 72vw); }

.install-guide { max-width: 1000px; }
.install-steps li { margin-bottom: .8rem; padding-left: .2rem; }
.install-guide a { overflow-wrap: anywhere; }
@media (min-width: 992px) { .navbar-nav { flex-wrap: wrap; } }

#install-banner[hidden] { display: none !important; }
#address-results:empty { display: none; }
#address-results button { text-align: left; white-space: normal; }
#address-label { overflow-wrap: anywhere; }
.address-picker .form-control { min-width: 0; }
