@charset "UTF-8";

/* ==========================================
   Base Settings & Layout
=========================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #334155;
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* ==========================================
   Header Style
=========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0f172a;
  font-weight: bold;
  font-size: 18px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #e11d48;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav {
  display: flex;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #e11d48;
}

.menu-container {
  position: relative;
}

.menu-button {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: background 0.2s;
}

.menu-button:hover {
  background: #f1f5f9;
}

.menu-button svg {
  width: 24px;
  height: 24px;
}

.dropdown-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: 200px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  display: none;
  flex-direction: column;
}

.dropdown-menu.is-active {
  display: flex;
}

.dropdown-item {
  padding: 10px 16px;
  text-decoration: none;
  color: #334155;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #e11d48;
}

.dropdown-item-action {
  font-weight: bold;
  color: #e11d48;
}

/* ==========================================
   3D Map Section
=========================================== */
.map-section {
  position: relative;
  width: 100%;
  /* 画面全体の70%の高さに設定（下の寄付ボタンも画面内に入りやすくなります） */
  height: 70vh; 
  min-height: 480px;
  max-height: 720px; /* 大画面でも間延びしないよう最大高さを制限 */
  margin-top: 64px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  overflow: hidden;
}

.region-select-wrapper {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 10;
}

.region-select {
  appearance: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  padding: 10px 36px 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2064748b'%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");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

#map-canvas-container {
  width: 100%;
  height: 100%;
}

/* ------------------------------------------
   メッセージカード
------------------------------------------- */
.message-card-overlay {
  position: absolute;
  bottom: 24px;
  right: 24px;
  left: auto;
  transform: none;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.message-card-overlay.is-fading {
  opacity: 0;
  transform: translateY(10px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid #cbd5e1;
}

.card-location {
  font-size: 12px;
  font-weight: bold;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.card-user-id {
  font-size: 11px;
  font-weight: normal;
  color: #64748b;
  text-align: left;
}

.card-text {
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
  font-weight: 500;
  margin: 0;
}

/* ==========================================
   Donate Banner Section
=========================================== */
.donate-banner-section {
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  background: #ffffff;
}

.btn-donate-large {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  border-radius: 32px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(225, 29, 72, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-donate-large:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(225, 29, 72, 0.4);
}

.btn-donate-large:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ==========================================
   Modal Style
=========================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  width: calc(100% - 32px);
  max-width: 480px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.is-open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
}

.donate-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donate-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.donate-option-card:hover:not(.is-disabled) {
  border-color: #f43f5e;
  background-color: #fff1f2;
}

.option-icon {
  font-size: 24px;
  line-height: 1;
}

.option-info {
  flex: 1;
}

.option-title {
  font-weight: bold;
  font-size: 15px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.option-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.tag-free {
  background: #dcfce7;
  color: #15803d;
}

.tag-direct {
  background: #ffe4e6;
  color: #be123c;
}

.tag-preparing {
  background: #94a3b8;
  color: #ffffff;
}

.option-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 4px;
}

/* 非アクティブ（グレーアウト・選択不可）専用スタイル */
.donate-option-card.is-disabled {
  opacity: 0.55;
  filter: grayscale(80%);
  cursor: not-allowed !important;
  pointer-events: none;
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

/* ==========================================
   Notice / Result Message Modal
=========================================== */
.result-modal-content {
  text-align: center;
  padding: 32px 24px;
  max-width: 400px;
}

.result-modal-text {
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 24px;
  white-space: pre-wrap;
}

.btn-secondary {
  background-color: #64748b;
  color: #ffffff;
  border: none;
  padding: 10px 28px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #475569;
}

/* ==========================================
   Responsive (スマホ表示時)
=========================================== */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .map-section {
    height: 75vh;
  }

  .message-card-overlay {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    border-radius: 12px;
    padding: 12px 16px;
  }
}