/* ============================================
   BOTTOM MENU NAVIGATION - MOBILE ONLY
   ============================================ */

/* Base styles - Hidden by default, shown only on mobile */
.bottom-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #324848;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 997;
    padding: 4px 0;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
}

/* Mobile only - Show bottom menu */
@media screen and (max-width: 768px) {
    .bottom-menu {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
}

/* Bottom menu items - Icon with label */
.bottom-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    transition: color 0.2s ease, opacity 0.2s ease;
    flex: 1;
    max-width: 80px;
    text-decoration: none;
    gap: 2px;
}

/* Anchor tag styling */
a.bottom-menu-item {
    text-decoration: none;
    border: none;
    outline: none;
}

.bottom-menu-item:active,
a.bottom-menu-item:active {
    opacity: 0.7;
}

.bottom-menu-item:disabled {
    cursor: default;
    opacity: 0.5;
}

/* Icons */
.bottom-menu-item i {
    font-size: 20px;
    line-height: 1;
    color: #ffffff;
    transition: color 0.2s ease;
}

/* Labels */
.bottom-menu-item span {
    font-size: 10px;
    line-height: 1.2;
    color: #ffffff;
    transition: color 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Active state */
.bottom-menu-item.active {
    color: #e1b672;
}

.bottom-menu-item.active i {
    color: #e1b672;
}

.bottom-menu-item.active span {
    color: #e1b672;
}

/* Options button active when panel is open */
.bottom-menu-item.active i.fa-ellipsis-h {
    color: #e1b672;
}

/* ============================================
   EXPANDABLE OPTIONS PANEL
   ============================================ */

/* Overlay backdrop */
.bottom-menu-options-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-menu-options-overlay.visible {
    display: block;
    opacity: 1;
}

/* Options Panel */
.bottom-menu-options-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    background: linear-gradient(
        to bottom,
        #f9f7f4 0%,
        #fef9f2 50%,
        #fef8f1 100%
    );
    border-top: 1px solid #e3dcd6;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-y: auto;
}

.bottom-menu-options-panel.open {
    transform: translateY(0);
}

/* Options Content */
.bottom-menu-options-content {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}

/* Options Items - Match sidepane styling */
.bottom-menu-options-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #262e2e;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Work Sans', sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
}

.bottom-menu-options-item:hover {
    background-color: #f5f1eb;
    color: #324848;
}

.bottom-menu-options-item i {
    width: 20px;
    font-size: 16px;
    color: #626262;
    flex-shrink: 0;
}

.bottom-menu-options-item:hover i {
    color: #324848;
}

.bottom-menu-options-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto;
}

.bottom-menu-options-item.disabled:hover {
    background-color: transparent;
    color: #262e2e;
}

.bottom-menu-options-item.disabled:hover i {
    color: #626262;
}

/* Toggle Switch Container */
.bottom-menu-options-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 12px;
    position: relative;
    overflow: visible;
}

.bottom-menu-options-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    font-size: 15px;
    color: #262e2e;
    font-family: 'Work Sans', sans-serif;
}

.bottom-menu-options-toggle-label i {
    width: 20px;
    font-size: 16px;
    color: #626262;
    flex-shrink: 0;
}

/* Toggle Switch */
.bottom-menu-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    overflow: visible;
}

.bottom-menu-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bottom-menu-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.bottom-menu-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.bottom-menu-toggle-switch input:checked + .bottom-menu-toggle-slider {
    background-color: #324848;
}

.bottom-menu-toggle-switch input:checked + .bottom-menu-toggle-slider:before {
    transform: translateX(20px);
}

.bottom-menu-toggle-switch input:focus + .bottom-menu-toggle-slider {
    box-shadow: 0 0 1px #324848;
}

/* Status Badge Container */
.bottom-menu-options-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 12px;
    position: relative;
    overflow: visible;
}

/* Status Badge */
.bottom-menu-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Work Sans', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.bottom-menu-status-badge.bottom-menu-status-active {
    background-color: #d4edda;
    color: #155724;
}

.bottom-menu-status-badge.bottom-menu-status-setup {
    background-color: #fff3cd;
    color: #856404;
    cursor: pointer;
}

.bottom-menu-status-badge.bottom-menu-status-setup:hover {
    background-color: #ffeaa7;
    color: #6c5a00;
}

/* Ensure content doesn't get hidden behind bottom menu on mobile */
@media screen and (max-width: 768px) {
    .content-wrapper {
        padding-bottom: 80px;
    }
    
    /* For pages with specific containers */
    .main-container,
    .view-contributions-page,
    .registry-page-content {
        padding-bottom: 80px;
    }
}
