/* WordPress Plugin CSS - Pixel-perfect match to Next.js preview */

/* ===== CSS Variables matching Next.js globals.css ===== */
:root {
  --bnu-background: #fafafa;
  --bnu-foreground: #1d1d1f;
  --bnu-card: #ffffff;
  --bnu-card-foreground: #1d1d1f;
  --bnu-border: #d2d2d7;
  --bnu-border-50: rgba(210, 210, 215, 0.5);
  --bnu-border-30: rgba(210, 210, 215, 0.3);
  --bnu-muted: #f5f5f7;
  --bnu-muted-40: rgba(245, 245, 247, 0.4);
  --bnu-muted-50: rgba(245, 245, 247, 0.5);
  --bnu-muted-30: rgba(245, 245, 247, 0.3);
  --bnu-muted-foreground: #86868b;
  --bnu-primary: #0071e3;
  --bnu-emerald-600: #059669;
  --bnu-amber-600: #d97706;
  --bnu-radius: 12px;
}

* {
  box-sizing: border-box;
}

/* ===== Root Container ===== */
#bike-network-updates-root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  color: var(--bnu-foreground);
  max-width: 80rem; /* max-w-7xl = 1280px */
  margin: 0 auto;
  padding: 48px 24px; /* py-12 px-6 */
}

/* ===== Page Header - matches network-updates.tsx mb-14 div ===== */
.bnu-page-header {
  margin-bottom: 56px; /* mb-14 = 3.5rem = 56px */
}

.bnu-page-header h1 {
  font-size: 48px; /* text-5xl */
  font-weight: 600; /* font-semibold */
  letter-spacing: -0.025em; /* tracking-tight */
  margin: 0 0 16px 0; /* mb-4 */
  line-height: 1.1; /* leading-tight */
  color: var(--bnu-foreground);
  text-wrap: balance;
}

@media (min-width: 768px) {
  .bnu-page-header h1 {
    font-size: 60px; /* md:text-6xl */
  }
}

.bnu-page-header p {
  font-size: 20px; /* text-xl */
  color: var(--bnu-muted-foreground);
  max-width: none; /* full width */
  margin: 0;
  text-wrap: pretty;
}

/* ===== Reset button styles inside our root to prevent WP theme overrides ===== */
/* Targets only generic buttons, NOT our specifically styled ones */
#bike-network-updates-root button:not(.bnu-alert-banner):not(.bnu-month-header):not(.bnu-alert-modal-close):not(.bnu-map-detail-close):not(.bnu-clear-filters):not(.bnu-archive-year-header),
#bike-network-updates-root button:not(.bnu-alert-banner):not(.bnu-month-header):not(.bnu-alert-modal-close):not(.bnu-map-detail-close):not(.bnu-clear-filters):not(.bnu-archive-year-header):hover,
#bike-network-updates-root button:not(.bnu-alert-banner):not(.bnu-month-header):not(.bnu-alert-modal-close):not(.bnu-map-detail-close):not(.bnu-clear-filters):not(.bnu-archive-year-header):focus,
#bike-network-updates-root button:not(.bnu-alert-banner):not(.bnu-month-header):not(.bnu-alert-modal-close):not(.bnu-map-detail-close):not(.bnu-clear-filters):not(.bnu-archive-year-header):active {
  background-color: transparent !important;
  background-image: none !important;
  color: inherit !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: inherit !important;
}

/* ===== Service Alert Banner - matches service-alert-banner.tsx ===== */
.bnu-alert-banner {
  width: 100% !important;
  margin-bottom: 32px !important; /* mb-8 */
  border-radius: 16px !important; /* rounded-2xl */
  background-color: #fefce8 !important; /* bg-amber-50 (tailwind amber-50) */
  border: 1px solid #fde68a !important; /* border-amber-200 */
  padding: 20px !important; /* p-5 */
  display: flex !important;
  align-items: center !important;
  gap: 16px !important; /* gap-4 */
  cursor: pointer !important;
  transition: background-color 0.2s !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; /* shadow-sm */
  text-align: left !important;
  background-image: none !important;
}

.bnu-alert-banner:hover {
  background-color: rgba(254, 243, 199, 0.8) !important; /* hover:bg-amber-100/80 */
}

.bnu-alert-banner .bnu-alert-icon {
  flex-shrink: 0;
  width: 24px; /* h-6 w-6 */
  height: 24px;
  color: #d97706; /* text-amber-600 */
}

