/* ==================================================
FILE : /assets/01-mstr-tmplet/jzn-topbar/css/jzn-topbar.css
PURPOSE : THE TOPBAR ENGINE - 2-Zone Master Build [jzn]
VERSION: v1.0 - DATE CREATED: 2026-02-18 - Initial Build
VERSION: v2.6 - DATE MODIFIED: 2026-02-24 - Burger Alignment & Hard Separation
==================================================== */

:root {
  /* --- BRAT TWEAKS: Global Layout Ratios --- */
  --jzn-topbar-h-desktop: 150px; /* <-- Brat Tweak: Main Desktop Height */
  --jzn-topbar-h-mobile: 60px; /* <-- Brat Tweak: Mobile Height */
  --jzn-logo-pulse-speed: 4s; /* <-- Brat Tweak: Breathing Speed */
  --jzn-glass-op: 0.85; /* <-- Brat Tweak: Glass Opacity */
}

/* ==================================================
   SECTION 1: ZONE 1 - MOBILE & TABLET PORTRAIT (300px - 767px)
   ================================================== */
@media (max-width: 767px) {
  .jzn-mobile-navbar {
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: var(--jzn-topbar-h-mobile) !important;
    z-index: var(--z-topbar-king) !important;
    background: rgba(15, 23, 42, var(--jzn-glass-op));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--jzn-glass-border);
    display: flex;
    align-items: center; /* <-- Brat Tweak: Centers content vertically */
  }

  .jzn-mobile-navbar .jzn-mstr-grid {
    display: grid !important;
    grid-template-columns: 80px 1fr 120px !important; /* <-- Brat Tweak: Prevents Icon Overflow */
    width: 100%;
    height: 100%;
    align-items: center; /* <-- Brat Tweak: Crucial for vertical icon centering */
    padding: 0 15px;
    pointer-events: none; /* <-- CRITICAL: Prevents grid from blocking icons */
  }

  .jzn-mobile-navbar .jzn-col-left {
    display: flex;
    justify-content: flex-start;
    align-items: center; /* <-- Brat Tweak: Ensures Burger/Search are leveled */
    gap: 12px;
    pointer-events: auto; /* <-- CRITICAL: Enables clicks inside columns */
  }

  /* --- MOBILE BURGER SPECIFIC --- */
  .jzn-burger-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: center; /* <-- Brat Tweak: Vertical Line Centering */
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    gap: 5px; /* Spacing between lines */
  }

  .jzn-burger-line {
    width: 25px;
    height: 2px;
    background-color: var(--jzn-text);
    transition: 0.3s;
  }

  .jzn-mobile-navbar .jzn-col-center {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: auto; /* <-- CRITICAL: Enables clicks inside columns */
  }

  .jzn-mobile-navbar .jzn-col-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    pointer-events: auto; /* <-- CRITICAL: Enables clicks inside columns */
  }
}

/* ==================================================
   SECTION 2: ZONE 2 - DESKTOP & IPAD (768px - 1200px+)
   ================================================== */
@media (min-width: 768px) {
  :root {
    --jzn-col-side: 22%; /* <-- Brat Tweak: Precision Side Ratio */
    --jzn-col-mid: 56%; /* <-- Brat Tweak: Precision Center Ratio */
  }

  .jzn-desktop-navbar {
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: var(--jzn-topbar-h-desktop) !important;
    z-index: var(--z-topbar-king) !important;
    background: rgba(15, 23, 42, var(--jzn-glass-op));
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--jzn-glass-border);
    display: flex;
    align-items: center;
    pointer-events: all !important;
  }

  .jzn-desktop-navbar .jzn-mstr-grid {
    display: grid !important;
    grid-template-columns: var(--jzn-col-side) var(--jzn-col-mid) var(
        --jzn-col-side
      ) !important;
    width: 100%;
    max-width: var(--jzn-max-width);
    margin: 0 auto;
    height: 100%;
    align-items: center;
    padding: 0 30px;
    pointer-events: none; /* Allows clicks to penetrate the grid container */
  }

  .jzn-desktop-navbar .jzn-col-left {
    display: flex;
    justify-content: flex-start;
    pointer-events: auto;
    align-items: center; /* Pulls the Search Icon down to the exact vertical center of the Logo */
    gap: 15px; /* <-- Brat Tweak: Space between the Logo and the Search Icon (Minimum 10px,) */
  }

  .jzn-desktop-navbar .jzn-col-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    pointer-events: auto;
  }

  .jzn-desktop-navbar .jzn-col-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none; /* Let clicks hit the icon group buttons */
  }

  .jzn-icon-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1px; /* <-- Brat Tweak: Precision Tight Gap */
    pointer-events: auto !important; /* Forces buttons to be active */
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ==================================================
   SECTION 3: BRANDING DNA (CLEAN BREATHING & RGB)
   ================================================== */
