/* ------------------------------------------------------------------
   Navigation & Header Styles – extracted from styles.css
   ------------------------------------------------------------------ */

.header {
    position: relative; /* contain absolutely positioned children */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text);
    padding: 10px 20px;
    box-shadow: var(--shadow-md);
    z-index: var(--z-toolbar);
}

.header h1 {
    margin: 0;
    font-weight: 300;
}

/* Shelf toggle button in header (mobile only) */
#shelf-toggle-btn { display: none; }

@media (max-width: 767px) {
  #shelf-toggle-btn {
    display: inline-flex;
    position: absolute;
    left: max(12px, env(safe-area-inset-left));
    top: 8px;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
  }

  #shelf-toggle-btn:focus {
    outline: 2px solid rgba(255,255,255,0.9);
    outline-offset: 2px;
  }

  /* Prevent overlap with title */
  .header h1 { margin-left: 52px; }
}

/* Main navigation tabs */
.tabs-container {
    /* in-flow under header title */
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 0 20px;
    display: flex;
    z-index: var(--z-toolbar);
}

.tabs-container .tab-button {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 12px 20px;
    margin: 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tabs-container .tab-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.tabs-container .tab-button.active {
    color: white;
    border-bottom: 3px solid white;
    font-weight: 500;
}

/* --------------------------------------------------------- */
/* Ripple micro-interaction for tabs (Phase-4)               */
/* --------------------------------------------------------- */

.tabs-container .tab-button {
    position: relative;     /* Required for ripple */
    overflow: hidden;       /* Clip ripple circle */
}

/* Ripple element created dynamically in JS */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.3);
    animation: ripple-effect 600ms ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}


.status-bar {
    /* in-flow bottom row via grid */
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 5px 15px;
    font-size: 12px;
    color: var(--text);
    border-top: 1px solid rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-toolbar);
    min-height: 24px;
}

.status-bar .packet-counter {
    font-family: 'Courier New', Monaco, monospace;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    min-width: 90px;
    text-align: center;
}

.status-bar .packet-counter.flash {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding: 1px 4px;
}

/* User menu / avatar (top-right) */
.user-menu-container { position: absolute; right: 15px; top: 12px; transform: none; display: flex; align-items: center; z-index: 20; }

.avatar-badge {
  width: 36px; height: 36px; border-radius: 50%; background: #2c3e50; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: bold;
  cursor: pointer; font-size: 16px; overflow: hidden; flex-shrink: 0;
  border: 2px solid transparent; transition: border-color 0.2s;
}

.avatar-badge:hover { border-color: var(--primary); }
.avatar-badge.small { width: 32px; height: 32px; font-size: 14px; }

.avatar-img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown { position: absolute; top: 45px; right: 0; background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); overflow: hidden; z-index: 25; }
.user-dropdown.hidden { display: none; }
.user-menu-item { padding: 10px 15px; color: #333; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.user-menu-item:hover { background: #f1f1f1; }
