/**
 * JDS Pay - Mobile/Tablet Bottom Navigation
 * Visible only on screens <=900px in portrait mode
 * Desktop layout completely untouched
 */

/* Hide bottom nav by default (desktop) */
.jds-bottom-nav {
    display: none;
}

/* Mobile + Tablet Portrait Mode */
@media (max-width: 900px) and (orientation: portrait) {
    
    /* Show bottom nav */
    .jds-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: #ffffff;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
        border-top: 1px solid #e0e0e0;
    }
    
    /* Each nav item */
    .jds-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #757575;
        padding: 8px 4px;
        cursor: pointer;
        transition: color 0.2s ease;
        max-width: 80px;
    }
    
    .jds-bottom-nav-item:hover,
    .jds-bottom-nav-item:focus {
        text-decoration: none;
        color: #3f51b5;
    }
    
    /* Active item */
    .jds-bottom-nav-item.active {
        color: #3f51b5;
    }
    
    .jds-bottom-nav-item.active .jds-bottom-nav-icon {
        transform: scale(1.1);
    }
    
    /* Icon */
    .jds-bottom-nav-icon {
        font-size: 22px;
        line-height: 1;
        margin-bottom: 4px;
        transition: transform 0.2s ease;
    }
    
    /* Label */
    .jds-bottom-nav-label {
        font-size: 10px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
    }
    
    /* Add bottom padding to main content so footer doesn't overlap */
    body, .ds-mobile-bottom-pad {
        padding-bottom: 70px !important;
    }
    
    /* Hide desktop sidebar on mobile/tablet portrait */
    #mySidenav,
    .sidebar,
    .sidebar-inner {
        display: none !important;
    }
    
    /* Adjust main content to full width (sidebar hidden) */
    div.content {
        margin-left: 0 !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .wraper-main {
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Tablet landscape & desktop - sidebar visible, bottom nav hidden */
@media (min-width: 901px), (orientation: landscape) {
    .jds-bottom-nav {
        display: none !important;
    }
}

/* ═══════════════════════════════════════
   MORE DRAWER STYLES
   Visible only on mobile/tablet portrait
   ═══════════════════════════════════════ */

/* Overlay - dark background behind drawer */
.jds-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jds-drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Drawer panel - hidden by default */
.jds-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 75vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

/* Show drawer on mobile/tablet portrait */
@media (max-width: 900px) and (orientation: portrait) {
    .jds-drawer {
        display: block;
    }
    .jds-drawer.open {
        transform: translateY(0);
    }
}

/* Drawer Header */
.jds-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.jds-drawer-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #212121;
}

.jds-drawer-close {
    background: none;
    border: none;
    color: #757575;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.jds-drawer-close:hover {
    background: #f5f5f5;
}

/* Drawer Body */
.jds-drawer-body {
    padding: 16px;
}

/* Grid layout - 3 columns on mobile, 4 on tablet */
.jds-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 600px) and (max-width: 900px) and (orientation: portrait) {
    .jds-drawer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Each drawer item */
.jds-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #424242;
    padding: 12px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.jds-drawer-item:hover,
.jds-drawer-item:focus {
    text-decoration: none;
    color: #3f51b5;
    background: #f5f5f5;
}

.jds-drawer-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 6px;
}

.jds-drawer-item-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}
