
@import url('/_content/RoamingCeylon.Shared.UI/css/theme.css');

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    line-height: 1.6;
    margin: 0;
}

.loading-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    color: var(--brand-primary);
}

.loading-progress circle {
    stroke: currentColor;
    stroke-width: 4;
    fill: transparent;
    stroke-dasharray: 283;
    stroke-dashoffset: 75;
    transform-origin: 50% 50%;
    animation: loading-progress 1.5s ease-in-out infinite;
}

.loading-progress-text {
    position: fixed;
    top: calc(50% + 3rem);
    left: 50%;
    transform: translateX(-50%);
    color: var(--brand-secondary);
    font-weight: 600;
}

.city-chip-scroll{
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

@keyframes loading-progress {
    0% {
        stroke-dashoffset: 280;
        transform: rotate(0deg);
    }
    50% {
        stroke-dashoffset: 75;
        transform: rotate(45deg);
    }
    100% {
        stroke-dashoffset: 280;
        transform: rotate(360deg);
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: #f8d7da;
    color: #842029;
    border-top: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
    padding-left: 1rem;
}

.page {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Override MainLayout.razor.css (main { min-height: 100vh; }) */
main.w-100 {
    flex: 1 1 auto;
    min-height: 0;
}

/* Allow the Home main area to fill remaining viewport height and prevent bottom whitespace */
.home-main {
    flex: 1 1 auto;
    min-height: 0;
    /* Home itself manages an inner scroll region; other pages must still scroll normally */
    overflow: hidden;
}

.home-grid {
    min-height: 0;
    /* Prevent the overall page from scrolling due to list growth */
    overflow: hidden;
}

/* Default: pages should be able to scroll (e.g., venue details) */
article.content {
    padding: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* Home-only page scroll lock (without affecting other pages) */
body:has(.home-main) {
    overflow: hidden;
}

article.content:has(.home-main) {
    overflow: hidden;
    padding-bottom: 0 !important;
}



.auth-shell {
    min-height: auto;
    display: block;
}

.hero {
    background: #fff;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.04);
}

.hero h1 {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    margin-bottom: 0.05rem;
}

.hero p {
    max-width: 560px;
    color: #25303b;
    margin-bottom: 0;
}

.filter-card {
    border-radius: 16px;
    padding: 0.6rem 0.75rem;
}

.filter-card .form-floating label i {
    color: var(--brand-muted);
}

.stat-pill {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: linear-gradient(120deg, rgba(35,111,146,0.08), rgba(22,49,69,0.08));
    border: 1px solid rgba(22,49,69,0.12);
}

.btn-ghost {
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    background: #fff;
    border-radius: 12px;
    height: 44px; /* was 48px */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
}

.btn-ghost:hover {
    background: rgba(35, 111, 146, 0.08);
}

.filter-btn {
    height: 44px; /* was 48px */
}

.filter-input {
    height: 46px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px !important;
}

.compact-input .input-group-text {
    color: #6b7582;
    font-size: 18px;
    border: none;
    background: transparent;
}

.map-shell {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #fff;
    height: calc(100dvh - 220px);
    min-height: 420px;
    max-height: none;
}

#adminMap {
    height: 100%;
    min-height: inherit;
}

@media (max-width: 991.98px) {
    .map-shell {
        height: calc(100dvh - 180px);
        min-height: 40dvh;
    }
    #adminMap {
        min-height: 40dvh;
    }
}

.venue-list-item {
    cursor: pointer;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 10px 12px;
}

.venue-list-item:hover {
    background-color: rgba(35,111,146,0.06);
}

.venue-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}

.venue-title {
    font-size: 14px;
    margin-bottom: 2px;
}

.venue-meta {
    margin-bottom: 4px;
    color: #51606f;
}

.list-group-item .material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

.favorite-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.list-action-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.list-action-btn .material-icons {
    font-size: 18px;
}

.badge-featured {
    background: var(--sandy-brown);
    color: #1d1404;
}

.badge-verified {
    background: var(--yellow-green);
    color: #0f1f2f;
}

/* Mobile map/list toggle and filters */
.mobile-filter-bar {
    margin-bottom: 0.25rem !important;
    padding: 0.35rem 0.75rem 0.15rem !important;
}

.mobile-filter-bar .filter-input {
    background: #fff;
    border: 1px solid #dfe5eb;
    border-radius: 14px;
    padding: 6px 10px;
}

.mobile-filter-bar .filter-trigger {
    border-radius: 10px;
    padding: 6px 10px;
    height: 38px;
    font-size: 13px;
}

.mobile-filter-bar .filter-trigger .material-icons {
    font-size: 20px;
    line-height: 1;
}

.mobile-toggle-bar {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    display: inline-flex;
    gap: 8px;
    padding: 0;
    z-index: 1050;
}

/* Mobile toggle (Map / List) */
.toggle-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    background-color: #ffffff;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.toggle-button .material-icons {
    font-size: 20px;
}

