/* ==========================================================================
   MISTER FAST — LIVEMAPCHAT WEB HEADER DESIGN V1.0 (OPTION 1 APPROVED)
   Unified Two-Tier Enterprise Navigation Shell
   ========================================================================== */

:root {
  --mf-opt1-navy: #002b66;
  --mf-opt1-navy-dark: #001a40;
  --mf-opt1-navy-light: #0d3b7e;
  --mf-opt1-yellow: #ffc400;
  --mf-opt1-yellow-hover: #ffcf24;
  --mf-opt1-text-main: #002b66;
  --mf-opt1-text-muted: #4e6587;
  --mf-opt1-border: #dde5ef;
  --mf-opt1-font: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Master Header Wrap */
.mf-header-option1-wrap {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-family: var(--mf-opt1-font);
  background: #ffffff;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 43, 102, 0.1);
  overflow: hidden !important;
}

/* ==========================================================================
   TIER 1: HERO HEADER ROW
   ========================================================================== */
.mf-hero-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  background: #ffffff;
  padding: 0 20px 0 0;
  box-sizing: border-box;
  overflow: hidden;
  border-bottom: 2.5px solid var(--mf-opt1-yellow);
}

/* Left: Brand Identity & Swoop */
.mf-hero-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 0 24px 0 20px;
  height: 100%;
  background: #ffffff;
  z-index: 2;
  flex-shrink: 0;
}

.mf-hero-logo-badge {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #002b66, #001a40);
  border: 2.5px solid var(--mf-opt1-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 43, 102, 0.25);
  flex-shrink: 0;
}

.mf-hero-logo-circle {
  font-weight: 900;
  font-size: 19px;
  color: var(--mf-opt1-yellow);
  letter-spacing: -0.5px;
  font-family: var(--mf-opt1-font);
}

.mf-hero-brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mf-hero-brand-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--mf-opt1-navy);
  letter-spacing: 0.2px;
}

.mf-hero-brand-sub {
  font-size: 12px;
  font-weight: 700;
  color: #1a4480;
  letter-spacing: 0.2px;
}

/* Decorative Yellow Wave on Bottom Left */
.mf-hero-yellow-swoop {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 140px;
  height: 16px;
  background: var(--mf-opt1-yellow);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 3;
}

/* Center: Slogan & Fleet Artwork */
.mf-hero-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  padding: 0 10px;
  min-width: 0;
  overflow: hidden;
}

.mf-hero-slogan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: nowrap;
  margin-right: 14px;
  flex-shrink: 0;
  z-index: 2;
}

.mf-hero-slogan-th {
  font-size: 14px;
  font-weight: 800;
  color: var(--mf-opt1-navy);
  letter-spacing: 0.2px;
  line-height: 1.25;
}

.mf-hero-slogan-en {
  font-size: 10px;
  font-weight: 600;
  color: #3b5a84;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mf-hero-artwork-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  height: 100%;
  flex: 1;
  max-width: 650px;
  overflow: hidden;
}

.mf-hero-artwork-img {
  height: 100%;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: left bottom;
  display: block;
}

/* Right: Contact & User Profile Group */
.mf-hero-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding-left: 28px;
  background: linear-gradient(90deg, rgba(0, 43, 102, 0) 0%, rgba(0, 43, 102, 0.85) 24px, #002b66 60px, #00265c 100%);
  flex-shrink: 0;
  z-index: 2;
}

/* Dark Contact Capsules (Phone & Website) */
.mf-hero-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.mf-hero-capsule-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.mf-hero-capsule-dark:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.mf-capsule-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1455a6;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.mf-capsule-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mf-capsule-val {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
}

.mf-capsule-lbl {
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.76);
  white-space: nowrap;
}

/* Profile Capsule (White pill) */
.mf-hero-capsule-profile {
  position: relative;
  background: #ffffff;
  color: var(--mf-opt1-navy);
  border: 1px solid #d8e2ee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 4px 14px 4px 6px;
  cursor: pointer;
}

.mf-hero-capsule-profile:hover {
  background: #f7faff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mf-capsule-avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--mf-opt1-yellow);
  background: #002b66;
  flex-shrink: 0;
}

.mf-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-hero-capsule-profile .mf-user-name {
  color: var(--mf-opt1-navy);
  font-size: 12.5px;
  font-weight: 800;
}

.mf-hero-capsule-profile .mf-user-role {
  color: #557299;
  font-size: 9.5px;
  font-weight: 600;
}

