/* Modern layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Hiragino Kaku Gothic ProN', 'Noto Sans JP';
}

#map {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  background-color: #f8f8f8;
}

/* Title Bar (Mobile) */
#titleBar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 1001;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
}

#mobileTitle {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* モバイルタイトルコンテナ */
.mobileTitleContainer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

/* モバイル用ベータバッジ */

/* モバイル版最終更新日 */
.mobileLastUpdated {
  font-size: 0.65em;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Menu Toggle Button (Mobile) */
#menuToggleBtn {
  display: none;
  background: transparent;
  border: none;
  border-radius: 6px;
  width: 48px;
  height: 48px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#menuToggleBtn:active {
  transform: scale(0.95);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 4px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
  transition: all 0.3s ease;
}

#menuToggleBtn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#menuToggleBtn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menuToggleBtn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Controls Panel */
#controls {
  width: 340px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  z-index: 1000;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

#controlsHeader {
  padding: 20px 16px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

#controlsHeader h1 {
  margin: 0 0 8px 0;
  font-size: 1.4em;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  line-height: 1.3;
}

#controlsHeader h1 span {
  white-space: nowrap;
}

.headerDescription {
  margin: 0;
  font-size: 0.85em;
  color: #666;
  line-height: 1.4;
}

/* Control Sections */
.controlSection {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.controlSection:last-child {
  border-bottom: none;
}

.sectionLabel {
  display: block;
  margin: 0 0 10px 0;
  font-size: 0.9em;
  font-weight: 600;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Form Elements */
.selectControl {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1.05em;
  background-color: #ffffff;
  color: #1a1a1a;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.selectControl:hover {
  border-color: #999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.selectControl:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 住所検索コンテナ */
.addressSearchContainer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.addressInput {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95em;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.addressInput:hover {
  border-color: #999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.addressInput:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.addressSearchBtn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  background-color: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1.2em;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.addressSearchBtn:hover {
  background-color: #0052a3;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.addressSearchBtn:active {
  transform: translateY(1px);
}

.addressSearchBtn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* 検索結果リスト */
.addressSearchResults {
  margin-top: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  max-height: 150px;
  overflow-y: auto;
}

.addressResult {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9em;
  color: #333;
}

.addressResult:last-child {
  border-bottom: none;
}

.addressResult:hover {
  background-color: #f0f8ff;
  color: #0066cc;
}

.addressResultName {
  font-weight: 600;
  display: block;
}

.addressResultDetails {
  font-size: 0.85em;
  color: #999;
  margin-top: 2px;
}

/* Time Input Container */
.timeInputContainer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* デジタル表示 */
.timeDigitalDisplay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 12px;
  background: linear-gradient(135deg, #f8fbff, #f0f8ff);
  border: 2px solid #0066cc;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 102, 204, 0.08);
}

.timeDigitalValue {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 1.8em;
  font-weight: 700;
  color: #0066cc;
  letter-spacing: 1px;
  display: inline-block;
  min-width: 140px;
  text-align: center;
}

/* 時間調整ボタン */
.timeAdjustBtn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #0066cc, #0052a3);
  color: #ffffff;
  font-size: 1.4em;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.timeAdjustBtn:hover {
  background: linear-gradient(135deg, #0052a3, #003d7a);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
  transform: translateY(-2px);
}

.timeAdjustBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

.timeAdjustBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #ccc, #aaa);
  box-shadow: none;
}

/* スライダー */
.timeSliderWrapper {
  position: relative;
  padding: 8px 0;
}

.timeSlider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #e0e0e0, #d0d0d0);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.timeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066cc, #0052a3);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.4);
  transition: all 0.2s ease;
  border: none;
}

.timeSlider::-webkit-slider-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.5);
}

.timeSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066cc, #0052a3);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.4);
  transition: all 0.2s ease;
  border: none;
}

.timeSlider::-moz-range-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.5);
}

.timeSlider::-moz-range-track {
  background: transparent;
  border: none;
}

