/**
 * EXULO Mobile - Navigation Customizer CSS
 * Styling für Long-Press Navigation Anpassung
 *
 * @version 1.0.0
 */

/* =============================================================================
   NAV INDICATOR (📌 Pin im Mehr-Menü)
   ============================================================================= */

/* Ensure parent has position relative for absolute child */
.more-menu-card {
    position: relative;
}

.more-menu-card .nav-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 16px;
    line-height: 1;
    opacity: 1;
    z-index: 10;
    display: none; /* Default hidden, JS zeigt es an */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    /* Hintergrund-Circle für bessere Sichtbarkeit */
    background: rgba(15, 23, 42, 0.9);
    border-radius: 50%;
    padding: 2px;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

/* Card die in Nav ist - highlight */
.more-menu-card.in-nav {
    border-color: rgba(59, 130, 246, 0.5) !important;
    background: rgba(59, 130, 246, 0.12) !important;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* =============================================================================
   MODAL CONTAINER
   ============================================================================= */

.nav-customizer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-customizer-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.nav-customizer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* =============================================================================
   MODAL CONTENT
   ============================================================================= */

.nav-customizer-content {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s ease;
}

.nav-customizer-modal.active .nav-customizer-content {
    transform: scale(1) translateY(0);
}

/* =============================================================================
   MODAL HEADER
   ============================================================================= */

.nav-customizer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-customizer-icon {
    font-size: 24px;
}

.nav-customizer-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.nav-customizer-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-customizer-close:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

/* =============================================================================
   MODAL SUBTITLE
   ============================================================================= */

.nav-customizer-subtitle {
    padding: 12px 16px 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-align: center;
}

/* =============================================================================
   ITEM GRID
   ============================================================================= */

.nav-customizer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 16px 16px;
}

.nav-customizer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 70px;
}

.nav-customizer-item:active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgb(96, 165, 250);
    transform: scale(0.95);
}

.nav-customizer-item-icon {
    font-size: 24px;
    line-height: 1;
}

.nav-customizer-item-label {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* =============================================================================
   MODAL ACTIONS
   ============================================================================= */

.nav-customizer-actions {
    display: flex;
    justify-content: center;
    padding: 0 16px 16px;
}

.nav-customizer-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-customizer-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.nav-customizer-btn.cancel:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

/* =============================================================================
   TOAST NOTIFICATION
   ============================================================================= */

.nav-customizer-toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height, 60px) + var(--safe-area-bottom, 0px) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-customizer-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nav-customizer-toast .toast-icon {
    font-size: 18px;
    color: #fff;
}

.nav-customizer-toast .toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

/* =============================================================================
   LONG-PRESS VISUAL FEEDBACK
   ============================================================================= */

/* Tab während Long-Press */
.bottom-nav-tab.long-press-active {
    background: rgba(59, 130, 246, 0.15);
    transform: scale(0.95);
}

/* Card während Long-Press */
.more-menu-card.long-press-active {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgb(96, 165, 250) !important;
    transform: scale(0.98);
}

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

/* Für sehr kleine Screens */
@media (max-width: 320px) {
    .nav-customizer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-customizer-item {
        min-height: 60px;
        padding: 10px 2px;
    }

    .nav-customizer-item-icon {
        font-size: 20px;
    }

    .nav-customizer-item-label {
        font-size: 9px;
    }
}

/* Landscape Mode */
@media (max-height: 500px) {
    .nav-customizer-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .nav-customizer-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .nav-customizer-item {
        min-height: 60px;
    }
}