.toggle-button.active {
    background: linear-gradient(135deg, #0E718C, #1a8ba6);
    border-color: #0E718C;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(14, 113, 140, 0.28);
}

.toggle-button:not(.active):hover {
    background-color: #f1f5f8;
}

/* Remove odd mobile tap highlight artifacts */
.toggle-button,
.mobile-filter-bar .filter-trigger {
    -webkit-tap-highlight-color: transparent;
}

/* App-store polish: better focus, press feedback */
.toggle-button:focus { outline: none; }

.toggle-button:focus-visible {
    outline: 3px solid rgba(14, 113, 140, 0.35);
    outline-offset: 3px;
}

.toggle-button:active {
    transform: scale(0.96);
}

.toggle-button:not(.active) {
    background-color: #ffffff;
    color: #495057;
}

.toggle-button:not(.active) .material-icons {
    opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
    .toggle-button {
        transition: none;
    }
    .filter-modal {
        animation: none;
    }
}

.filter-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: flex-end;
    z-index: 1100;
}

.filter-modal {
    width: 100%;
    max-height: 80vh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.18);
    animation: slideUpModal 0.25s ease-out;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    overflow: hidden;
}

.filter-modal .card-body {
    padding: 12px;
}

.filter-modal .accordion-button {
    padding-top: 10px;
    padding-bottom: 10px;
}

.filter-modal .accordion-body {
    padding: 10px 12px;
}

.mobile-list-card {
    max-height: 60vh;
    overflow-y: auto;
}

/* Venue detail */
.venue-photo {
    max-width: 220px;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ── Venue image gallery ── */
.venue-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.venue-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: rgba(22, 49, 69, 0.06);
}

.venue-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.venue-gallery-item:hover img {
    transform: scale(1.05);
}

.venue-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.venue-gallery-zoom .material-icons {
    color: #fff;
    font-size: 28px;
}

.venue-gallery-item:hover .venue-gallery-zoom {
    opacity: 1;
}

/* Lightbox overlay */
.venue-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
}

.venue-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    cursor: default;
}

.venue-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
}

.venue-lightbox-close .material-icons {
    color: #fff;
    font-size: 24px;
}

.venue-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile gallery adjustments */
@media (max-width: 576px) {
    .venue-gallery {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 6px;
    }

    .venue-gallery-item {
        border-radius: 8px;
    }

    /* Always show zoom hint on touch devices */
    .venue-gallery-zoom {
        opacity: 0;
    }

    .venue-lightbox img {
        max-width: 96vw;
        max-height: 80vh;
        border-radius: 6px;
    }

    .venue-lightbox-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
}

.detail-meta {
    display: grid;
    gap: 6px;
    color: #3a4b5c;
}

.detail-meta .material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 6px;
}

.venue-detail-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 2rem 0;
    overflow: visible;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.detail-hero h3 {
    margin: 0;
}

.venue-events-list {
    --bs-list-group-item-padding-y: 0;
    --bs-list-group-item-padding-x: 0;
}