/* プリセットボタン */
.timePresetsContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.timePreset {
  padding: 10px 8px;
  background: #ffffff;
  border: 2px solid #0066cc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 600;
  color: #0066cc;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timePreset:hover {
  background: linear-gradient(135deg, #0066cc, #0052a3);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  transform: translateY(-2px);
}

.timePreset:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.2);
}

.timePreset.active {
  background: linear-gradient(135deg, #0066cc, #0052a3);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.timeSelectRow {
  display: none;
}

.timeSelectGroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.timeSelectLabel {
  font-size: 0.75em;
  font-weight: 600;
  color: #0066cc;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timeSelect {
  display: none;
}

.timeSeparator {
  display: none;
  line-height: 1;
}

.timeSlider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #0066cc, #0052a3);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.timeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0066cc;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.4);
  transition: all 0.2s;
  border: 2px solid white;
}

.timeSlider::-webkit-slider-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 3px 10px rgba(0, 102, 204, 0.6);
}

.timeSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0066cc;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.4);
  border: 2px solid white;
  transition: all 0.2s;
}

.timeSlider::-moz-range-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 3px 10px rgba(0, 102, 204, 0.6);
}

.timeSlider::-moz-range-track {
  background: transparent;
  border: none;
}

/* Buttons */
.buttonGroup {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

#controls button,
.primaryBtn,
.secondaryBtn,
.warningBtn {
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primaryBtn {
  background-color: #0066cc;
  color: #ffffff;
}

.primaryBtn:hover {
  background-color: #0052a3;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.primaryBtn:active {
  transform: translateY(1px);
}

.primaryBtn:disabled,
.primaryBtn.disabled {
  background-color: #cccccc;
  color: #999999;
  cursor: not-allowed;
  box-shadow: none;
}

.primaryBtn:disabled:hover,
.primaryBtn.disabled:hover {
  background-color: #cccccc;
  box-shadow: none;
}

.secondaryBtn {
  background-color: #e8e8e8;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
}

.secondaryBtn:hover {
  background-color: #d8d8d8;
  border-color: #999;
}

.warningBtn {
  background-color: #ff9900;
  color: #ffffff;
}

.warningBtn:hover {
  background-color: #e68a00;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.warningBtn:active {
  transform: translateY(1px);
}

/* Table */
.tableContainer {
  max-height: 300px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
}

.stationTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  white-space: nowrap;
}

.stationTable thead {
  position: sticky;
  top: 0;
  background: #f8f8f8;
  border-bottom: 2px solid #e0e0e0;
}

.tableHeader {
  border: 1px solid #e0e0e0;
  padding: 8px 6px;
  text-align: center;
  min-width: 70px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: #555;
  transition: background-color 0.2s;
}

.tableHeader:hover {
  background-color: #eeeeee;
}

.stationTable tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.stationTable tbody tr:hover {
  background-color: #f9f9f9;
}

.stationTable td {
  border: 1px solid #e0e0e0;
  padding: 8px 6px;
  text-align: center;
}

/* Legend */
.legendContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legendItem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  color: #555;
}

.legendColor {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 1.5px;
  flex-shrink: 0;
}

/* Status Section */
.statusSection {
  background-color: #f8f8f8;
  margin-top: auto;
  flex-shrink: 0;
}

.statusText {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 6px;
  min-height: 20px;
}

.zoomInfo {
  font-size: 0.8em;
  color: #999;
  font-weight: 500;
}

/* MaplibreGL popup styling */
.maplibregl-popup-content {
  padding: 0 !important;
  border-radius: 6px;
  background: transparent;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #ffffff;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: #ffffff;
}