.bnu-alert-banner .bnu-alert-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-alert-banner .bnu-alert-content {
  flex: 1;
  min-width: 0;
}

.bnu-alert-banner .bnu-alert-title {
  font-weight: 600; /* font-semibold */
  color: #78350f; /* text-amber-900 */
  margin: 0 0 4px 0; /* mb-1 */
  font-size: 16px;
  line-height: 1.5;
}

.bnu-alert-banner .bnu-alert-summary {
  font-size: 14px; /* text-sm */
  color: #92400e; /* text-amber-800 */
  margin: 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* ===== Search Container - matches search-filters.tsx ===== */
.bnu-search-container {
  margin-bottom: 40px; /* mb-10 */
}

.bnu-search-fields {
  display: flex;
  flex-direction: column;
  gap: 20px; /* space-y-5 */
}

.bnu-search-wrapper {
  position: relative;
}

.bnu-search-icon {
  position: absolute;
  left: 16px; /* left-4 */
  top: 50%;
  transform: translateY(-50%);
  width: 20px; /* h-5 w-5 */
  height: 20px;
  color: var(--bnu-muted-foreground);
  pointer-events: none;
  z-index: 1;
}

.bnu-search-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-search-input {
  width: 100% !important;
  height: 56px !important; /* h-14 */
  padding: 0 16px 0 48px !important; /* pl-12 */
  font-size: 16px !important; /* text-base */
  font-family: inherit !important;
  border: 1px solid var(--bnu-border-50) !important;
  border-radius: 16px !important; /* rounded-2xl */
  background: var(--bnu-card) !important;
  color: var(--bnu-foreground) !important;
  transition: all 0.2s !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
  line-height: 1.5 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.bnu-search-input::placeholder {
  color: var(--bnu-muted-foreground) !important;
}

.bnu-search-input:focus {
  border-color: var(--bnu-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1) !important;
  outline: none !important;
}

/* ===== Filter Dropdowns - matches search-filters.tsx select triggers ===== */
.bnu-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* gap-3 */
  align-items: center;
}

.bnu-filter-select {
  height: 44px !important; /* h-11 */
  padding: 0 36px 0 12px !important;
  font-size: 14px !important; /* text-sm */
  font-family: inherit !important;
  font-weight: 500 !important;
  border: 1px solid var(--bnu-border-50) !important;
  border-radius: 12px !important; /* rounded-xl */
  background-color: var(--bnu-card) !important;
  color: var(--bnu-foreground) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2386868b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 20px !important;
}

.bnu-filter-select:hover {
  border-color: var(--bnu-border) !important;
}

.bnu-filter-select:focus {
  border-color: var(--bnu-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1) !important;
}

#bnu-year-select {
  width: 140px; /* w-[140px] */
}

#bnu-type-select {
  width: 160px; /* w-[160px] */
}

#bnu-ward-select {
  width: 140px; /* w-[140px] */
}

.bnu-clear-filters {
  height: 44px !important; /* h-11 */
  padding: 0 16px !important; /* px-4 */
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  color: var(--bnu-muted-foreground) !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 12px !important; /* rounded-xl */
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
}

.bnu-clear-filters:hover {
  color: var(--bnu-foreground) !important;
  background-color: var(--bnu-muted-50) !important;
}

.bnu-clear-filters svg {
  width: 16px; /* h-4 w-4 */
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  #bnu-year-select,
  #bnu-type-select,
  #bnu-ward-select {
    flex: 1;
    min-width: 120px;
    width: auto !important;
  }
}

