/**
 * Navigation Bar Widget — akadverse-pro
 * Floating bottom nav dengan icon bulat gaya wedding gold.
 */

/* ── Reset & Base ────────────────────────────────────────────────────── */
.akv-navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 10px 16px;
    width: fit-content;
    max-width: calc(100vw - 32px);
    /* Remove default Elementor section overflow restrictions */
    overflow: visible;
}

.akv-navbar__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

/* ── Positions ───────────────────────────────────────────────────────── */

/* Fixed bottom — melebar penuh */
.akv-navbar--fixed-bottom {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9990;
}

/* Fixed top */
.akv-navbar--fixed-top {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 20px 20px;
    z-index: 9990;
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

/* Floating card */
.akv-navbar--floating {
    position: fixed;
    bottom: 24px;
    z-index: 9990;
}
.akv-navbar--floating.akv-navbar--float-left   { left: 16px; }
.akv-navbar--floating.akv-navbar--float-center {
    left: 50%;
    transform: translateX(-50%);
}
.akv-navbar--floating.akv-navbar--float-right  { right: 16px; }

/* Inline — di dalam flow halaman */
.akv-navbar--inline {
    position: relative;
    margin: 0 auto;
}

/* ── Item & Link ─────────────────────────────────────────────────────── */
.akv-navbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.akv-navbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* ── Icon Button (bulat) ─────────────────────────────────────────────── */
.akv-navbar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #b8860b;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
    /* Accessibility: memberi visual focus */
    position: relative;
}

.akv-navbar__btn i,
.akv-navbar__btn svg {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
    fill: #ffffff;
    display: block;
    pointer-events: none;
}

/* Hover */
.akv-navbar__link:hover .akv-navbar__btn {
    background-color: #8b6914;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.4);
}

/* Focus visible (keyboard nav) */
.akv-navbar__link:focus-visible .akv-navbar__btn {
    outline: 3px solid #b8860b;
    outline-offset: 3px;
}

/* Active state */
.akv-navbar__item.is-active .akv-navbar__btn {
    background-color: #8b6914 !important;
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.45);
}

/* ── Label Teks ──────────────────────────────────────────────────────── */
.akv-navbar__label {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.2;
    color: #888888;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.akv-navbar__item.is-active .akv-navbar__label {
    color: #b8860b !important;
    font-weight: 600;
}

/* ── Animasi masuk (slide-up) ─────────────────────────────────────────── */
@keyframes akv-navbar-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.akv-navbar--fixed-bottom,
.akv-navbar--floating.akv-navbar--float-center {
    animation: akv-navbar-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Inline & top tidak pakai translateX di animasi */
@keyframes akv-navbar-fade-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.akv-navbar--fixed-top {
    animation: akv-navbar-fade-in 0.35s ease both;
}

/* ── Responsif ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .akv-navbar {
        padding: 8px 12px;
    }
    .akv-navbar__list {
        gap: 6px;
    }
    .akv-navbar__btn {
        width: 44px;
        height: 44px;
    }
    .akv-navbar__btn i,
    .akv-navbar__btn svg {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}

/* ── Editor preview — jangan fixed di dalam canvas Elementor ─────────── */
.elementor-editor-active .akv-navbar--fixed-bottom,
.elementor-editor-active .akv-navbar--fixed-top,
.elementor-editor-active .akv-navbar--floating {
    position: relative !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    animation: none !important;
    margin: 0 auto;
}

/* ── Sembunyikan navbar saat cover undangan masih tampil ─────────────── */
body.akadverse-cover-active .akv-navbar {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(20px) !important;
    pointer-events: none !important;
    transition: none !important;
}
body.akadverse-cover-active .akv-navbar--fixed-top {
    transform: translateY(-20px) !important;
}
body.akadverse-cover-active .akv-navbar--floating.akv-navbar--float-left,
body.akadverse-cover-active .akv-navbar--floating.akv-navbar--float-right,
body.akadverse-cover-active .akv-navbar--inline {
    transform: translateY(20px) !important;
}

/* ── Animasi reveal saat cover ditutup ───────────────────────────────── */
/*
   Class .akv-navbar--revealed di-tambahkan JS setelah cover dismiss.
   Jika tidak ada cover (class tidak pernah di-add), navbar tampil normal.
*/
@keyframes akv-navbar-reveal {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes akv-navbar-reveal-top {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes akv-navbar-reveal-plain {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.akv-navbar--fixed-bottom.akv-navbar--revealed,
.akv-navbar--floating.akv-navbar--float-center.akv-navbar--revealed {
    animation: akv-navbar-reveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.akv-navbar--fixed-top.akv-navbar--revealed {
    animation: akv-navbar-reveal-top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.akv-navbar--floating.akv-navbar--float-left.akv-navbar--revealed,
.akv-navbar--floating.akv-navbar--float-right.akv-navbar--revealed,
.akv-navbar--inline.akv-navbar--revealed {
    animation: akv-navbar-reveal-plain 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
