/* ================================================================
   Clock Board 防災情報システム — UI Styles
================================================================ */

.emergency-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000; /* エントリーカード(11000)より手前 */
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(8px);
}

.emergency-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

body.has-emergency-overlay {
  overflow: hidden;
}

/* Priority Backgrounds */
.emergency-overlay.priority-eew { background: rgba(220, 38, 38, 0.95); } /* Red */
.emergency-overlay.priority-jalert { background: rgba(0, 0, 0, 0.95); } /* Black */
.emergency-overlay.priority-weather { background: rgba(180, 83, 9, 0.9); } /* Dark Orange */
.emergency-overlay.priority-notice { background: rgba(30, 64, 175, 0.9); } /* Blue */

/* Common Card */
.emergency-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #111;
}

.emergency-title {
  font-size: 3rem;
  margin: 0 0 20px 0;
  font-weight: 900;
  color: #111;
}

.emergency-notice {
  font-size: 1.2rem;
  color: #666;
  margin-top: 30px;
  font-weight: bold;
}

/* Test Banners */
.emergency-test-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  text-align: center;
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: 5px;
  z-index: 20001;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.emergency-test-red { background: #ef4444; color: white; }
.emergency-test-blue { background: #3b82f6; color: white; }
.emergency-test-orange { background: #f59e0b; color: black; }

/* EEW Specific */
.eew-card .emergency-title { color: #dc2626; }
.eew-hypocenter { font-size: 2rem; margin: 10px 0; font-weight: bold; }
.eew-region { font-size: 2.5rem; margin: 10px 0; font-weight: 900; color: #dc2626; }
.eew-intensity-box {
  background: #fee2e2;
  border: 4px solid #dc2626;
  border-radius: 12px;
  display: inline-block;
  padding: 15px 40px;
  margin: 20px 0;
}
.eew-intensity-label { display: block; font-size: 1.5rem; font-weight: bold; color: #dc2626; }
.eew-intensity-value { display: block; font-size: 5rem; font-weight: 900; color: #dc2626; line-height: 1; }
.eew-countdown-container { margin-top: 20px; }
.eew-countdown-label { font-size: 1.8rem; font-weight: bold; margin: 0; }
.eew-countdown-time { font-size: 6rem; font-weight: 900; color: #dc2626; line-height: 1; }

/* Weather Specific */
.weather-list { display: flex; flex-direction: column; gap: 15px; text-align: left; background: #fffbeb; padding: 20px; border-radius: 12px; }
.weather-item { display: flex; align-items: center; gap: 20px; border-bottom: 2px dashed #fcd34d; padding-bottom: 15px; }
.weather-item:last-child { border-bottom: none; padding-bottom: 0; }
.weather-icon { font-size: 3rem; }
.weather-name { font-size: 2.2rem; font-weight: bold; margin: 0; color: #b45309; }
.weather-area { font-size: 1.5rem; margin: 5px 0 0 0; color: #444; }

/* Notice Specific */
.notice-message { font-size: 2rem; font-weight: bold; line-height: 1.5; text-align: left; white-space: pre-wrap; margin: 20px 0; }
.notice-progress-bar { height: 8px; background: #3b82f6; width: 100%; position: absolute; bottom: 0; left: 0; }

/* JAlert Specific */
.jalert-card .emergency-title { color: #000; }
.jalert-content { background: #ffe4e6; border: 4px solid #e11d48; padding: 30px; border-radius: 12px; text-align: left; }
.jalert-message { font-size: 2.2rem; font-weight: 900; line-height: 1.4; margin: 0 0 20px 0; color: #e11d48; white-space: pre-wrap; }
.jalert-regions { font-size: 1.6rem; font-weight: bold; margin: 0; color: #111; }
