/* ======================================================
   CORE LAYOUT & COMPONENT STYLES
   Weather Dashboard
====================================================== */

/* =====================
   GLOBAL
===================== */
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

/* =====================
   NAVBAR
===================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: 14px;
  margin: 1rem;
}

.logo-img {
  width: 45px;
  height: 45px;
}

.logo-title {
  font-weight: 600;
  font-size: 1rem;
}

/* =====================
   HEADER (DATE / TIME)
===================== */
.header-component {
  margin: 1rem auto;
  padding: 0.5rem 1.2rem;
  border-radius: 14px;
  text-align: center;
  background: var(--card-bg);
  color: var(--text-color);
  width: fit-content;
}

/* =====================
   WEATHER CARD
===================== */
.weather-component__card {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.weather-component__card:hover {
  transform: translateY(-4px);
}

/* =====================
   SEARCH
===================== */
.weather-component__search {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.weather-component__search-bar {
  width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 30px 0 0 30px;
  border: 1px solid var(--glass-border);
  outline: none;
}

.button_container {
  display: flex;
  align-items: center;
}

.weather-component__button,
.weather-component__button-microphone {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  margin-left: 0.5rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

/* =====================
   WEATHER DATA
===================== */
.weather-component__city-name {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.weather-component__city-temperature {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
}

.weather-component__data {
  padding: 1rem 0;
}

.weather-component__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* =====================
   MAP
===================== */
.map-box {
  margin: 1rem 0;
  border-radius: 14px;
  overflow: hidden;
}

/* =====================
   ALERTS
===================== */
.weather-alerts-container {
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 300px;
  z-index: 1000;
}

.weather-alert {
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

/* =====================
   MODAL
===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.safety-modal {
  background: var(--card-bg);
  border-radius: 14px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* =====================
   FOOTER
===================== */
footer {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--card-bg);
  border-radius: 14px;
}

.footerSection {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* =====================
   UTILITIES
===================== */
.loading {
  visibility: hidden;
}

.last-updated {
  font-size: 0.75rem;
  text-align: center;
  opacity: 0.7;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .weather-component__card {
    margin: 1rem;
    padding: 1rem;
  }

  .weather-component__grid {
    grid-template-columns: 1fr;
  }
}
