/* ==========================================================================
   VANTAI – Mobile Nav Widget (.vtmn-*)
   Load toàn cục trên mọi trang — không phụ thuộc Elementor.
   ========================================================================== */

/* ── Wrap (flex để justify-content căn chỉnh nút) ─────────────────────────── */
.vtmn-wrap {
    display: flex;
    align-items: center;
}

/* ── Toggle button ────────────────────────────────────────────────────────── */
.vtmn-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 14px;
    background-color: #1a56db;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: filter 0.18s, transform 0.1s;
    position: relative;
    z-index: 1;
}

.vtmn-toggle-btn:hover {
    filter: brightness(1.12);
    transform: scale(1.04);
}

/* Fix SVG icon kế thừa màu từ color */
.vtmn-toggle-btn svg {
    fill: currentColor;
    width: 1em;
    height: 1em;
    display: block;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.vtmn-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.vtmn-overlay.is-open {
    display: block;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.vtmn-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--vtmn-width, 320px);
    max-width: 90vw;
    background-color: var(--vtmn-bg, #ffffff);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Trạng thái mở (JS thêm class) */
.vtmn-sidebar.is-open {
    transform: translateX(0);
}

/* Preview trong Elementor editor: hiển thị inline, không fixed */
.vtmn-sidebar--preview {
    position: relative;
    transform: none !important;
    max-width: 100%;
    height: auto;
    min-height: 360px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.vtmn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    gap: 10px;
}

.vtmn-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.vtmn-logo {
    width: 90%;
}

.vtmn-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1a56db 0%, #1048b8 100%);
    color: #ffffff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.vtmn-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vtmn-site-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--vtmn-name-color, #1a56db);
    letter-spacing: 0.03em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vtmn-tagline {
    font-size: 0.68rem;
    color: var(--vtmn-tagline-color, #6b7280);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.vtmn-close-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.18s, color 0.18s;
    padding: 0;
    line-height: 1;
}

.vtmn-close-btn svg {
    display: block;
    flex-shrink: 0;
}

.vtmn-close-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
.vtmn-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    flex: 1;
}

/* ── Menu item ────────────────────────────────────────────────────────────── */
.vtmn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    color: var(--vtmn-item-color, #374151);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    margin: 3px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    background-color: #fff;
    transition: background-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.vtmn-item:hover {
    background-color: var(--vtmn-item-hover-bg, #f0f4ff);
    color: var(--vtmn-item-active-bg, #1a56db);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
}

.vtmn-item.is-active {
    background-color: var(--vtmn-item-active-bg, #1a56db);
    color: var(--vtmn-item-active-color, #ffffff);
}

/* ── Item icon ────────────────────────────────────────────────────────────── */
.vtmn-item-icon {
    width: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #222;
    opacity: 0.75;
    transition: color 0.18s, opacity 0.18s;
}

.vtmn-item-icon svg path {
    fill: currentColor;
}

/* Dạng light: icon nhẹ hơn khi không active */
.vtmn-item:not(.is-active) .vtmn-item-icon i,
.vtmn-item:not(.is-active) .vtmn-item-icon svg {
    filter: none;
}

/* Active: icon màu trắng — áp dụng cho cả <i> font icon lẫn <svg> */
.vtmn-item.is-active .vtmn-item-icon {
    color: #ffffff;
    opacity: 1;
}

.vtmn-item.is-active .vtmn-item-icon i {
    color: #ffffff;
}

.vtmn-item.is-active .vtmn-item-icon svg {
    fill: #ffffff;
    color: #ffffff;
}

.vtmn-item.is-active .vtmn-item-icon svg path,
.vtmn-item.is-active .vtmn-item-icon svg rect,
.vtmn-item.is-active .vtmn-item-icon svg circle,
.vtmn-item.is-active .vtmn-item-icon svg polygon {
    fill: #ffffff;
}

/* ── Item label ───────────────────────────────────────────────────────────── */
.vtmn-item-label {
    flex: 1;
    min-width: 0;
}

/* ── Item arrow ───────────────────────────────────────────────────────────── */
.vtmn-item-arrow {
    font-size: 0.72rem;
    opacity: 0.45;
    flex-shrink: 0;
}

.vtmn-item.is-active .vtmn-item-arrow {
    opacity: 0.7;
}

/* ── Support box ──────────────────────────────────────────────────────────── */
.vtmn-support-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 14px;
    padding: 14px;
    background: var(--vtmn-support-bg, linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%));
    border-radius: 12px;
    flex-shrink: 0;
}

.vtmn-support-icon {
    width: 38px;
    height: 38px;
    background-color: #1a56db;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.vtmn-support-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.vtmn-support-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.vtmn-support-desc {
    font-size: 0.76rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.vtmn-support-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--vtmn-phone-color, #1a56db);
    text-decoration: none;
    margin-top: 2px;
}

.vtmn-support-phone:hover {
    text-decoration: underline;
}

/* ── Footer illustration ──────────────────────────────────────────────────── */
.vtmn-illustration {
    padding: 8px 14px 14px;
    flex-shrink: 0;
    overflow: hidden;
    margin-top: auto;
}

.vtmn-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Body lock khi sidebar mở ─────────────────────────────────────────────── */
body.vtmn-open {
    overflow: hidden;
}

/* ==========================================================================
   VANTAI – Bottom Navigation (.vtbn-*)
   ========================================================================== */

.vtbn-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: #ffffff;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
    z-index: 99990;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Ẩn trên desktop */
@media (min-width: 768px) {
    .vtbn-nav:not(.vtbn-nav--preview) {
        display: none;
    }
}

/* Thêm padding dưới body để nội dung không bị che */
@media (max-width: 767px) {
    body {
        padding-bottom: 62px;
    }
    body.vtmn-open {
        padding-bottom: 0;
    }
}

/* ── Item ─────────────────────────────────────────────────────────────────── */
.vtbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.62rem;
    font-weight: 500;
    padding: 6px 0 4px;
    transition: color 0.18s;
    position: relative;
}

.vtbn-item:hover {
    text-decoration: none;
    color: #6b7280;
}

.vtbn-item--active {
    color: #1a56db;
}

/* ── Icon ─────────────────────────────────────────────────────────────────── */
.vtbn-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vtbn-icon i,
.vtbn-icon svg {
    display: block;
}

/* ── Label ────────────────────────────────────────────────────────────────── */
.vtbn-label {
    font-size: 0.62rem;
    white-space: nowrap;
    line-height: 1;
}

/* ── Featured (nút nổi trung tâm) ────────────────────────────────────────── */
.vtbn-item--featured {
    justify-content: flex-end;
    padding-bottom: 6px;
    color: #6b7280;
}

.vtbn-featured-btn {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #1a56db;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.40);
    transition: transform 0.18s, box-shadow 0.18s;
    border: 3px solid #ffffff;
    z-index: 3 !important;
}

.vtbn-item--featured:hover .vtbn-featured-btn {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(26, 86, 219, 0.50);
}

.vtbn-item--featured .vtbn-label {
    margin-top: 20px;
}

/* ── Preview trong Elementor editor ──────────────────────────────────────── */
.vtbn-nav--preview {
    position: relative;
    margin-top: 12px;
    border-radius: 12px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
}