.jzn-branding-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.jzn-logo-text-pulse {
  font-family: var(--jzn-font-brand);
  font-weight: 900 !important;
  font-size: 2rem;
  letter-spacing: 2.8px;
  text-decoration: none;
  display: inline-block;

  /* --- THE RGB DNA --- */
  background: linear-gradient(
    90deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #8f00ff,
    #ff0000
  );
  background-size: 400% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: jzn-logo-rgb-flow 8s linear infinite;
  transition:
    opacity 0.3s ease,
    filter 0.3s ease;
}

/* --- THE BREATHING OVERRIDE --- */
.jzn-mode-breathing .jzn-logo-text-pulse {
  animation:
    jzn-logo-rgb-flow 8s linear infinite,
    jzn-logo-breathing var(--jzn-logo-pulse-speed) infinite ease-in-out;
}

@keyframes jzn-logo-rgb-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* FIXED: No ghosting/glow, just 20% to 100% Brightness */
@keyframes jzn-logo-breathing {
  0%,
  100% {
    filter: brightness(100%); /* <-- Brat Tweak: Full Peak */
  }
  50% {
    filter: brightness(15%); /* <-- Brat Tweak: Deep Dim */
  }
}

/* ==================================================
   SECTION 4a: TAGLINE
   ================================================== */
.jzn-desktop-tagline {
  font-family: var(--jzn-font-ui);
  font-size: 0.75rem; /* <-- Brat Tweak: Desktop Tagline Size */
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  letter-spacing: 1.5px;
  line-height: 1.5;

  /* OVERFLOW SAFETIES */
  white-space: normal;
  flex-shrink: 1;
  min-width: 0;
  word-wrap: break-word;
  transition: font-size 0.2s ease; /* Smooth visual shrinking */
}

/* --- THE FLUID BREAKPOINTS --- */
@media (max-width: 1024px) {
  .jzn-desktop-tagline {
    font-size: 0.6rem; /* <-- Brat Tweak: Tablet Tagline Size */
  }
}

@media (max-width: 768px) {
  .jzn-desktop-tagline {
    font-size: 0.5rem; /* <-- Brat Tweak: Mobile Tagline Size */
    letter-spacing: 1px; /* Tighter letter spacing to save horizontal room */
  }
}

/* ==================================================
   SECTION 4b: ICONS
   ================================================== */

.jzn-icon-btn {
  cursor: pointer !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px !important; /* <-- Brat Tweak: Custom Icon Width */
  height: 60px !important; /* <-- Brat Tweak: Custom Icon Height */
  transition: transform 0.2s;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.jzn-icon-btn:hover {
  transform: scale(1.1);
}

/* ==================================================
   SECTION 5: PREMIUM DROPDOWN RESTRAINTS
   ================================================== */
.jzn-desktop-dropdown-list {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(20px);
  border: 1px solid var(--jzn-glass-border);
  border-radius: 8px;
  min-width: 280px;
  width: max-content; /* <-- Brat Tweak: Responsive Width */
  padding: 10px 0;
  z-index: var(--z-dropdowns) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  pointer-events: auto !important;
}

.jzn-show {
  display: flex !important;
}

/* ACTIVE STATE FOR DROPDOWNS */
.jzn-desktop-dropdown-list.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ==================================================
   SECTION 5.1: PREMIUM TOGGLE SWITCH (Green & No Glow)
   ================================================== */
.jzn-dropdown-setting-item {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--jzn-font-ui);
  font-size: 0.85rem;
  color: var(--jzn-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.jzn-setting-label {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* THE SWITCH HOUSING */
.jzn-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.jzn-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* THE TRACK */
.jzn-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* THE CIRCLE (KNOB) */
.jzn-slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 2px;
  background-color: #ffffff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* CHECKED STATE: PURE GREEN & NO GLOW */
input:checked + .jzn-slider {
  background-color: #00ff66 !important; /* <-- Brat Tweak: Electric Green */
  box-shadow: none !important; /* <-- Brat Tweak: Glow Terminated */
  border-color: transparent;
}

input:checked + .jzn-slider:before {
  transform: translateX(18px);
}

/* DIVIDER BETWEEN SETTINGS AND LIST */
.jzn-menu-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  margin: 5px 0;
}