.mf-capsule-chevron {
  display: flex;
  align-items: center;
  margin-left: 4px;
  color: #7188a8;
  transition: transform 0.2s ease;
}

.mf-hero-capsule-profile.is-open .mf-capsule-chevron {
  transform: rotate(180deg);
}

/* Profile Dropdown Menu */
.mf-profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d4e0ee;
  box-shadow: 0 8px 24px rgba(0, 30, 80, 0.2);
  padding: 8px 0;
  display: none;
  flex-direction: column;
  z-index: 100;
  animation: mfFadeInDown 0.15s ease-out;
}

.mf-hero-capsule-profile.is-open .mf-profile-dropdown-menu {
  display: flex;
}

.mf-pdd-header {
  padding: 10px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mf-pdd-header strong {
  font-size: 13px;
  color: var(--mf-opt1-navy);
}

.mf-pdd-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e6effa;
  color: #0d4289;
  margin-top: 2px;
}

.mf-pdd-header small {
  font-size: 10px;
  color: #8397b2;
}

.mf-pdd-divider {
  height: 1px;
  background: #e6edf7;
  margin: 6px 0;
}

.mf-pdd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: #213c63;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mf-pdd-item:hover {
  background: #f0f5fc;
  color: var(--mf-opt1-navy);
}

.mf-pdd-logout {
  color: #d12c2c;
}

.mf-pdd-logout:hover {
  background: #fff1f1;
  color: #b71c1c;
}

@keyframes mfFadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TIER 2: NAVIGATION BAR (DEEP NAVY #002B66)
   ========================================================================== */
.mf-navbar-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 18px;
  background: var(--mf-opt1-navy);
  box-sizing: border-box;
  min-height: 52px;
}

/* Left Navigation Buttons (Stacked Icon + Label) */
.mf-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mf-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
  min-width: 52px;
}

.mf-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.mf-nav-icon-svg {
  flex-shrink: 0;
  display: block;
  fill: currentColor;
}

/* Active Nav Button (Live Map Yellow Pill) */
.mf-nav-btn.is-active {
  background: var(--mf-opt1-yellow) !important;
  color: #002b66 !important;
  font-weight: 800 !important;
  border-radius: 10px;
  padding: 5px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.mf-nav-btn.is-active .mf-nav-icon-svg {
  fill: #002b66 !important;
}

.mf-nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Middle: Search Box */
.mf-nav-search-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 520px;
  min-width: 220px;
  margin: 0 6px;
}

.mf-opt1-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border-radius: 999px;
  padding: 2px 3px 2px 14px;
  height: 38px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 20, 60, 0.2);
}

.mf-search-mag-icon {
  display: flex;
  align-items: center;
  color: #1a4d8f;
  margin-right: 6px;
  flex-shrink: 0;
}

.mf-opt1-search-input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 11.5px;
  font-family: var(--mf-opt1-font);
  color: #002457;
  padding: 4px;
  background: transparent;
  min-width: 0;
}

.mf-opt1-search-input::placeholder {
  color: #7b94b5;
  font-weight: 500;
}

.mf-opt1-search-submit {
  background: var(--mf-opt1-yellow);
  color: #002b66;
  border: 0;
  border-radius: 999px;
  height: 32px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--mf-opt1-font);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mf-opt1-search-submit:hover {
  background: var(--mf-opt1-yellow-hover);
}

/* Right Controls: Status & Counter Pills */
.mf-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mf-nav-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border-radius: 999px;
  padding: 5px 12px;
  height: 34px;
  box-sizing: border-box;
  font-size: 11.5px;
  font-weight: 600;
  color: #002b66;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 20, 60, 0.15);
}

.mf-pill-status {
  color: #058241;
  font-weight: 700;
}

.mf-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: mfPulseLive 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes mfPulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.mf-pill-counter .mf-counter-val {
  font-weight: 800;
  color: #002b66;
}

.mf-pill-counter .mf-counter-lbl {
  color: #436187;
  font-size: 11px;
}

.mf-nav-btn-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  border: 0;
  color: #144d93;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 20, 60, 0.15);
  flex-shrink: 0;
}

.mf-nav-btn-icon:hover {
  background: #f2f7fd;
}

.mf-nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e02424;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   RESPONSIVE MATRIX (1440, 1366, 768, 430, 390, 360)
   ========================================================================== */