/* ===== Empty State - matches network-updates.tsx empty div ===== */
.bnu-empty-state {
  border-radius: 24px; /* rounded-3xl */
  background: var(--bnu-card);
  border: 1px solid var(--bnu-border-50);
  padding: 64px 20px; /* p-16 */
  text-align: center;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.bnu-empty-state .bnu-empty-title {
  font-size: 20px; /* text-xl */
  color: var(--bnu-muted-foreground);
  margin: 0 0 8px 0; /* mb-2 */
  font-weight: 400;
}

.bnu-empty-state .bnu-empty-subtitle {
  font-size: 16px; /* text-base */
  color: rgba(134, 134, 139, 0.7); /* text-muted-foreground/70 */
  margin: 0;
}

/* ===== Search Results Card - matches network-updates.tsx search results view ===== */
.bnu-search-results {
  border-radius: 24px; /* rounded-3xl */
  background: var(--bnu-card);
  border: 1px solid var(--bnu-border-50);
  padding: 32px; /* p-8 */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.bnu-search-results-header {
  margin-bottom: 24px; /* mb-6 */
}

.bnu-search-results-title {
  font-size: 24px; /* text-2xl */
  font-weight: 600;
  margin: 0 0 4px 0; /* mb-1 */
  color: var(--bnu-foreground);
}

.bnu-search-results-count {
  font-size: 14px; /* text-sm */
  color: var(--bnu-muted-foreground);
  font-weight: 400;
  margin: 0;
}

.bnu-search-results .bnu-changes-list {
  margin-top: 0;
}

.bnu-search-results .bnu-changes-list .bnu-change-row {
  border-top: 1px solid var(--bnu-border-30);
}

.bnu-search-results .bnu-changes-list .bnu-change-row:first-child {
  border-top: none;
}

/* ===== Current Month Card - matches current-month-card.tsx ===== */
.bnu-current-month-card {
  border-radius: 24px; /* rounded-3xl */
  border: 1px solid var(--bnu-border-50);
  background: var(--bnu-card);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 32px; /* p-8 */
  margin-bottom: 32px; /* mb-8 */
}

@media (min-width: 768px) {
  .bnu-current-month-card {
    padding: 40px; /* md:p-10 */
  }
}

.bnu-current-month-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px; /* gap-4 */
  margin-bottom: 32px; /* mb-8 */
}

.bnu-current-month-header h2 {
  font-size: 30px; /* text-3xl */
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--bnu-foreground);
}

/* ===== Previous Months Section - matches year-cards.tsx ===== */
.bnu-previous-months-title {
  font-size: 30px; /* text-3xl */
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 24px 0; /* mb-6 */
  color: var(--bnu-foreground);
}

.bnu-previous-months-list {
  display: flex;
  flex-direction: column;
  gap: 16px; /* space-y-4 */
}

/* ===== Archive Year Section ===== */
.bnu-archive-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--bnu-border-50);
}

.bnu-archive-year {
  background: var(--bnu-card);
  border-radius: 24px;
  border: 1px solid var(--bnu-border-50);
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}

.bnu-archive-year-header {
  width: 100% !important;
  padding: 20px 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  text-align: left !important;
  color: inherit !important;
  font: inherit !important;
  outline: none !important;
  transition: background-color 0.2s !important;
}

.bnu-archive-year-header:hover {
  background-color: var(--bnu-muted) !important;
}

.bnu-archive-year-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bnu-archive-year-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--bnu-foreground);
  margin: 0;
}

.bnu-archive-year-count {
  font-size: 14px;
  color: var(--bnu-muted-foreground);
}

.bnu-archive-year-content {
  padding: 0 24px 24px;
}

.bnu-archive-year-content .bnu-previous-months-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .bnu-archive-year-header {
    padding: 16px 20px !important;
  }
  
  .bnu-archive-year-title {
    font-size: 18px;
  }
  
  .bnu-archive-year-content {
    padding: 0 12px 16px;
  }

  .bnu-archive-year-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.bnu-archive-month-count {
  font-size: 13px;
  color: var(--bnu-muted-foreground);
  margin-left: 8px;
}

.bnu-archive-year-map {
  margin-bottom: 20px;
}

