html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #FCF5E1;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Logo Styles */
.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.home-logo {
    width: 100%;
    max-width: min(95vw, 1000px);
    height: auto;
    margin: 5rem auto 3rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease;
}

.home-logo:hover {
    transform: scale(1.02);
}

@media (max-width: 576px) {
    .nav-logo {
        height: 32px;
    }
}

a, .btn-link {
    color: #00A3E0;
}

.btn-primary {
    color: #fff;
    background-color: #00A3E0;
    border-color: #0092c8;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #00A3E0;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #E30613;
}

.validation-message {
    color: #E30613;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnN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A5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.map-wrapper {
    position: relative;
}

.page--map .map-wrapper {
    height: 100vh;
}

/* User position marker (Google Maps-style arrow) */
.position-marker {
    background: none !important;
    border: none !important;
}

.position-marker__pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 46px;
    height: 46px;
    transform: translate(-50%, -50%);
    background: rgba(26, 115, 232, 0.10);
    border-radius: 50%;
}

.position-marker__arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
}

.position-marker__arrow::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
}

.position-marker__arrow::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 34px;
    clip-path: polygon(50% 0%, 100% 75%, 50% 55%, 0% 75%);
    background: #4286f5;
}

.map-canvas {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.page--map .map-canvas {
    height: 100vh;
    min-height: 0;
    border-radius: 0;
}

.map-hud {
    position: absolute;
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    left: 0.75rem;
    right: 0.75rem;
    z-index: 1500;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    pointer-events: none;
}

.map-hud > * {
    pointer-events: auto;
}

.map-hud__status {
    margin: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(252, 245, 225, 0.96);
    border: 1px solid rgba(11, 15, 20, 0.18);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    font-weight: 600;
}

.map-hud__actions {
    align-items: center;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(252, 245, 225, 0.94);
    border: 1px solid rgba(11, 15, 20, 0.18);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(8px);
}

.leaflet-popup-content {
    width: fit-content;
    min-width: min(220px, 70vw);
    max-width: min(280px, 85vw);
}

.leaflet-popup-content .btn {
    white-space: normal;
    height: auto;
    line-height: 1.2;
    padding-inline: 0.75rem;
}

.leaflet-popup-content .proximity-actions {
    align-items: stretch;
}

.leaflet-popup-content .proximity-actions .btn,
.leaflet-popup-content .proximity-actions [data-role="already-found"],
.leaflet-popup-content .btn.btn-warning {
    width: 100%;
}

.table-sort-btn {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    padding: 0;
    border: 0;
    background: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.table-dark .table-sort-btn,
.table-dark .table-sort-btn i {
    color: #fff;
}

.table-sort-btn i {
    font-size: 0.85rem;
}

.page--map .map-hud__status {
    margin-left: 3.25rem;
}

.page--map .leaflet-top.leaflet-right {
    top: 4.5rem;
}

.map-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 1000;
    text-align: center;
    padding: 2rem;
}

.map-icon-toggle {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.map-icon-toggle i {
    font-size: 1.1rem;
}

.map-icon-toggle.active {
    background-color: #00A3E0;
    color: #fff;
    border-color: #0092c8;
}

.leaflet-routing-container.leaflet-control {
    max-width: min(320px, calc(100% - 2rem));
}

.leaflet-routing-container .leaflet-routing-close {
    display: none !important;
}

.page--map .leaflet-control-attribution a[href*="leafletjs.com"],
.page--map .leaflet-control-attribution a[title*="Leaflet"] {
    display: none !important;
}

.page--map .leaflet-control-attribution a[href*="leafletjs.com"] + span {
    display: none !important;
}

.page--map .leaflet-control-attribution img {
    display: none !important;
}

@media (max-width: 992px) {
    .map-canvas {
        height: 65vh;
        min-height: 360px;
    }
}

@media (max-width: 576px) {
    .map-canvas {
        height: 60vh;
        min-height: 300px;
    }

    .page--map .map-canvas {
        height: 100dvh;
    }

    .page--map .map-wrapper {
        height: 100dvh;
    }

    .map-hud {
        right: calc(0.75rem + 3.25rem + 0.4rem);
        flex-direction: column;
        align-items: stretch;
    }

    .map-hud__actions {
        justify-content: flex-end;
        background: rgba(252, 245, 225, 0.96);
        width: fit-content;
        align-self: flex-end;
        padding: 0.25rem;
        border-radius: 999px;
    }

    .page--map .map-hud__status {
        position: fixed;
        bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
        left: 0.75rem;
        right: auto;
        margin: 0;
        font-size: 0.85rem;
        padding: 0.35rem 0.6rem;
        width: fit-content;
        max-width: calc(100% - 1.5rem);
    }

    .map-hud__actions {
        order: 1;
    }

    .page--map .leaflet-top.leaflet-right {
        top: 7.25rem;
    }

    .leaflet-routing-container.leaflet-control {
        width: calc(100% - 2rem);
        max-width: none;
        right: 1rem !important;
        left: auto !important;
        max-height: 50vh;
        overflow-y: auto;
    }
}

.settings-news-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.settings-news-table th.settings-news-published-col,
.settings-news-table td.settings-news-published-col,
.settings-news-table th.settings-news-actions-col,
.settings-news-table td.settings-news-actions-col {
    white-space: nowrap;
}

.settings-news-table th.settings-news-published-col,
.settings-news-table td.settings-news-published-col {
    min-width: 10rem;
}

.settings-news-table th.settings-news-actions-col,
.settings-news-table td.settings-news-actions-col {
    min-width: 13rem;
}

.settings-news-table td.settings-news-published-col .d-flex {
    flex-wrap: nowrap;
}

.settings-news-table td.settings-news-actions-col .btn-group {
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.settings-news-table td.settings-news-actions-col .btn-group > .btn + .btn {
    margin-left: 0;
}