@media (max-width: 1440px) {
  .mf-hero-slogan-th { font-size: 13px; }
  .mf-hero-artwork-wrap { max-width: 480px; }
  .mf-opt1-search-input { font-size: 11px; }
}

@media (max-width: 1250px) {
  .mf-hero-slogan { display: none; }
  .mf-hero-artwork-wrap { max-width: 360px; }
  .mf-hero-capsule-dark { padding: 5px 10px 5px 6px; }
  .mf-capsule-val { font-size: 11px; }
  .mf-nav-search-wrap { max-width: 380px; }
}

@media (max-width: 1150px) {
  .mf-hero-capsule-dark { display: none !important; }
  .mf-hero-artwork-wrap { max-width: 180px !important; }
  .mf-pill-status { display: none !important; }
  .mf-nav-search-wrap { max-width: 220px !important; min-width: 120px !important; }
  .mf-nav-btn { padding: 4px 5px !important; min-width: 40px !important; font-size: 10px !important; }
  .mf-nav-pill { padding: 4px 6px !important; font-size: 10.5px !important; }
  .mf-header-option1-wrap { overflow: hidden !important; width: 100% !important; max-width: 100% !important; }
  .mf-hero-row { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
  .mf-navbar-row { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
}

/* 768px - Tablet & Mobile Responsive */
.mf-hero-hamburger-btn {
  display: none;
}

@media (max-width: 900px) {
  .mf-hero-hamburger-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 8px !important;
  }

  .mf-hero-row {
    background: linear-gradient(135deg, #002B66 0%, #001f4d 100%) !important;
    height: 56px !important;
    padding: 0 14px !important;
    border-bottom: 2.5px solid var(--mf-opt1-yellow) !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .mf-hero-brand {
    background: transparent !important;
    padding: 0 !important;
    gap: 10px !important;
  }
  .mf-hero-logo-badge {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: var(--mf-opt1-yellow) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  }
  .mf-hero-logo-circle {
    font-size: 16px !important;
    color: #002B66 !important;
    font-weight: 900 !important;
  }
  .mf-hero-brand-name {
    font-size: 17px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
  }
  .mf-hero-brand-sub {
    font-size: 11px !important;
    color: #bfdbfe !important;
    font-weight: 600 !important;
    display: block !important;
  }
  .mf-hero-yellow-swoop {
    display: none !important;
  }
  
  .mf-hero-center { display: none !important; }
  .mf-hero-right { background: transparent !important; padding-left: 0 !important; }
  .mf-hero-capsule-dark { display: none !important; }
  .mf-hero-capsule-profile { display: none !important; }
  
  .mf-navbar-row {
    background: #f8fafc !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .mf-nav-links {
    display: none !important;
  }
  .mf-nav-controls {
    display: none !important;
  }
  .mf-nav-search-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .mf-opt1-search-form {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1.5px solid #dce6f3 !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 8px rgba(0, 43, 102, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 4px 0 14px !important;
    box-sizing: border-box !important;
  }
  .mf-search-mag-icon {
    display: flex !important;
    align-items: center !important;
    margin-right: 8px !important;
  }
  .mf-opt1-search-input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    color: #1e293b !important;
    outline: none !important;
    padding: 0 !important;
  }
  .mf-opt1-search-input::placeholder {
    color: #64748b !important;
  }
  .mf-opt1-search-submit {
    height: 34px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: var(--mf-opt1-yellow) !important;
    color: #002B66 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Extra small mobile adjustments (430px, 390px, 360px) */
@media (max-width: 500px) {
  .mf-hero-row {
    height: 52px !important;
    padding: 0 12px !important;
  }
  .mf-hero-brand-name { font-size: 16px !important; }
  .mf-hero-brand-sub { font-size: 10px !important; }
  
  .mf-navbar-row {
    padding: 8px 12px !important;
  }
  .mf-opt1-search-form {
    height: 38px !important;
    padding: 0 3px 0 12px !important;
  }
  .mf-opt1-search-input {
    font-size: 12px !important;
  }
  .mf-opt1-search-submit {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}


/* Account dropdown: release ancestor clipping only while this menu is open. */
#mfHeaderOption1.mf-account-menu-open {
  overflow: visible !important;
  z-index: 100000 !important;
}
#mfHeaderOption1.mf-account-menu-open .mf-hero-row {
  overflow: visible !important;
  z-index: 1;
}
#mfProfileDropdown {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
}