/* Easy Mobile Nav & Menu Frontend Public Styles */

/* -------------------------------------------------------------
   1. BOTTOM NAVIGATION BAR
------------------------------------------------------------- */
.mobile-bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--mbn-height, 60px);
    background-color: var(--mbn-bg-color, #F27A1A);
    z-index: var(--mbn-z-index, 9999);
    display: flex;
    align-items: center;
    border-top: var(--mbn-border-top-width, 0px) solid var(--mbn-border-top-color, transparent);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    box-sizing: border-box;
}

.mobile-bottom-nav-bar.mbn-hide-desktop {
    display: none !important;
}

@media (max-width: 991px) {
    .mobile-bottom-nav-bar.mbn-hide-desktop {
        display: flex !important;
    }
    
    /* Add bottom padding to body to prevent bottom nav from covering content */
    body.mbn-body-padding {
        padding-bottom: var(--mbn-height, 60px) !important;
    }
}

.mbn-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    flex: 1;
    height: 100%;
    position: relative;
    transition: all 0.25s ease;
    color: var(--mbn-text-color, #ffffff) !important;
}

.mbn-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
}

.mbn-icon {
    font-size: var(--mbn-icon-size, 20px);
    color: var(--mbn-icon-color, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease, transform 0.25s ease;
}

.mbn-icon svg {
    width: var(--mbn-icon-size, 20px);
    height: var(--mbn-icon-size, 20px);
    fill: currentColor;
}

.mbn-label {
    font-size: var(--mbn-font-size, 11px);
    color: var(--mbn-text-color, #ffffff);
    font-weight: 500;
    transition: color 0.25s ease;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* Badge styling */
.mbn-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--mbn-badge-bg-color, #1e293b);
    color: var(--mbn-badge-text-color, #ffffff);
    font-size: 10px;
    font-weight: bold;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Shadow styling */
.mobile-bottom-nav-bar.mbn-has-shadow {
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.15);
}

/* Active and Hover States */
.mbn-item.mbn-active, 
.mbn-item:hover {
    color: var(--mbn-text-active-color, #ffffff) !important;
    background-color: var(--mbn-active-item-bg, transparent);
}

.mbn-item.mbn-active .mbn-icon,
.mbn-item:hover .mbn-icon {
    color: var(--mbn-icon-active-color, #ffffff);
}

.mbn-item.mbn-active .mbn-label,
.mbn-item:hover .mbn-label {
    color: var(--mbn-text-active-color, #ffffff);
}

/* Label Visibility Effects */
.mbn-labels-never .mbn-label {
    display: none !important;
}
.mbn-labels-never .mbn-icon-wrapper {
    margin-bottom: 0;
}

.mbn-labels-active_only .mbn-label {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, height 0.2s ease;
    margin-top: 0;
}
.mbn-labels-active_only .mbn-item.mbn-active .mbn-label,
.mbn-labels-active_only .mbn-item:hover .mbn-label {
    opacity: 1;
    height: auto;
    margin-top: 3px;
}

/* Active Item Effects */

/* 1. Accent Line Effect */
.mbn-effect-accent-line .mbn-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--mbn-accent-line-color, #ffffff);
    transition: width 0.25s ease;
}
.mbn-effect-accent-line .mbn-item.mbn-active::after {
    width: 60%;
}

/* 2. Background Pill Effect */
.mbn-effect-background-pill .mbn-item .mbn-icon-wrapper {
    padding: 6px 16px;
    border-radius: 20px;
    transition: background-color 0.25s ease;
}
.mbn-effect-background-pill .mbn-item.mbn-active .mbn-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 3. Grow Effect */
.mbn-effect-grow .mbn-item.mbn-active .mbn-icon {
    transform: scale(1.2);
}

/* Hide on Scroll State */
.mobile-bottom-nav-bar.mbn-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Fix mobile drawer crop issue caused by body bottom padding */
@media (max-width: 991px) {
    .dc-drawer {
        top: 0 !important;
        bottom: 0 !important;
        height: auto !important;
    }
}


/* -------------------------------------------------------------
   2. SLIDING MOBILE DRAWER MENU
------------------------------------------------------------- */

/* Hide theme's default mobile drawer and overlay to avoid conflicts */
body #dcMobileDrawer,
body #dcOverlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 2.1 OVERLAY MASK */
.embm-overlay {
    position: fixed;
    inset: 0;
    background: var(--embm-overlay-bg);
    z-index: calc(var(--embm-z-index) - 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.embm-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 2.2 DRAWER CONTAINER */
.embm-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--embm-width);
    max-width: 85%;
    background: var(--embm-drawer-bg);
    z-index: var(--embm-z-index);
    transform: translateX(-100%);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.embm-drawer.is-active {
    transform: translateX(0);
}

.embm-drawer-inner {
    height: 100%;
    overflow-y: auto;
    padding: 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* 2.3 CLOSE BUTTON */
.embm-close-btn {
    position: absolute;
    top: 20px;
    left: 100%;
    margin-left: 20px;
    background: transparent;
    border: none;
    font-size: 38px;
    font-weight: 300;
    line-height: 1;
    color: #ffffff; /* White close button on the dark overlay */
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Hide by default when drawer is closed */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.embm-drawer.is-active .embm-close-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.embm-close-btn:hover,
.embm-close-btn:focus {
    color: #333333;
    transform: scale(1.1);
    outline: none;
}

/* 2.4 USER GREETING CARD */
.embm-greeting-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--embm-greeting-bg);
    border-radius: var(--embm-border-radius);
    padding: 16px 20px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(242, 122, 26, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.embm-greeting-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(186, 119, 97, 0.35);
}

.embm-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    color: var(--embm-greeting-text);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.embm-avatar svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.embm-user-info {
    display: flex;
    flex-direction: column;
    color: var(--embm-greeting-text);
    overflow: hidden;
}

.embm-user-hello {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.embm-user-action {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 3px;
    text-decoration: none;
    letter-spacing: 0.2px;
}

/* 2.5 SECTIONS GENERAL */
.embm-section {
    display: flex;
    flex-direction: column;
}

.embm-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #444444;
    margin: 0 0 14px 0;
    padding-bottom: 6px;
    position: relative;
}

.embm-section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: #ba7761;
    border-radius: 2px;
}

.embm-card-box {
    border: 1px solid #eaeaea;
    border-radius: var(--embm-border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

/* 2.6 CATEGORIES ACCORDION LIST */
.embm-categories-box {
    background: var(--embm-cats-bg);
}

.embm-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.embm-category-item {
    border-bottom: 1px solid #f2f2f2;
}

.embm-category-item:last-child {
    border-bottom: none;
}

.embm-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.embm-category-link {
    flex: 1;
    padding: 13px 20px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--embm-cats-text);
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.embm-category-link:hover,
.embm-category-link:focus {
    color: #ba7761;
    background-color: rgba(186, 119, 97, 0.03);
}

.embm-accordion-toggle {
    background: transparent;
    border: none;
    padding: 0 20px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--embm-cats-chevron);
    font-size: 11px;
    transition: transform 0.25s ease, color 0.2s ease;
    outline: none;
}

.embm-accordion-toggle:hover {
    color: #ba7761;
}

/* Rotate Chevron on Open Accordion */
.embm-category-item.is-open > .embm-category-row > .embm-accordion-toggle {
    transform: rotate(90deg);
}

/* Subcategory List Box styling */
.embm-subcategory-wrapper {
    background: #fcfcfc;
    border-top: 1px solid #f8f8f8;
}

.embm-category-list.depth-2 .embm-category-link {
    padding-left: 36px;
    font-size: 13.5px;
    color: #555555;
    font-weight: 400;
}

.embm-category-list.depth-2 .embm-category-item {
    border-bottom-color: #f7f7f7;
}

/* 2.7 QUICK LINKS LIST */
.embm-qlinks-box {
    background: var(--embm-qlinks-bg);
}

.embm-qlinks-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.embm-qlink-item {
    border-bottom: 1px solid #f2f2f2;
}

.embm-qlink-item:last-child {
    border-bottom: none;
}

.embm-qlink-anchor {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    text-decoration: none !important;
    color: var(--embm-qlinks-text);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.embm-qlink-anchor:hover,
.embm-qlink-anchor:focus {
    color: #ba7761;
    background-color: rgba(186, 119, 97, 0.03);
}

.embm-qlink-icon {
    font-size: 16px;
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ba7761;
    flex-shrink: 0;
}

/* Error fallback */
.embm-error {
    padding: 15px 20px;
    margin: 0;
    font-size: 13px;
    color: #cc1818;
}
