/**
 * Mobile Dock Navigation
 * Sticky bottom navigation bar for mobile devices
 */

/* ============================================================================
   MOBILE DOCK BASE
   ============================================================================ */

.tld-mobile-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: env(safe-area-inset-bottom);
    display: none;
}

/* Show only on mobile/tablet */
@media (max-width: 1024px) {
    .tld-mobile-dock {
        display: block;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

.tld-mobile-dock__inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 70px;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 4px;
}

/* ============================================================================
   DOCK ITEMS
   ============================================================================ */

.tld-mobile-dock__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #404040;
    text-decoration: none;
    cursor: pointer;
    transition: all 200ms ease;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    flex: 1;
    max-width: 90px;
}

.tld-mobile-dock__item:hover,
.tld-mobile-dock__item:active {
    background: rgba(0, 0, 0, 0.05);
}

.tld-mobile-dock__item:active {
    transform: scale(0.95);
}

/* ============================================================================
   DOCK ICONS
   ============================================================================ */

.tld-mobile-dock__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 200ms ease, transform 200ms ease;
}

.tld-mobile-dock__item:hover .tld-mobile-dock__icon,
.tld-mobile-dock__item:active .tld-mobile-dock__icon {
    opacity: 1;
}

/* ============================================================================
   DOCK LABELS
   ============================================================================ */

.tld-mobile-dock__label {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    text-align: center;
    color: #404040;
    transition: color 200ms ease;
}

.tld-mobile-dock__item:hover .tld-mobile-dock__label,
.tld-mobile-dock__item:active .tld-mobile-dock__label {
    color: #1a1a1a;
}

/* ============================================================================
   CART BADGE
   ============================================================================ */

.tld-mobile-dock__badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #1a4a5e;
    border: 2px solid #ffffff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    color: #ffffff;
    animation: badge-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   ACTIVE STATES
   ============================================================================ */

.tld-mobile-dock__item--active {
    background: rgba(26, 74, 94, 0.08);
}

.tld-mobile-dock__item--active .tld-mobile-dock__icon {
    opacity: 1;
}

.tld-mobile-dock__item--active .tld-mobile-dock__label {
    color: #1a4a5e;
    font-weight: 600;
}

/* ============================================================================
   SPECIFIC ICON STYLES
   ============================================================================ */

/* Cart icon highlight */
.tld-mobile-dock__item--cart {
    /* Optionally make cart stand out more */
}

.tld-mobile-dock__item--cart .tld-mobile-dock__icon {
    width: 26px;
    height: 26px;
}

/* Menu/burger icon */
.tld-mobile-dock__item--menu {
    /* Optional menu styling */
}

/* Search icon */
.tld-mobile-dock__item--search {
    /* Optional search styling */
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 480px) {
    .tld-mobile-dock__inner {
        height: 65px;
        padding: 6px 2px;
    }

    .tld-mobile-dock__item {
        padding: 6px 8px;
        gap: 3px;
    }

    .tld-mobile-dock__icon {
        width: 22px;
        height: 22px;
    }

    .tld-mobile-dock__item--cart .tld-mobile-dock__icon {
        width: 24px;
        height: 24px;
    }

    .tld-mobile-dock__label {
        font-size: 10px;
    }

    body {
        padding-bottom: calc(65px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 360px) {
    .tld-mobile-dock__label {
        display: none;
    }

    .tld-mobile-dock__inner {
        height: 60px;
    }

    .tld-mobile-dock__icon {
        width: 26px;
        height: 26px;
    }

    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .tld-mobile-dock {
        background: #1a1a1a;
        border-top-color: #404040;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    }

    .tld-mobile-dock__item {
        color: #e0e0e0;
    }

    .tld-mobile-dock__item:hover,
    .tld-mobile-dock__item:active {
        background: rgba(255, 255, 255, 0.1);
    }

    .tld-mobile-dock__label {
        color: #e0e0e0;
    }

    .tld-mobile-dock__item:hover .tld-mobile-dock__label,
    .tld-mobile-dock__item:active .tld-mobile-dock__label {
        color: #ffffff;
    }

    .tld-mobile-dock__item--active {
        background: rgba(255, 255, 255, 0.15);
    }
}
