﻿.guest-map-page {
    min-height: calc(100vh - 160px);
    background: radial-gradient(circle at 8% 6%, rgba(19, 113, 160, 0.12), transparent 45%), radial-gradient(circle at 92% 16%, rgba(48, 179, 125, 0.10), transparent 42%), linear-gradient(180deg, #f7fbff 0%, #eef4f8 100%);
    padding: 24px 0;
}

.guest-map-page--app {
    min-height: 100vh;
    min-height: 100dvh;
}

.guest-map-shell {
    border: 1px solid #d7e3ee;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(16, 55, 80, 0.08);
    overflow: hidden;
}

.guest-map-header {
    border-bottom: 1px solid #e8eff5;
    padding: 20px;
    background: linear-gradient(90deg, rgba(10, 66, 97, 0.05) 0%, rgba(10, 66, 97, 0.01) 70%);
}

    .guest-map-header h1 {
        margin: 0;
        color: #0d3955;
        font-size: 1.35rem;
        font-weight: 700;
    }

    .guest-map-header p {
        margin: 8px 0 0;
        color: #4c6477;
        font-size: 0.98rem;
    }

.guest-map-total-info {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.92rem;
    color: #1f4f6f;
}

.guest-map-filters {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 240px) auto;
    gap: 10px;
    align-items: end;
}

.guest-map-filters__field {
    min-width: 0;
}

.guest-map-filters__field--type {
    max-width: 280px;
}

.guest-map-filters__label {
    display: inline-block;
    margin-bottom: 4px;
    color: #36576f;
    font-size: 0.84rem;
    font-weight: 700;
}

.guest-map-filters__actions {
    display: inline-flex;
    align-items: center;
}

.guest-map-filter-results {
    grid-column: 1 / -1;
    border: 1px solid #d8e6f2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    padding: 10px;
}

.guest-map-filter-results__title {
    color: #0f3a57;
    font-size: 0.86rem;
    font-weight: 700;
}