/* Station Popup */
.stationPopupHeader {
  background: linear-gradient(135deg, #0066cc, #004d99);
  color: white;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 1em;
  text-align: center;
  letter-spacing: 0.3px;
}

.stationPopupLine {
  padding: 8px 14px;
  text-align: center;
  font-size: 0.8em;
  border-bottom: 1px solid #e8e8e8;
  color: #555;
  font-weight: 500;
}

.stationPopupCompany {
  padding: 6px 14px;
  text-align: center;
  font-size: 0.75em;
  color: #888;
}

/* Rail Popup */
.railPopup {
  background: #ffffff;
  color: #333;
  padding: 8px 12px;
  text-align: center;
  font-weight: 500;
  font-size: 0.8em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

/* Scrollbar styling */
#controls::-webkit-scrollbar {
  width: 6px;
}

#controls::-webkit-scrollbar-track {
  background: #f5f5f5;
}

#controls::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

#controls::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Responsive Design - Tablet and Mobile */
@media (max-width: 1024px) {
  /* Tablet: Slightly reduced control panel width */
  #controls {
    width: 300px;
  }
  
  .selectControl,
  #controls button,
  .primaryBtn,
  .secondaryBtn,
  .warningBtn {
    font-size: 0.9em;
    padding: 10px 12px;
  }

  .timeSelectRow {
    gap: 4px;
    padding: 12px 10px;
  }

  .timeSelect {
    min-width: 95px;
    font-size: 0.95em;
    padding: 7px 8px;
    padding-right: 28px;
  }

  .timeSeparator {
    font-size: 1.5em;
    margin-bottom: 6px;
  }
}

@media (max-width: 900px) {
  /* Large tablet / Small desktop: Switch to hamburger menu */
  #titleBar {
    display: flex;
  }
  
  #menuToggleBtn {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  body {
    flex-direction: column;
  }
  
  #controls {
    position: fixed;
    left: 0;
    top: 56px;
    width: 85vw;
    max-width: 340px;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    border-radius: 0;
  }
  
  #controls.open {
    transform: translateX(0);
  }
  
  #map {
    width: 100%;
    height: 100%;
    margin-top: 56px;
  }
  
  #controlsHeader {
    padding: 16px;
    padding-top: 20px;
  }
  
  #controlsHeader h1 {
    font-size: 1.2em;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
  }
  
  .headerDescription {
    font-size: 0.8em;
  }
  
  .controlSection {
    padding: 12px;
  }
  
  .sectionLabel {
    font-size: 0.85em;
    margin-bottom: 8px;
  }
  
  .selectControl {
    padding: 10px;
    font-size: 0.9em;
  }

  .timeSelectRow {
    gap: 3px;
    padding: 10px 8px;
  }

  .timeSelect {
    min-width: 85px;
    font-size: 0.9em;
    padding: 6px 6px;
    padding-right: 26px;
  }

  .timeSeparator {
    font-size: 1.4em;
    margin-bottom: 5px;
  }
  
  .tableContainer {
    max-height: 250px;
    font-size: 0.75em;
  }
  
  .stationTable {
    font-size: 0.75em;
  }
  
  .tableHeader {
    min-width: 60px;
    padding: 6px 4px;
    font-size: 0.75em;
  }
  
  .stationTable td {
    padding: 6px 4px;
    font-size: 0.75em;
  }
  
  #controls button,
  .primaryBtn,
  .secondaryBtn,
  .warningBtn {
    padding: 10px 12px;
    font-size: 0.85em;
  }
  
  .originText {
    font-size: 0.8em;
  }
  
  .originStation {
    font-size: 0.75em;
  }
  
  .legendItem {
    font-size: 0.8em;
  }
  
  .statusText {
    font-size: 0.8em;
  }
  
  .zoomInfo {
    font-size: 0.75em;
  }
}

@media (max-width: 768px) {
  /* Mobile: Fine-tune for smaller screens */
  #titleBar {
    height: 56px;
  }
  
  #controlsHeader {
    padding: 16px;
    padding-top: 20px;
  }
}

