/* =========================================================
   WEATHERDUCK — HEADER MOBILE (FINAL v6)
   - Bright green bg: #72DD84
   - Iconic WD green: #425A47
   - No green outline on inactive tabs
   - Bigger wordmark + logo
   - Burger: WD green, bigger, thicker lines, wider spacing (SVG 6/12/18)
   - Tabs fill width, touch bottom rule, no slider bar
   ========================================================= */

/* Local aliases — inherits from design-tokens.css */
:root{
  --wdm-green: var(--wd-green-light);

  --ink: var(--wd-text-primary);
  --panel-shadow: 0 16px 36px rgba(0,0,0,.22);

  --tab-bg: var(--wd-bg-subtle);
  --tab-border: var(--wd-border-strong);
  --radius-top: var(--wd-radius-sm);
}

/* Header */
.wdm-header--mobile{
  width: 100%;
  background: var(--wdm-green);
  position: relative;
  z-index: 9999;

  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: .03em;

  /* Bottom green rule */
  border-bottom: 4px solid var(--wd-green);
}

/* TOP BAR (tight to bring tabs closer) */
.wdm-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 14px 4px; /* less space above tabs */
  border: 0;
  box-shadow: none;
}

/* Wordmark */
.wdm-left{ flex: 1 1 33%; }

.wdm-wordmark{
  line-height: 1.05;
  font-weight: 900;
  font-size: 20px;          /* bigger */
  letter-spacing: .03em;
  color: var(--wd-green);
}
.wdm-wordmark-line{ display:block; }

/* Center logo */
.wdm-center{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wdm-logo{
  width: 46px;              /* bigger */
  height: 46px;
  display: block;
  image-rendering: pixelated;
}

/* Burger */
.wdm-right{
  flex: 1 1 33%;
  display: flex;
  justify-content: flex-end;
}

.wdm-burger{ position: relative; }

.wdm-burger-btn{
  list-style: none;
  cursor: pointer;
  user-select: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  border-radius: var(--wd-radius-sm);
  background: transparent;
  border: 0;

  color: var(--wd-green);   /* WD green */
}

.wdm-burger-btn::-webkit-details-marker{ display:none; }

.wdm-burger-ico{
  display: block;
  width: 36px;
  height: 36px;
  opacity: .95;
}

.wdm-burger-ico path{
  stroke: currentColor;
  stroke-width: 3.6;        /* bolder */
  stroke-linecap: round;
}

/* Burger dropdown (fully opaque) */
.wdm-burger-panel{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);

  min-width: 240px;
  max-width: 85vw;

  background: var(--wd-bg-card);
  border: 1px solid var(--wd-border-strong);
  border-radius: var(--wd-radius-md);
  box-shadow: var(--panel-shadow);
  padding: 10px;

  z-index: 10000;
}

.wdm-burger-menu{
  margin: 0;
  padding: 0;
  list-style: none;
}

.wdm-burger-menu li{ margin: 0; }

.wdm-burger-menu a{
  display: block;
  padding: 12px 12px;
  border-radius: var(--wd-radius-sm);
  text-decoration: none;

  color: var(--wd-text-primary);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wdm-burger-menu a:hover{ background: var(--wd-bg-subtle); }

.wdm-burger-menu .sub-menu{
  margin: 6px 0 0 0;
  padding: 6px 0 0 0;
  list-style: none;
  border-top: 1px solid rgba(0,0,0,.12);
}

.wdm-burger-menu .sub-menu a{
  padding-left: 14px;
  font-weight: 700;
  color: rgba(0,0,0,.86);
}

/* TABS BAR (NO bottom padding so tabs touch the green rule) */
.wdm-tabsbar{
  display: flex;
  align-items: flex-end;

  gap: 8px;
  padding: 4px 12px 0; /* bottom = 0 */
  border: 0;
  background: transparent;
}

/* Forecasts label smaller */
.wdm-tabs-label{
  font-weight: 700;
  font-size: 11px;          /* smaller */
  color: var(--wd-green);
  letter-spacing: .02em;
  white-space: nowrap;
}

/* Tabs fill width, no slider bar */
.wdm-tabs{
  flex: 1;
  display: flex;
  align-items: flex-end;

  gap: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  padding: 0;
}

/* Tabs expand evenly */
.wdm-tab{
  flex: 1 1 0;
  min-width: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 30px;
  padding: 0 6px;

  border: 1px solid var(--tab-border);
  border-bottom: 0;
  border-radius: var(--radius-top) var(--radius-top) 0 0;

  background: var(--tab-bg);
  color: rgba(0,0,0,.78);

  text-decoration: none;
  font-weight: 700;         /* less bold to fit */
  font-size: 12px;
  letter-spacing: .01em;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Remove double borders between touching tabs */
.wdm-tab + .wdm-tab{ border-left: 0; }

/* Active tab */
.wdm-tab.is-active{
  background: var(--wd-green);
  border-color: rgba(0,0,0,.22);
  color: #fff;
}

/* SEARCH BAR */
.wdm-search{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 10px;
  margin: 0;
}

.wdm-search-wrap{
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.wdm-search-input{
  width: 100%;
  height: var(--wd-control-h);
  padding: 0 14px;

  border: 1px solid rgba(0,0,0,.14);
  border-radius: var(--wd-radius-md);
  background: var(--wd-bg-card);

  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
  text-transform: none;

  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.wdm-search-input:focus{
  border-color: var(--wd-green);
  box-shadow: var(--wd-focus-ring);
}

.wdm-search-input::placeholder{
  color: rgba(0,0,0,.38);
  font-weight: 400;
}

.wdm-search-btn{
  flex: 0 0 auto;
  height: var(--wd-control-h);
  padding: 0 14px;

  border: 0;
  border-radius: var(--wd-radius-md);
  background: var(--wd-green);
  color: var(--wd-text-on-green);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;

  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.wdm-search-btn:active{
  opacity: .85;
}

/* Autocomplete dropdown position for mobile search */
.wdm-search-wrap .wdh__autocomplete{
  top: calc(100% + 4px);
  left: 0;
  right: 0;
}

/* Auth menu visibility — hidden until JS sets body class */
.wd-guest-only,
.wd-member-only { display: none; }
.wd-logged-out .wd-guest-only { display: list-item; }
.wd-logged-in .wd-member-only  { display: list-item; }

/* Separator line before auth items */
.wd-logged-out .wd-auth-first.wd-guest-only,
.wd-logged-in .wd-auth-first.wd-member-only {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,.10);
}

/* Mobile only */
@media (min-width: 901px){
  .wdm-header--mobile{ display: none; }
}
