@import url("/vendor/fontawesome/css/all.min.css");
/*
|--------------------------------------------------------------------------
| DanangNET Mobile Common UI
|--------------------------------------------------------------------------
| Shared mobile UI styles.
| Page-specific differences are intentionally scoped by data-dn-page.
|--------------------------------------------------------------------------
*/

:root {
    --dn-bottom-height: 68px;
    --dn-line: #e8ebef;
}

/* ==========================================================================
   Bottom Navigation - HOME
   ========================================================================== */

body[data-dn-page="home"] .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;

    height:
        calc(
            var(--dn-bottom-height)
            + env(safe-area-inset-bottom)
        );

    padding-bottom: env(safe-area-inset-bottom);

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--dn-line);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body[data-dn-page="home"] .bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    color: #8a9099;

    font-size: 11px;
    font-weight: 700;
}

body[data-dn-page="home"] .bottom-item.active {
    color: var(--dn-primary);
}

body[data-dn-page="home"] .bottom-item svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================================
   Bottom Navigation - CATEGORY
   ========================================================================== */

body[data-dn-page="category"] .bottom-nav,
body[data-dn-page="product-detail"] .bottom-nav,
body[data-dn-page="my"] .bottom-nav,
body[data-dn-page="support"] .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 1100;

    height:
        calc(
            var(--dn-bottom-height)
            + env(safe-area-inset-bottom)
        );

    padding-bottom: env(safe-area-inset-bottom);

    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--dn-line);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body[data-dn-page="category"] .bottom-nav-inner,
body[data-dn-page="product-detail"] .bottom-nav-inner,
body[data-dn-page="my"] .bottom-nav-inner,
body[data-dn-page="support"] .bottom-nav-inner {
    height: var(--dn-bottom-height);

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    max-width: 620px;
    margin: 0 auto;
}

body[data-dn-page="category"] .bottom-item,
body[data-dn-page="product-detail"] .bottom-item,
body[data-dn-page="my"] .bottom-item,
body[data-dn-page="support"] .bottom-item {
    text-decoration: none;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    color: #888e96;

    font-size: 11px;
    font-weight: 700;
}

body[data-dn-page="category"] .bottom-item.active,
body[data-dn-page="product-detail"] .bottom-item.active,
body[data-dn-page="my"] .bottom-item.active,
body[data-dn-page="support"] .bottom-item.active {
    color: var(--dn-text);
}

body[data-dn-page="category"] .bottom-icon,
body[data-dn-page="product-detail"] .bottom-icon,
body[data-dn-page="my"] .bottom-icon,
body[data-dn-page="support"] .bottom-icon {
    width: 23px;
    height: 23px;
}

body[data-dn-page="category"] .bottom-item.active::before,
body[data-dn-page="product-detail"] .bottom-item.active::before,
body[data-dn-page="my"] .bottom-item.active::before,
body[data-dn-page="support"] .bottom-item.active::before {
    content: "";

    position: absolute;
    top: 5px;

    width: 21px;
    height: 3px;

    border-radius: 999px;
    background: var(--dn-primary);
}

/* DanangNET Bottom Nav Auto Hide V7.6 */
.bottom-nav {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    transition:
        transform .30s cubic-bezier(.22, .8, .32, 1),
        -webkit-transform .30s cubic-bezier(.22, .8, .32, 1);
    will-change: transform;
}

.bottom-nav.dn-bottom-nav-hidden {
    transform: translate3d(0, calc(100% + 12px), 0);
    -webkit-transform: translate3d(0, calc(100% + 12px), 0);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bottom-nav {
        transition: none;
    }
}


/* DanangNET Bottom Nav Directional Page Enter V1 */
@keyframes dnBottomPageEnterFromRight {
    from {
        transform: translate3d(24%, 0, 0);
        opacity: .96;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes dnBottomPageEnterFromLeft {
    from {
        transform: translate3d(-24%, 0, 0);
        opacity: .96;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

body.dn-bottom-enter-from-right .app-shell {
    animation: dnBottomPageEnterFromRight .25s cubic-bezier(.22, .8, .32, 1);
}

body.dn-bottom-enter-from-left .app-shell {
    animation: dnBottomPageEnterFromLeft .25s cubic-bezier(.22, .8, .32, 1);
}

@media (min-width: 1100px), (prefers-reduced-motion: reduce) {
    body.dn-bottom-enter-from-right .app-shell,
    body.dn-bottom-enter-from-left .app-shell {
        animation: none;
    }
}

/* DanangNET Bottom Nav - Font Awesome V1 */
.bottom-nav .bottom-icon.fa-solid {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    flex: 0 0 26px;
}

body[data-dn-page="home"] .bottom-item .bottom-icon.fa-solid {
    width: 26px;
    height: 26px;
    font-size: 22px;
}

body[data-dn-page="category"] .bottom-item .bottom-icon.fa-solid,
body[data-dn-page="product-detail"] .bottom-item .bottom-icon.fa-solid,
body[data-dn-page="my"] .bottom-item .bottom-icon.fa-solid,
body[data-dn-page="support"] .bottom-item .bottom-icon.fa-solid {
    width: 26px;
    height: 26px;
    font-size: 22px;
}

/* DanangNET Bottom Nav - Icon Balance V3 */
.bottom-nav .bottom-icon-golf,
.bottom-nav .bottom-icon-tour {
    font-size: 21px;
}

/* DanangNET Bottom Nav - Selected Icons V4 */
.bottom-nav .bottom-icon.fa-solid,
.bottom-nav .bottom-icon.fa-regular {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: 0 0 25px;
}

/* visual balance */
.bottom-nav .bottom-icon-home {
    font-size: 21px;
}

.bottom-nav .bottom-icon-golf {
    font-size: 22px;
}

.bottom-nav .bottom-icon-villa {
    font-size: 22px;
}

.bottom-nav .bottom-icon-car {
    font-size: 22px;
}

.bottom-nav .bottom-icon-tour {
    font-size: 23px;
}
