/* Shiftmap — minimal neutral chrome, map is the point. */

:root {
  --ink: #1c1e21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #0b5cff;
  --bg: #ffffff;
  --warn: #b45309;
  --warn-bg: #fef3c7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
}

header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.subhead {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.status {
  margin: 0.75rem 1.25rem 0;
  padding: 0.6rem 0.85rem;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 6px;
  font-size: 0.9rem;
}

main {
  flex: 1;
  min-height: 0;
  position: relative;
}

#map {
  position: absolute;
  inset: 0;
}

footer {
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Popup — Azure Maps injects into .atlas-popup-content-container */

.popup {
  padding: 0.75rem 0.9rem;
  min-width: 220px;
  max-width: 280px;
}

.popup h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.popup .location {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.popup dl {
  margin: 0.4rem 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 0.6rem;
  font-size: 0.85rem;
}

.popup dt {
  color: var(--muted);
  font-weight: 500;
}

.popup dd {
  margin: 0;
}

.popup .schedule dt {
  width: 3.5em;
}

.popup .cta {
  margin-top: 0.75rem;
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.popup .cta:hover { filter: brightness(1.05); }
.popup .cta:disabled { opacity: 0.6; cursor: not-allowed; }

/* Modal (shift request) */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal-panel {
  position: relative;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 1.5rem 1.5rem 1.25rem;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.modal-close:hover { color: var(--ink); }

.modal-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-panel .subhead {
  margin-bottom: 1rem;
}

#request-form label {
  display: block;
  margin-bottom: 0.85rem;
}

#request-form label > span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

#request-form label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
  font-size: 0.8rem;
}

#request-form input[type="text"],
#request-form input[type="email"],
#request-form input[type="tel"],
#request-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}

#request-form input:focus,
#request-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

#request-form textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.radio-group {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.65rem 0.75rem 0.5rem;
  margin: 0 0 0.85rem;
}

.radio-group legend {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0 0.4rem;
}

.radio-group .inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 1rem 0.25rem 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  margin: 0;
}

.form-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.75rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: #f8fafc; }

#request-success-view p {
  margin: 0.5rem 0;
  line-height: 1.4;
}

#request-receipt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}