/* ===== Month Accordion Card - matches year-cards.tsx month cards ===== */
.bnu-month-card {
  background: var(--bnu-card);
  border-radius: 24px; /* rounded-3xl */
  border: 1px solid var(--bnu-border-50);
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.bnu-month-header {
  width: 100% !important;
  padding: 24px 32px !important; /* p-6 md:p-8 */
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  user-select: none !important;
  text-align: left !important;
  background-color: var(--bnu-card) !important;
  border: none !important;
  font-family: inherit !important;
  color: var(--bnu-foreground) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 768px) {
  .bnu-month-header {
    padding: 32px; /* md:p-8 */
  }
}

.bnu-month-header:hover {
  background-color: var(--bnu-muted-30) !important; /* hover:bg-muted/30 */
}

.bnu-month-header-content {
  display: flex;
  align-items: center;
  gap: 16px; /* gap-4 */
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.bnu-month-title {
  font-size: 24px; /* text-2xl */
  font-weight: 600;
  color: var(--bnu-foreground);
  margin: 0;
  letter-spacing: -0.025em;
}

.bnu-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* gap-2 */
}

/* ===== Chevron Icon - matches ChevronDown from lucide ===== */
.bnu-chevron-icon {
  margin-left: 16px; /* ml-4 */
  width: 20px; /* h-5 w-5 */
  height: 20px;
  color: var(--bnu-muted-foreground);
  transition: transform 0.3s;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-chevron-icon.open {
  transform: rotate(180deg);
}

/* ===== Type Badges - matches type-badge.tsx exactly ===== */

/* md size (default) - px-2.5 py-1 text-sm */
.bnu-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px; /* px-2.5 py-1 */
  border-radius: 9999px; /* rounded-full */
  font-size: 14px; /* text-sm */
  font-weight: 500; /* font-medium */
  white-space: nowrap;
  transition: colors 0.2s;
  border-width: 1px;
  border-style: solid;
}

/* sm size - px-2 py-0.5 text-xs */
.bnu-badge.bnu-badge-sm {
  padding: 2px 8px; /* px-2 py-0.5 */
  font-size: 12px; /* text-xs */
}

/* Type colors matching type-badge.tsx typeColors */
.bnu-badge.new_station,
.bnu-badge.new {
  background-color: #ecfdf5; /* bg-emerald-50 */
  color: #047857; /* text-emerald-700 */
  border-color: #a7f3d0; /* border-emerald-200 */
}

.bnu-badge.reinstall {
  background-color: #eff6ff; /* bg-blue-50 */
  color: #1d4ed8; /* text-blue-700 */
  border-color: #bfdbfe; /* border-blue-200 */
}

.bnu-badge.capacity_increase {
  background-color: #f0fdfa; /* bg-teal-50 */
  color: #0f766e; /* text-teal-700 */
  border-color: #99f6e4; /* border-teal-200 */
}

.bnu-badge.capacity_change {
  background-color: #f0fdfa; /* bg-teal-50 */
  color: #0f766e; /* text-teal-700 */
  border-color: #99f6e4; /* border-teal-200 */
}

.bnu-badge.capacity_decrease {
  background-color: #fffbeb; /* bg-amber-50 */
  color: #b45309; /* text-amber-700 */
  border-color: #fde68a; /* border-amber-200 */
}

.bnu-badge.temporary_closure {
  background-color: #fff7ed; /* bg-orange-50 */
  color: #c2410c; /* text-orange-700 */
  border-color: #fed7aa; /* border-orange-200 */
}

.bnu-badge.removal {
  background-color: #fef2f2; /* bg-red-50 */
  color: #b91c1c; /* text-red-700 */
  border-color: #fecaca; /* border-red-200 */
}

.bnu-badge.relocation {
  background-color: #faf5ff; /* bg-purple-50 */
  color: #7e22ce; /* text-purple-700 */
  border-color: #e9d5ff; /* border-purple-200 */
}

/* ===== Month Content (expanded) - matches year-cards.tsx expanded content ===== */
.bnu-month-content {
  border-top: 1px solid var(--bnu-border-30); /* border-border/30 */
}

.bnu-month-content-map {
  padding: 24px 24px 0 24px; /* px-6 md:px-8 pt-6 */
}

@media (min-width: 768px) {
  .bnu-month-content-map {
    padding: 24px 32px 0 32px;
  }
}

.bnu-month-content-changes {
  padding: 0 24px 24px 24px; /* px-6 md:px-8 pb-6 */
}

@media (min-width: 768px) {
  .bnu-month-content-changes {
    padding: 0 32px 24px 32px;
  }
}

/* ===== Map Container ===== */
.bnu-map-container {
  width: 100%;
  aspect-ratio: 1 / 1; /* aspect-square on mobile */
  border-radius: 16px; /* rounded-2xl */
  overflow: hidden;
  border: 1px solid #e5e5e5; /* border-neutral-200 */
  position: relative;
}

@media (min-width: 768px) {
  .bnu-map-container {
    height: 500px; /* md:h-[500px] */
    aspect-ratio: auto;
  }
}

.bnu-map-wrapper {
  position: relative;
  margin-bottom: 24px; /* mb-8 in current month */
}

/* ===== Change Rows - matches change-row.tsx ===== */
.bnu-changes-list {
  margin-top: 24px; /* pt-6 */
  display: flex;
  flex-direction: column;
  gap: 4px; /* space-y-1 */
}

/* In current month card there is no margin-top needed since the list starts right away */
.bnu-current-month-card .bnu-changes-list {
  margin-top: 0;
}

.bnu-change-row {
  display: flex;
  align-items: center;
  gap: 16px; /* gap-4 */
  padding: 16px; /* py-4 px-4 */
  margin: 0 -16px; /* -mx-4 */
  border-radius: 16px; /* rounded-2xl */
  transition: all 0.2s;
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.bnu-change-row.clickable {
  cursor: pointer;
}

.bnu-change-row:hover {
  background: var(--bnu-muted-40); /* hover:bg-muted/40 */
}

.bnu-change-row.clickable:hover {
  background: var(--bnu-muted-50); /* hover:bg-muted/50 */
}

.bnu-change-row.clickable:active {
  background: rgba(245, 245, 247, 0.6); /* active:bg-muted/60 */
}

.bnu-change-row .bnu-change-badge {
  flex-shrink: 0;
}

.bnu-change-row .bnu-change-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px; /* gap-x-3 gap-y-1 */
}

.bnu-change-row .bnu-location {
  font-weight: 500; /* font-medium */
  font-size: 16px; /* text-base */
  color: var(--bnu-foreground);
}

.bnu-change-row .bnu-ward {
  font-size: 14px; /* text-sm */
  color: var(--bnu-muted-foreground);
}

.bnu-change-row .bnu-capacity {
  font-size: 14px; /* text-sm */
  color: var(--bnu-muted-foreground);
  font-weight: 500; /* font-medium */
}

.bnu-change-row .bnu-delta {
  font-size: 14px; /* text-sm */
  font-weight: 500; /* font-medium */
}

.bnu-change-row .bnu-delta.positive {
  color: #059669; /* text-emerald-600 */
}

.bnu-change-row .bnu-delta.negative {
  color: #d97706; /* text-amber-600 */
}

.bnu-change-row .bnu-reason {
  font-size: 14px; /* text-sm */
  color: var(--bnu-muted-foreground);
  font-style: italic; /* italic */
  }
  
.bnu-change-row .bnu-search-date {
  font-size: 13px;
  color: var(--bnu-primary);
  font-weight: 500;
  background: rgba(0, 102, 68, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  }

.bnu-change-row .bnu-map-icon {
  flex-shrink: 0;
  width: 16px; /* h-4 w-4 */
  height: 16px;
  color: var(--bnu-muted-foreground);
  transition: color 0.2s;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-change-row.clickable:hover .bnu-map-icon {
  color: var(--bnu-primary); /* group-hover:text-primary */
}

/* ===== Alert Modal Overlay - matches service-alert-banner.tsx modal ===== */
.bnu-alert-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* bg-black/40 */
  backdrop-filter: blur(4px); /* backdrop-blur-sm */
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px; /* p-4 */
  animation: bnuFadeIn 0.2s ease-out;
}

@keyframes bnuFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bnu-alert-modal {
  background: var(--bnu-card);
  border-radius: 24px; /* rounded-3xl */
  max-width: 672px; /* max-w-2xl */
  width: 100%;
  max-height: 85vh; /* max-h-[85vh] */
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--bnu-border-50);
  animation: bnuSlideIn 0.3s ease-out;
}

@keyframes bnuSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal sticky header - matches service-alert-banner.tsx sticky header */
.bnu-alert-modal-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95); /* bg-card/95 */
  backdrop-filter: blur(12px); /* backdrop-blur-lg */
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bnu-border-50);
  padding: 24px 32px; /* px-8 py-6 */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.bnu-alert-modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 16px; /* gap-4 */
  flex: 1;
}