.venue-events-list .venue-event-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.62rem 0.8rem;
}

.venue-event-content {
    min-width: 0;
    flex: 1 1 auto;
}

.venue-event-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.venue-event-when {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #3e4e5e;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.venue-event-when .material-icons {
    font-size: 16px;
    line-height: 1;
}

.venue-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}

.venue-event-description {
    color: #536274;
    font-size: 0.84rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.1rem;
}

.venue-event-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 96px;
}

.venue-event-actions .btn {
    white-space: nowrap;
    font-size: 0.86rem;
    line-height: 1.2;
    padding: 0.32rem 0.58rem;
}

.venue-event-actions .material-icons {
    font-size: 15px !important;
}

.venue-detail-page .highlight-item {
    align-items: flex-start !important;
    padding: 0.75rem 0.85rem;
}

.venue-detail-page .highlight-title {
    font-size: 0.98rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.venue-detail-page .highlight-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.venue-detail-page .highlight-description.expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
}

.venue-detail-page .highlight-description-toggle {
    padding: 0;
    margin-top: 0.1rem;
    font-size: 0.76rem;
    line-height: 1.1;
    text-decoration: none;
}

.amenity-chip {
    border-radius: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 576px) {
    .mobile-filter-bar .filter-input {
        padding: 5px 10px;
        border-radius: 12px;
    }

    .mobile-toggle-bar {
        bottom: calc(8px + env(safe-area-inset-bottom));
        padding: 0;
        gap: 6px;
        border-radius: 0;
    }

    .toggle-button {
        width: 34px;
        height: 34px;
        border-width: 1px;
    }

    .toggle-button .material-icons {
        font-size: 16px;
    }

    .venue-events-list .venue-event-item {
        padding: 0.56rem 0.68rem;
        flex-direction: column;
        gap: 0.42rem;
    }

    .venue-event-title {
        font-size: 0.93rem;
    }

    .venue-event-when {
        font-size: 0.84rem;
        margin-bottom: 0.16rem;
    }

    .venue-event-actions {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
    }

    .venue-event-actions .btn {
        padding: 0.3rem 0.55rem;
        font-size: 0.82rem;
    }

    .venue-detail-page .highlight-item {
        padding: 0.65rem 0.75rem;
    }

    .venue-detail-page .highlight-description {
        -webkit-line-clamp: 2;
    }

    .filter-modal .card-body > .d-flex.justify-content-between {
        gap: 10px;
    }

    .filter-modal .card-body > .d-flex.justify-content-between .btn {
        height: 38px;
        min-height: 38px;
        padding: 0 14px;
        border-radius: 10px;
        font-size: 0.95rem;
        line-height: 1;
    }

    .filter-modal .card-body > .d-flex.justify-content-between .btn .material-icons {
        font-size: 18px;
        line-height: 1;
    }

    .filter-modal .card-body > .d-flex.justify-content-between .btn-ghost {
        gap: 4px;
    }

    body:has(.home-main) article.content {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    body:has(.home-main) .home-grid {
        --bs-gutter-y: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    body:has(.home-main) .home-main {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    body:has(.home-main) .map-shell {
        height: calc(100dvh - 128px);
        min-height: calc(100dvh - 128px);
    }

    body:has(.home-main) .home-grid .venues-panel {
        height: calc(100dvh - 128px);
        min-height: calc(100dvh - 128px);
        max-height: calc(100dvh - 128px);
        margin-bottom: 0;
    }

    .home-grid .venues-panel > .card-body {
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .map-shell {
        border-radius: 0;
    }

    /* Slightly tighter list spacing on small screens (less scrolling) */
    .venue-list-item {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .venue-title {
        line-height: 1.2;
    }
}

/* Extra-compact buttons for city/tag chips (better for mobile) */
.btn-rc-xs {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 999px;
}

@media (max-width: 576px) {
    .btn-rc-xs {
        padding: 4px 9px;
        font-size: 11px;
    }
}

/* Compact action buttons in venue list */
.rc-venue-actions .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rc-venue-actions .btn .material-icons {
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 576px) {
    .venue-thumb {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .venue-list-item {
        padding: 9px 10px;
    }

    .venue-title {
        font-size: 13px;
    }

    .rc-venue-actions .btn {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .rc-venue-actions .btn .material-icons {
        font-size: 16px;
    }
}

/* ── Home: venues panel scrolls independently (only inside home grid) ── */
/* Ensure Bootstrap columns can shrink; otherwise inner overflow won't scroll */
.home-grid > [class*="col"],
.home-grid > .col,
.home-grid > .col-12,
.home-grid > .col-md,
.home-grid > .col-lg {
    min-height: 0;
}

.home-grid .venues-panel {
    height: calc(100dvh - 220px);
    max-height: calc(100dvh - 220px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.home-grid .venues-panel > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile: cap list height so it scrolls within viewport */
@media (max-width: 767.98px) {
    .home-grid .venues-panel {
        max-height: calc(100dvh - 128px);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .home-grid .venues-panel {
        height: calc(100dvh - 180px);
        max-height: calc(100dvh - 180px);
    }
}

/* Desktop: make Home a true “viewport shell” so only the list scrolls (no page scroll / no bottom whitespace) */
@media (min-width: 768px) {
    .home-main {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    .home-grid {
        --bs-gutter-y: 0;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
}

/* Tour requests page */
.tourplans-page .tour-request-card .card-body {
    padding: 1.25rem;
}

.tourplans-page .form-label {
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #2f4559;
}

.tourplans-page .form-control,
.tourplans-page .form-select {
    min-height: 42px;
}

.tourplans-page .tour-request-section-title {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #236f92;
    margin-top: 0.1rem;
    margin-bottom: 0.15rem;
}

.tourplans-page .form-check.form-switch {
    background: rgba(35, 111, 146, 0.04);
    border: 1px solid rgba(22, 49, 69, 0.10);
    border-radius: 10px;
    padding: 0.4rem 0.7rem 0.4rem 2.5rem;
}

@media (max-width: 768px) {
    /* Venue detail page */
    .venue-detail-page {
        padding: 0 0 1rem 0;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .detail-hero .card-body {
        padding: 0.75rem;
    }

    .detail-hero h3 {
        font-size: 1.05rem;
        line-height: 1.3;
    }

    .detail-hero .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .detail-hero .btn-sm .material-icons {
        font-size: 14px;
    }

    .detail-hero .home-chip {
        font-size: 0.72rem;
        padding: 0.15rem 0.5rem;
    }

    .venue-meta {
        font-size: 0.82rem;
    }

    /* Tour plans page */
    .tourplans-page {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .tourplans-page h2 {
        font-size: 1.15rem;
    }

    .tourplans-page p.text-muted {
        font-size: 0.8rem;
    }

    .tourplans-page .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    /* Inquiry pages */
    .inquiry-page h2,
    .inquiry-page h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .tourplans-page .tour-request-card .card-body {
        padding: 1rem;
    }

    .tourplans-page .tour-request-section-title {
        font-size: 0.68rem;
        letter-spacing: 0.05em;
    }

    .venue-detail-page {
        padding: 0 0 0.75rem 0;
    }

    .detail-hero h3 {
        font-size: 0.95rem;
    }

    .detail-hero .d-flex.align-items-center.gap-2 {
        gap: 0.35rem !important;
    }

    .detail-hero .btn-ghost.btn-icon {
        padding: 0.2rem;
    }

    .detail-hero .btn-ghost.btn-icon .material-icons {
        font-size: 20px;
    }

    .tourplans-page h2 {
        font-size: 1.05rem;
    }

    .tourplans-page .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@keyframes slideUpModal {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   DARK MODE – TouristApp-specific overrides
   Aligned with SEO generator dark theme values.
   ========================================================================== */

html[data-bs-theme="dark"] .hero {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .hero p {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .btn-ghost {
    background: var(--surface);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--brand-primary);
}

html[data-bs-theme="dark"] .btn-ghost:hover {
    background: rgba(62, 168, 212, 0.10);
}

html[data-bs-theme="dark"] .toggle-button {
    background-color: #142230;
    border-color: rgba(255, 255, 255, 0.12);
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .toggle-button:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .toggle-button:not(.active) {
    background-color: #142230;
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .toggle-button.active {
    background: linear-gradient(135deg, #1a7a9e, #3ea8d4);
    border-color: #1a7a9e;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(62, 168, 212, 0.28);
}

html[data-bs-theme="dark"] .mobile-filter-bar .filter-input {
    background: var(--surface);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .filter-modal-backdrop {
    background: rgba(0, 0, 0, 0.65);
}

html[data-bs-theme="dark"] .filter-modal {
    background: #142230;
}

html[data-bs-theme="dark"] .map-shell {
    background: var(--surface);
}

html[data-bs-theme="dark"] .venue-lightbox {
    background: rgba(0, 0, 0, 0.92);
}

html[data-bs-theme="dark"] .venue-lightbox-close {
    background: rgba(255, 255, 255, 0.12);
}

html[data-bs-theme="dark"] .venue-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.20);
}

html[data-bs-theme="dark"] .detail-meta {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .venue-meta {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .venue-event-when {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .venue-event-description {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .venue-gallery-item {
    background: rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .stat-pill {
    background: linear-gradient(120deg, rgba(62, 168, 212, 0.10), rgba(20, 34, 48, 0.30));
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .tourplans-page .form-label {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .tourplans-page .tour-request-section-title {
    color: #3ea8d4;
}

html[data-bs-theme="dark"] .tourplans-page .form-check.form-switch {
    background: rgba(62, 168, 212, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .venue-list-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .filter-input {
    background-color: #142230;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

html[data-bs-theme="dark"] .amenity-chip {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .compact-input .input-group-text {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] #blazor-error-ui {
    background: #3b1518;
    color: #f8b4b8;
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Map page specific dark overrides (map.css hardcoded colors) */
html[data-bs-theme="dark"] .sidebar {
    background: #0d1b26;
    border-right-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .search-input-wrapper {
    background: #0d1b26;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .search-input {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

html[data-bs-theme="dark"] .event {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .event:hover {
    background: rgba(62, 168, 212, 0.08);
}

html[data-bs-theme="dark"] .event p {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .event small {
    color: #556a7a;
}

html[data-bs-theme="dark"] .filters {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .filter-group label {
    color: #e0e6ec;
}

html[data-bs-theme="dark"] .filter-group select,
html[data-bs-theme="dark"] .filter-group input,
html[data-bs-theme="dark"] .date-input {
    background: #0d1b26;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

html[data-bs-theme="dark"] .search-suggestions {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .search-suggestion-item {
    background: #142230;
    border-bottom-color: rgba(255, 255, 255, 0.06);
    color: #3ea8d4;
}

html[data-bs-theme="dark"] .search-suggestion-item:hover,
html[data-bs-theme="dark"] .search-suggestion-item.active {
    background: rgba(62, 168, 212, 0.12);
}

html[data-bs-theme="dark"] .mobile-search-bar {
    background: #0d1b26;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .mobile-search-input {
    background: #142230;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

html[data-bs-theme="dark"] .highlight-badge {
    background: rgba(62, 168, 212, 0.15);
    color: #3ea8d4;
}

html[data-bs-theme="dark"] .highlight-badge:hover {
    background: rgba(62, 168, 212, 0.25);
}

html[data-bs-theme="dark"] .primary-button {
    background-color: #142230;
    color: #3ea8d4;
    border-color: #3ea8d4;
}

html[data-bs-theme="dark"] .primary-button:hover,
html[data-bs-theme="dark"] .primary-button.active {
    background-color: #1a6e8e;
    color: white;
}

html[data-bs-theme="dark"] .rc-route-legend {
    background: rgba(20, 34, 48, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .rc-route-legend-title {
    color: #b8d8e8;
}

html[data-bs-theme="dark"] .rc-route-legend-item {
    color: #e0e6ec;
}

html[data-bs-theme="dark"] .rc-route-legend-item:hover {
    background: rgba(62, 168, 212, 0.08);
}

/* Navbar – stays branded regardless of theme */
html[data-bs-theme="dark"] .navbar,
html[data-bs-theme="dark"] .navbar.bg-light,
html[data-bs-theme="dark"] .navbar.bg-white {
    background-color: #0a1520 !important;
}

/* Badge overrides */
html[data-bs-theme="dark"] .badge-featured {
    background: var(--brand-warm);
    color: #1a1200;
}

html[data-bs-theme="dark"] .badge-verified {
    background: var(--brand-accent);
    color: #0f1f2f;
}

/* Bootstrap bg-light / text-dark badges in dark mode (day count, event type, etc.) */
html[data-bs-theme="dark"] .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.10) !important;
}

html[data-bs-theme="dark"] .badge.bg-light.text-dark {
    color: #e0e6ec !important;
}

html[data-bs-theme="dark"] .badge.bg-light.border {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* btn-outline-secondary in dark mode (day map/note buttons) */
html[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.15);
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #e0e6ec;
}

/* ---------- Map Popup dark overrides (injected CSS from mapview.js) ---------- */

/* Leaflet popup wrapper */
html[data-bs-theme="dark"] .leaflet-popup-content-wrapper {
    background: #142230 !important;
    color: #e0e6ec;
}

html[data-bs-theme="dark"] .leaflet-popup-tip {
    background: #142230 !important;
}

/* Tourist popup (tp-*) */
html[data-bs-theme="dark"] .tp-body {
    background: #142230;
}

html[data-bs-theme="dark"] .tp-title {
    color: #e0e6ec;
}

html[data-bs-theme="dark"] .tp-meta-loc {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .tp-rating {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .tp-desc {
    color: #8fa3b4;
}

html[data-bs-theme="dark"] .tp-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] a.tp-btn-details,
html[data-bs-theme="dark"] .tp-btn-details {
    background: #3ea8d4;
}

html[data-bs-theme="dark"] a.tp-btn-details:hover,
html[data-bs-theme="dark"] .tp-btn-details:hover {
    background: #2d8ab0;
}

html[data-bs-theme="dark"] .tp-btn-planner {
    background: transparent;
    color: #3ea8d4;
    border-color: #3ea8d4;
}

html[data-bs-theme="dark"] .tp-btn-planner:hover {
    background: rgba(62, 168, 212, 0.12);
}

/* Popup badges */
html[data-bs-theme="dark"] .tp-badge-featured {
    background: rgba(240, 192, 96, 0.20);
    color: #f0c060;
}

html[data-bs-theme="dark"] .tp-badge-verified {
    background: rgba(156, 204, 101, 0.20);
    color: #9ccc65;
}

html[data-bs-theme="dark"] .tp-badge-events {
    background: rgba(62, 168, 212, 0.20);
    color: #3ea8d4;
}

/* Popup tag chips */
html[data-bs-theme="dark"] .popup-tag-icon {
    background: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .popup-tag-more {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e6ec;
}

html[data-bs-theme="dark"] .tag-chip {
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .tag-chip.more {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e6ec;
}

/* Planner popup */
html[data-bs-theme="dark"] .planner-popup {
    color: #e0e6ec;
}

/* Legacy venue popup */
html[data-bs-theme="dark"] .venue-popup {
    color: #e0e6ec;
}

/* Search result popup */
html[data-bs-theme="dark"] .search-result-popup {
    color: #e0e6ec;
}

/* Theme toggle button in navbar */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.40);
}

.theme-toggle-btn .material-icons {
    font-size: 18px;
    line-height: 1;
}