.guest-map-filter-results__list {
    margin-top: 8px;
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-map-filter-results__item {
    width: 100%;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 9px;
    text-align: left;
    transition: all 0.18s ease;
    cursor: pointer;
}

.guest-map-filter-results__item:hover,
.guest-map-filter-results__item:focus {
    border-color: #73a9ce;
    box-shadow: 0 4px 10px rgba(18, 85, 122, 0.14);
    transform: translateY(-1px);
}

.guest-map-filter-results__item-name {
    display: block;
    color: #123a57;
    font-size: 0.9rem;
    font-weight: 700;
}

.guest-map-filter-results__item-meta {
    display: block;
    margin-top: 2px;
    color: #4d6578;
    font-size: 0.8rem;
}

.guest-map-filter-results__empty {
    border: 1px dashed #c7d9e8;
    border-radius: 8px;
    background: #f8fbfe;
    color: #5a7184;
    font-size: 0.86rem;
    padding: 10px;
    text-align: center;
}

.guest-map-filter-results__more {
    display: none;
    margin-top: 8px;
    padding: 0;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.guest-map-total-info__item {
    background: rgba(15, 122, 194, 0.08);
    border: 1px solid rgba(15, 122, 194, 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    line-height: 1.4;
}

.guest-map-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: 70vh;
}

.guest-map-sidebar {
    border-right: 1px solid #e8eff5;
    padding: 14px;
    background: #fbfdff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height:60vh;
}

    .guest-map-sidebar input {
        border-radius: 10px;
    }

.guest-map-list {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 180px;
    padding-right: 4px;
}

.guest-map-sidebar-summary {
    border: 1px solid #dbe7f1;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 12px;
    font-size: 0.88rem;
    color: #2f4f66;
}

.guest-map-sidebar-summary__title {
    color: #0d3955;
    font-weight: 700;
    margin-bottom: 6px;
}

.guest-map-sidebar-summary__empty {
    color: #5f7384;
}

.guest-map-sidebar-summary__list {
    margin: 0;
    padding-left: 16px;
}

    .guest-map-sidebar-summary__list li {
        margin-bottom: 4px;
    }

.guest-map-item {
    border: 1px solid #dde7f1;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
    transition: all 0.18s ease;
}

    .guest-map-item:hover {
        border-color: #6ca7cf;
        box-shadow: 0 6px 16px rgba(23, 88, 126, 0.12);
        transform: translateY(-1px);
    }

    .guest-map-item.active {
        border-color: #1a7bb6;
        background: #eff8ff;
    }

.guest-map-item__name {
    font-weight: 700;
    color: #123a57;
    font-size: 1.1rem;
}

.guest-map-item__meta {
    color: #4d6578;
    font-size: 0.85rem;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guest-map-item__chuc-danh-list {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #d3e2ee;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guest-map-item__chuc-danh {
    color: #4d6578;
    font-size: 0.8rem;
    line-height: 1.4;
}

.guest-map-item__chuc-danh-label {
    font-weight: 600;
    color: #123a57;
}

.guest-map-canvas {
    position: relative;
    min-height: 70vh;
}

#guest-map {
    width: 100%;
    height: 100%;
    min-height: 70vh;
}

.guest-map-empty {
    padding: 16px;
    border: 1px dashed #bed1e1;
    border-radius: 10px;
    color: #4f6677;
    background: #f8fbfe;
    text-align: center;
    font-size: 0.92rem;
}

.leaflet-tooltip.tdp-name-label {
    background: rgb(13 57 85 / 79%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 10px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 1px 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.24);
    white-space: nowrap;
}

    .leaflet-tooltip.tdp-name-label::before {
        display: none;
    }

.guest-map-legend {
    margin-top: 10px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guest-map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d5e3ef;
    background: #f5faff;
    color: #0f3a57;
    font-size: 0.85rem;
    line-height: 1.35;
    font-weight: 600;
}

.guest-map-legend__dynamic {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guest-map-legend__item--icon {
    padding-right: 12px;
}

.guest-map-legend__item--action {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.guest-map-legend__item--action:hover,
.guest-map-legend__item--action:focus-visible {
    border-color: #86b7da;
    background: #eaf5ff;
    outline: none;
}

.guest-map-legend__item--active {
    border-color: #0f6ca5;
    background: #dbefff;
    color: #0b4f7a;
    box-shadow: 0 0 0 1px rgba(15, 108, 165, 0.15) inset;
}

.guest-map-legend__icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 16px;
}

.guest-map-legend__count {
    color: #5b7d95;
    font-weight: 500;
    margin-left: 2px;
}

.guest-map-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.guest-map-legend__dot--to-dan-pho {
    background: #2a80c8;
    border: 1px solid #1767a9;
}

.guest-map-legend__dot--dia-diem {
    background: #f97316;
    border: 1px solid #d96008;
    box-shadow: 0 0 0 1px #ffffff inset;
}

.guest-map-dia-diem-marker {
    background: transparent;
    border: 0;
}

.guest-map-dia-diem-marker__dot {
    width: 14px;
    height: 14px;
    display: block;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #ffd8a8 0%, #ff9a3d 42%, #f97316 70%, #c44f00 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(178, 67, 0, 0.45);
}

.guest-map-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.guest-map-popup-actions__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.18s ease;
}

.guest-map-popup-actions__action--vr {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1b84c6 0%, #0f6ca5 100%);
    border-color: #0f6ca5;
    box-shadow: 0 4px 10px rgba(17, 107, 164, 0.24);
}

.guest-map-popup-actions__action--vr:hover,
.guest-map-popup-actions__action--vr:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #0f6ca5 0%, #0d5b8a 100%);
    border-color: #0d5b8a;
    transform: translateY(-1px);
}

.guest-map-popup-actions__action--video {
    color: #a24300;
    background: linear-gradient(135deg, #fff4e9 0%, #ffe5cf 100%);
    border-color: #f0b783;
}

.guest-map-popup-actions__action--video:hover,
.guest-map-popup-actions__action--video:focus {
    color: #8c3900;
    background: linear-gradient(135deg, #ffe9d4 0%, #ffd8b0 100%);
    border-color: #e7a56b;
    transform: translateY(-1px);
}

.guest-map-popup-actions__action--route {
    color: #ffffff;
    background: linear-gradient(135deg, #1b9f6a 0%, #148457 100%);
    border-color: #13774e;
    box-shadow: 0 4px 10px rgba(20, 132, 87, 0.24);
}

.guest-map-popup-actions__action--route:hover,
.guest-map-popup-actions__action--route:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #17895c 0%, #106f49 100%);
    border-color: #106744;
    transform: translateY(-1px);
}

.leaflet-routing-container {
    max-width: 320px;
}

.guest-map-routing-panel.leaflet-routing-container {
    width: min(340px, calc(100vw - 40px));
    max-height: calc(100% - 24px);
    overflow: hidden;
    border: 1px solid #d7e4ef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(11, 53, 80, 0.18);
}

.guest-map-routing-panel .leaflet-routing-alt {
    max-height: min(340px, 52vh);
    overflow-y: auto;
}

.guest-map-routing-panel .leaflet-routing-collapse-btn {
    width: auto;
    min-width: 28px;
    max-width: calc(100% - 65px);
    height: 28px;
    top: 4px;
    right: 38px;
    border-radius: 8px;
    border: 1px solid #c7d9e8;
    background-image: none;
    background-color: #f8fbfe;
    color: #0d3e5d;
    font-size: 0.72rem;
    line-height: 26px;
    text-align: center;
    text-decoration: none;
    text-indent: 0;
    overflow: hidden;
    white-space: nowrap;
    position: absolute;
}

.guest-map-routing-panel .leaflet-routing-collapse-btn::after {
    content: "-";
    display: inline;
    font-weight: 700;
}

.guest-map-routing-panel.leaflet-routing-container-hide .leaflet-routing-collapse-btn::after {
    content: "Mở lộ trình";
}

.guest-map-routing-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(1px);
    z-index: 620;
}

.guest-map-routing-loading--visible {
    display: flex;
}

.guest-map-routing-loading__spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(15, 108, 165, 0.2);
    border-top-color: #0f6ca5;
    animation: guestMapRoutingSpin 0.8s linear infinite;
}

.guest-map-routing-loading__text {
    padding: 0 14px;
    color: #0d3e5d;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

@keyframes guestMapRoutingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991.98px) {
    .guest-map-layout {
        grid-template-columns: 1fr;
    }

    .guest-map-sidebar {
        border-right: 0;
        border-bottom: 1px solid #e8eff5;
    }

    .guest-map-list {
        max-height: 260px;
    }

    .guest-map-canvas,
    #guest-map {
        min-height: 420px;
    }

    .guest-map-filters {
        grid-template-columns: 1fr;
    }

    .guest-map-filters__field--type {
        max-width: none;
    }

    .guest-map-filter-results__list {
        max-height: 180px;
    }
}