.bnu-alert-modal-header .bnu-alert-icon {
  width: 28px; /* h-7 w-7 */
  height: 28px;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 2px; /* mt-0.5 */
}

.bnu-alert-modal-header .bnu-alert-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-alert-modal-title {
  font-size: 24px; /* text-2xl */
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--bnu-foreground);
  margin: 0;
  padding-right: 32px; /* pr-8 */
  line-height: 1.3;
}

.bnu-alert-modal-close {
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important; /* rounded-full */
  background-color: transparent !important;
  border: none !important;
  padding: 8px !important; /* p-2 */
  cursor: pointer !important;
  transition: background 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--bnu-foreground) !important;
}

.bnu-alert-modal-close:hover {
  background-color: rgba(245, 245, 247, 0.6) !important; /* hover:bg-muted/60 */
}

.bnu-alert-modal-close svg {
  width: 20px; /* h-5 w-5 */
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Modal body - matches service-alert-banner.tsx content section */
.bnu-alert-modal-body {
  padding: 24px 32px; /* px-8 py-6 */
  display: flex;
  flex-direction: column;
  gap: 24px; /* space-y-6 */
}

.bnu-alert-section-label {
  font-size: 12px; /* text-sm */
  font-weight: 600;
  color: var(--bnu-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em; /* tracking-wide */
  margin: 0 0 8px 0; /* mb-2 */
}

.bnu-alert-section-label.mb-3 {
  margin-bottom: 12px; /* mb-3 */
}

.bnu-alert-summary-text {
  font-size: 16px; /* text-base */
  line-height: 1.6; /* leading-relaxed */
  color: var(--bnu-foreground);
  margin: 0;
}

.bnu-alert-summary-text p {
  margin: 0 0 8px 0;
}

.bnu-alert-summary-text p:last-child {
  margin-bottom: 0;
}

/* Station lists in modal */
.bnu-alert-station-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px; /* space-y-2 */
}

.bnu-alert-station-item {
  display: flex;
  align-items: center;
  gap: 12px; /* gap-3 */
  font-size: 16px; /* text-base */
  padding: 12px 16px; /* px-4 py-3 */
  background: var(--bnu-muted-40); /* bg-muted/40 */
  border-radius: 12px; /* rounded-xl */
  color: var(--bnu-foreground);
}

.bnu-alert-station-dot {
  width: 6px; /* w-1.5 h-1.5 */
  height: 6px;
  border-radius: 50%; /* rounded-full */
  flex-shrink: 0;
}

.bnu-alert-station-dot.amber {
  background: #d97706; /* bg-amber-600 */
}

.bnu-alert-station-dot.emerald {
  background: #059669; /* bg-emerald-600 */
}

/* Dates grid in modal */
.bnu-alert-dates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px; /* gap-4 */
  padding-top: 16px; /* pt-4 */
  border-top: 1px solid var(--bnu-border-50);
}

