/* ==============================
   Full‑screen, pink‑themed style
   ============================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100vh;                     /* full viewport height */
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222;
  background: #fdf6fb;               /* very light pink background */
  overflow: hidden;                  /* no scrollbars */
  display: flex;
  flex-direction: column;            /* header → controls → map */
}

/* ---------- Header ---------- */
header.header {
  background: #ff69b4;                /* hot pink */
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1.25rem;
}

/* ---------- Controls (top bar) ---------- */
.controls {
  background: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.controls input {
  flex: 1 1 auto;
  min-width: 150px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color .2s;
}
.controls input:focus {
  outline: none;
  border-color: #ff69b4;             /* pink on focus */
}
.controls button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, transform .1s;
}
#go-btn {
  background: #ff69b4;
  color: #fff;
}
#go-btn:hover { background: #ff4eab; }
#go-btn:active { transform: scale(.97); }
#copy-btn {
  background: #ff69b4;
  color: #fff;
}
#copy-btn:hover { background: #ff4eab; }
#copy-btn:active { transform: scale(.97); }

/* ---------- Map container ---------- */
#map {
  flex: 1;                            /* fill remaining space */
  width: 100%;
  position: relative;                 /* context for absolute toast */
}

/* ---------- Toast container (top‑right of the map) ---------- */
.toastBox {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

/* ---------- Toast itself ---------- */
.toast {
  min-width: 260px;
  background: #fff;
  color: #222;
  border-radius: 4px;
  border: 2px solid #ff69b4;          /* pink border */
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;                           /* start invisible */
  transform: translateY(-20px);
  animation: fadeIn 0.4s forwards;       /* fade‑in on appear */
  position: relative;                    /* reserve space for progress bar */
}

/* ---------- Progress bar (pink) ---------- */
.toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #ff69b4;
  width: 100%;
  animation: progressBar 10s linear forwards;
}

/* ---------- Fade‑in / Fade‑out ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}

/* ---------- Progress bar animation ---------- */
@keyframes progressBar {
  0%   { width: 100%; }
  100% { width: 0; }
}

/* ---------- Close button icon ---------- */
.toast .close-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;            /* push to the right */
}
.toast .close-btn i { color:#666; }

/* ---------- Toast types (color variants) ---------- */
.toast.success i{color:#28a745;}
.toast.error   i{color:#dc3545;}
.toast.info    i{color:#17a2b8;}

/* ---------- Popup styling ---------- */
.leaflet-popup-content-wrapper {
  font-size: 0.9rem;
  line-height: 1.4;
}
.leaflet-popup-content a {
  color: #ff69b4;
  text-decoration: none;
}
.leaflet-popup-content a:hover { text-decoration: underline; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 480px) {
  .controls button {
      padding: 0.35rem 0.6rem;
      font-size: 0.9rem;
  }
  .controls input {
      padding: 0.35rem 0.5rem;
      font-size: 0.9rem;
  }
}



/* ==================================================
   CSS that makes the popup appear in the top‑right
   of the map container.  Add this rule to your
   style.css (or an inline <style> block).
   ================================================== */
.top-right-popup .leaflet-popup-content-wrapper {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    transform: none !important;
}