.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.voice-search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    /*border-radius: 50%;*/
    transition: all 0.18s ease;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4c6477;
    font-size: 1.1rem;
}

.voice-search-button:hover:not(:disabled) {
    background-color: rgba(15, 122, 194, 0.08);
    color: #0f7ac2;
}

.voice-search-button:focus {
    outline: 2px solid #0f7ac2;
    outline-offset: 2px;
}

.voice-search-button.is-listening {
    /*background-color: #dc3545;*/
    color: white;
    animation: voiceSearchPulse 1.5s infinite;
}

.voice-search-button.is-listening .voice-search-button__icon::before {
    content: "🔴";
}

.voice-search-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@keyframes voiceSearchPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
}

.guest-map-legend__icon{
    max-height:40px;
    object-fit:cover;
}

.leaflet-touch .leaflet-control-attribution {
    display: none;
}
.guest-map-routing-panel.leaflet-routing-container{
    min-height:38px;
}


.leaflet-routing-container h2 {
   
    width: calc(100% - 65px);
}

.guest-map-panel-toggles {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.guest-map-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #0f6ca5;
    background: #dbefff;
    color: #0b4f7a;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: all 0.18s ease;
}

    .guest-map-panel-toggle:hover,
    .guest-map-panel-toggle:focus-visible {
        background: #eaf5ff;
        border-color: #86b7da;
        outline: none;
    }

    .guest-map-panel-toggle[aria-expanded="false"] {
        border-color: #d5e3ef;
        background: #f5faff;
        color: #4c5861;
    }

.guest-map-collapsible.is-collapsed {
    display: none;
}

.guest-map-layout--sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.guest-map-su-kien-popup {
    min-width: 200px;
}

.guest-map-su-kien-popup__title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #10232f;
}

.guest-map-su-kien-popup__row {
    margin-bottom: 2px;
}

.guest-map-su-kien-popup__label {
    font-weight: 600;
    color: #35505f;
}

.guest-map-su-kien-popup__gallery {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e3edf5;
}

.guest-map-su-kien-popup__gallery-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #35505f;
    margin-bottom: 6px;
}

.guest-map-su-kien-popup__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.guest-map-su-kien-popup__thumb {
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid #d5e3ef;
    border-radius: 6px;
    overflow: hidden;
    background: #f5faff;
    cursor: zoom-in;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.guest-map-su-kien-popup__thumb:hover,
.guest-map-su-kien-popup__thumb:focus-visible {
    border-color: #4da3d8;
    transform: translateY(-1px);
    outline: none;
}

.guest-map-su-kien-popup__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guest-map-su-kien-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.guest-map-su-kien-status--ongoing {
    background: #dcfce7;
    border: 1px solid #4ade80;
    color: #166534;
}

.guest-map-su-kien-status--upcoming {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.guest-map-su-kien-status--ended {
    background: #e5e7eb;
    border: 1px solid #9ca3af;
    color: #374151;
}

.leaflet-tooltip.su-kien-name-label {
    font-weight: 600;
    color: #10232f;
    background: #ffffff;
    border: 1px solid #d5e3ef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    white-space: nowrap;
}

    .leaflet-tooltip.su-kien-name-label::before {
        display: none;
    }