@media (max-width: 480px) {
  /* Very small mobile phones */
  #titleBar {
    height: 52px;
    padding: 0 8px;
  }
  
  #mobileTitle {
    font-size: 1em;
  }
  
  #controls {
    width: 90vw;
    top: 52px;
    height: calc(100vh - 52px);
  }
  
  #map {
    margin-top: 52px;
  }
  
  #controlsHeader h1 {
    font-size: 1.1em;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
  }
  
  .controlSection {
    padding: 10px;
  }

  .timeSelectRow {
    display: none;
  }

  .timeSelect {
    display: none;
  }

  .timeSelectLabel {
    display: none;
  }

  .timeSeparator {
    display: none;
  }

  .timeDigitalValue {
    font-size: 1.4em;
  }

  .timeAdjustBtn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    font-size: 1.1em;
  }

  .timePresetsContainer {
    grid-template-columns: repeat(2, 1fr);
  }

  .timePreset {
    font-size: 0.8em;
    padding: 8px 6px;
  }
  
  .tableContainer {
    max-height: 200px;
  }
  
  .stationTable {
    font-size: 0.7em;
  }
  
  .tableHeader {
    min-width: 50px;
    padding: 4px 2px;
  }
  
  .stationTable td {
    padding: 4px 2px;
  }
  
  #menuToggleBtn {
    width: 44px;
    height: 44px;
    padding: 6px;
  }
  
  .hamburger-line {
    width: 20px;
  }
}

/* Overlay for mobile menu */
body.menuOpen::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

/* Loading Overlay and Spinner */
.loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(1px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loadingOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loadingContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* Spinner Animation - Subtle and elegant */
.loadingSpinner {
  width: 48px;
  height: 48px;
  border: 3px solid #f0f0f0;
  border-top-color: #666;
  border-right-color: #888;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loadingText {
  font-size: 0.95em;
  font-weight: 400;
  color: #555;
  min-height: 24px;
  letter-spacing: 0.2px;
}

/* Progress Bar - Minimal and understated */
.loadingProgress {
  width: 180px;
  height: 3px;
  background: #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
}

.loadingProgressBar {
  height: 100%;
  background: #999;
  border-radius: 2px;
  width: 0%;
  transition: width 0.25s ease;
}

/* Prevent interaction during loading */
.loadingOverlay:not(.hidden) {
  pointer-events: auto;
  user-select: none;
}

body.loading #controls,
body.loading #map,
body.loading #titleBar {
  pointer-events: none;
  opacity: 0.8;
}

/* 最終更新日 */
.lastUpdated {
  font-size: 0.75em;
  color: #888;
  margin: 6px 0 0 0;
  font-style: italic;
}

/* ビーコン点滅アニメーション */
@keyframes beaconFlash {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.3;
    filter: brightness(0.4);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

/* Info Icon スタイル */
.infoIcon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e8f1f8;
  color: #0066cc;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: none;
}

/* 検索ボックス - ツールチップ付き */
.addressSearchWithTooltip {
  position: relative;
}

.addressInput {
  flex: 1;
}

.searchTooltip {
  position: absolute;
  bottom: 105%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  margin-bottom: 8px;
  max-width: 100%;
}

.tooltipContent {
  background: #1a1a1a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  width: auto;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltipContent a {
  color: #66d9ff;
  text-decoration: none;
  border-bottom: 1px solid #66d9ff;
}

.tooltipContent a:hover {
  color: #fff;
}

/* 入力フィールドがフォーカスされたときに表示 */
.addressInput:focus ~ .searchTooltip,
.searchTooltip:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .tooltipContent {
    width: auto;
    height: auto;
  }
}

/* お知らせ情報セクション */
#notificationArea {
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  max-height: 200px;
  overflow-y: auto;
}

#notificationArea p {
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

#notificationArea a {
  color: #4CAF50;
  text-decoration: none;
  transition: color 0.2s ease;
}

#notificationArea a:hover {
  text-decoration: underline;
  color: #45a049;
}

.notificationItem {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
}

.notificationItem:last-child {
  border-bottom: none;
}

.notificationDate {
  font-size: 12px;
  color: #999;
  font-weight: 600;
}

.notificationContent {
  margin: 0;
  color: #333;
}

.notificationEmpty {
  color: #999;
  font-style: italic;
}