.bnu-alert-date-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bnu-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px 0; /* mb-1 */
}

.bnu-alert-date-value {
  font-size: 14px; /* text-sm */
  color: var(--bnu-foreground);
  margin: 0;
}

/* ===== Map Detail Popup - matches network-map.tsx selectedChange overlay ===== */
.bnu-map-detail-modal {
  position: absolute;
  bottom: 16px; /* bottom-4 */
  left: 24px; /* left-6 */
  right: 24px;
  max-width: 384px; /* md:max-w-sm */
  background: rgba(255, 255, 255, 0.95); /* bg-white/95 */
  backdrop-filter: blur(8px); /* backdrop-blur-sm */
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e5e5e5; /* border-neutral-200 */
  border-radius: 16px; /* rounded-2xl */
  padding: 16px; /* p-4 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
  z-index: 1000;
  animation: bnuSlideUp 0.3s ease-out;
}

@media (min-width: 768px) {
  .bnu-map-detail-modal {
    bottom: 24px; /* md:bottom-6 */
    left: 24px; /* md:left-6 */
    right: auto; /* md:right-auto */
  }
}

@media (max-width: 767px) {
  .bnu-map-detail-modal {
    max-width: none;
  }
}

@keyframes bnuSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bnu-map-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px; /* mb-3 */
  gap: 8px;
}

.bnu-map-detail-header-left {
  min-width: 0;
}

.bnu-map-detail-title {
  font-size: 16px; /* text-base */
  font-weight: 600;
  color: #171717; /* text-neutral-900 */
  margin: 0 0 4px 0; /* mb-1 */
  line-height: 1.4;
}

.bnu-map-detail-close {
  flex-shrink: 0 !important;
  width: 20px !important;
  height: 20px !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  color: #a3a3a3 !important; /* text-neutral-400 */
  transition: color 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 8px !important; /* ml-2 */
}

.bnu-map-detail-close:hover {
  color: #525252 !important; /* hover:text-neutral-600 */
  background-color: transparent !important;
}

.bnu-map-detail-close svg {
  width: 20px; /* w-5 h-5 */
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnu-map-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px; /* space-y-2 */
  font-size: 14px; /* text-sm */
  color: #525252; /* text-neutral-600 */
}

.bnu-map-detail-info p {
  margin: 0;
  line-height: 1.6;
}

.bnu-map-detail-info strong {
  font-weight: 500;
  color: #171717; /* text-neutral-900 */
}

.bnu-map-detail-date {
  font-size: 12px; /* text-xs */
  color: #737373; /* text-neutral-500 */
  margin: 0;
}

/* ===== Leaflet Overrides ===== */
.leaflet-container {
  font-family: inherit;
  z-index: 0;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.leaflet-tooltip {
  font-family: inherit;
}
