/* Location Section */
.uitkm-location {
    width: 100%;
    padding: 40px 0;
    box-sizing: border-box;
    position: relative;
}

/* Header */
.uitkm-location__header {
    margin-bottom: 32px;
    box-sizing: border-box;
}

.uitkm-location__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px;
    box-sizing: border-box;
    font-size: 1.5rem;
    line-height: 1.875rem;
    letter-spacing: -.54px;
    min-height: 48px;
}
.uitkm-location__subtitle {
    color: #334155;
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
}

/* Description */
.uitkm-location__description-wrapper {
    position: relative;
}

.uitkm-location__description {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.uitkm-location__description[data-expanded="false"] {
    max-height: 100px;
}

.uitkm-location__description[data-expanded="true"] {
    max-height: 2000px;
}

.uitkm-location__description-content p {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    margin: 0;
}
.uitkm-location__description-content ul li {
    font-size: 14px;
}
span.uitkm-location__toggle-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.uitkm-location__description-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.uitkm-location__description[data-expanded="true"] .uitkm-location__description-fade {
    opacity: 0;
}

.uitkm-location__toggle-description {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    color: #2e438f;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    text-transform: math-auto;
}
span.uitkm-location__toggle-text-collapse {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.uitkm-location__toggle-description:hover {
    color: #1e3a8a;
}

.uitkm-location__toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.uitkm-location__toggle-description[data-expanded="true"] .uitkm-location__toggle-icon {
    transform: rotate(180deg);
}

/* Map */
.uitkm-location__map-wrapper {
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.uitkm-location__map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

/* Tabs */
.uitkm-location__tabs-wrapper {
    position: relative;
    margin-bottom: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 767px) {
    .uitkm-location__tabs-wrapper {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        max-height: 200px; /* Cho phép scroll dọc nếu cần */
    }
    
    .uitkm-location__tabs-wrapper::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .uitkm-location__tabs {
        width: max-content;
        min-width: 100%;
        gap: 8px;
        flex-wrap: wrap; /* Cho phép wrap nếu cần */
    }
    

}



.uitkm-location__tabs {
    display: flex;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.uitkm-location__tabs::-webkit-scrollbar {
    display: none;
}

.uitkm-location__tab {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0px;
    text-transform: math-auto;
    /* padding: 8px 16px; */
    background: #ECF1FF;
    border-radius: 6px;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    height: 68px;
    justify-content: flex-end;
}

.uitkm-location__tab:hover {
    color: #2e438f;
}

.uitkm-location__tab.is-active {
    background: #2e438f;
    color: #ffffff;
    text-transform: math-auto;
    letter-spacing: normal;
}

.uitkm-location__tab i {
    font-size: 24px;
}

/* POI List */
.uitkm-location__pois-wrapper {
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}



.uitkm-location__pois-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uitkm-location__poi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uitkm-location__poi-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.uitkm-location__poi-item.is-active {
    background: #f1f5f9;
    border-color: #2e438f;
}

/* Hide all POIs by default */
.uitkm-location__poi-item {
    display: none;
}

/* Show POIs matching active category using CSS attribute selector */
.uitkm-location__pois-list[data-active-category="noi-bat"] .uitkm-location__poi-item[data-category="noi-bat"],
.uitkm-location__pois-list[data-active-category="giai-tri"] .uitkm-location__poi-item[data-category="giai-tri"],
.uitkm-location__pois-list[data-active-category="truong-hoc"] .uitkm-location__poi-item[data-category="truong-hoc"],
.uitkm-location__pois-list[data-active-category="y-te"] .uitkm-location__poi-item[data-category="y-te"],
.uitkm-location__pois-list[data-active-category="mua-sam"] .uitkm-location__poi-item[data-category="mua-sam"] {
    display: flex;
}

/* Fallback: Use JavaScript to handle dynamic categories */
.uitkm-location__poi-item:not(.is-hidden) {
    display: flex;
}



.uitkm-location__pois-empty-message {
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: left;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.uitkm-location__pois-empty-message:hover {
    background: #ECF1FF;
    color: #2e438f;
    border-color: #2e438f;
}
/* Empty state message */
.uitkm-location__pois-empty {
    display: inline;

    text-align: center;
}



.uitkm-location__poi-title {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    color: #2e438f;
}

.uitkm-location__poi-actions {
    margin-left: 16px;
}

.uitkm-location__poi-route-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.uitkm-location__poi-route-info i {
    font-size: 32px;
    color: #2e438f69;
    transition: color 0.3s ease;
}

.uitkm-location__pois-list:hover .uitkm-location__poi-route-info i {
    color: #2e438f;
}
.uitkm-location__poi-route-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uitkm-location__poi-distance {
    color: #334155;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
}

.uitkm-location__poi-duration {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #64748b;
    line-height: 1.2;
}

.uitkm-location__poi-directions-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(46, 67, 143, 0.3);
}

.uitkm-location__poi-directions-btn:active {
    transform: translateY(0);
}

/* Route Info Badge */
.uitkm-route-info-badge {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.uitkm-route-info-badge__content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 0.8125rem;
    white-space: nowrap;
    line-height: 1.4;
}

.uitkm-route-info-badge__icon {
    font-size: 0.875rem;
    color: #475569;
}

.uitkm-route-info-badge__text {
    color: #1e293b;
    font-weight: 500;
}

.uitkm-route-info-badge__duration {
    color: #1e293b;
}

.uitkm-route-info-badge__separator {
    color: #94a3b8;
    margin: 0 2px;
}

.uitkm-route-info-badge__distance {
    color: #1e293b;
}

/* Error message */
.uitkm-location-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.875rem;
    margin: 20px;
}

/* Responsive - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .uitkm-location__map {
        height: 450px;
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .uitkm-location {
        padding: 32px 0;
    }
    
    .uitkm-location__title {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }
    
    .uitkm-location__subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .uitkm-location__description-content {
        font-size: 0.8125rem;
    }
    
    .uitkm-location__map {
        height: 300px;
    }
    
    .uitkm-location__tabs {
        gap: 8px;
        width: max-content;
        min-width: 100%;
        flex-wrap: wrap;
    }
    
    .uitkm-location__tab {
        flex: 0 0 auto;
        min-width: 88px;
        width: 88px;
        height: 72px;
        padding: 0;
        gap: 5px;
        font-size: 13px;
        font-weight: 400;
    }
    
    .uitkm-location__poi-item {
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .uitkm-location__poi-route-info {
        display: flex;
        align-items: center;
        gap: 18px;
    }
    
    .uitkm-location__poi-route {
        align-items: flex-start;
        margin-left: 0;
        flex-direction: row;
        gap: 12px;
    }
}

