/* ==========================================================
   AZ Managed IT — Service Area Viewer (v29.0 Transparent Refined)
   Unified cyan aesthetic • Compact spacing • Improved readability
   ========================================================== */

/* ---------- Tokens ---------- */
#sa-viewer, #sa-cta {
  --ink: #e8edf4;
  --muted: #a9b5c5;
  --ring: #2e3a52;
  --accent: #00bfff;
  --accent-dark: #00ace6;
  --yellow: #ffd700;
  --card: rgba(16, 22, 32, 0.35);
  --chip: rgba(15, 23, 38, 0.45);
  --line: rgba(34,49,76,0.4);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}

/* ---------- CTA Band ---------- */
#sa-cta.band {
  background: none !important;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
#sa-cta .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
#sa-cta strong {
  font-size: 1.05rem;
  color: var(--yellow);
  font-weight: 700;
}
#sa-cta .btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}
#sa-cta .btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--yellow);
}
#sa-cta .btn-outline {
  background: none;
  color: var(--ink);
}
#sa-cta .btn:hover {
  background: var(--accent-dark);
  color: #000;
}
@media (max-width: 768px) { #sa-cta.band { display: none; } }

/* ---------- Viewer Wrapper ---------- */
#sa-viewer {
  background: none !important;
  padding: 40px 0 60px;
}
#sa-viewer .wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
#sa-viewer h1 {
  font-weight: 800;
  font-size: clamp(28px, 2.3vw, 36px);
  color: var(--yellow);
  margin-bottom: 10px;
}
#sa-viewer p.muted {
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.65;
  max-width: 68ch;
}

/* ---------- Card Layout ---------- */
#sa-viewer .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  margin-bottom: 18px;
  transition: all 0.25s ease;
}
#sa-viewer .card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* ---------- Controls ---------- */
#sa-viewer .controls-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 2fr 1fr 1fr;
}
@media (max-width: 960px) { #sa-viewer .controls-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { #sa-viewer .controls-grid { grid-template-columns: 1fr; } }

#sa-viewer .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#sa-viewer label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
#sa-viewer input,
#sa-viewer select {
  background: var(--chip);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.25s ease, background 0.25s ease;
  font-size: 0.95rem;
}
#sa-viewer input:focus,
#sa-viewer select:focus {
  border-color: var(--accent);
  outline: none;
  background: rgba(0,191,255,0.08);
}
#sa-viewer select option {
  background: #0f1726;
  color: var(--ink);
}

/* ---------- Showing Status ---------- */
#sa-showing {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

/* ---------- Output Area ---------- */
#sa-output {
  margin-top: 16px;
  line-height: 1.6;
  min-height: 160px;
  position: relative;
}
#sa-output.is-loading::before {
  content: "Loading city content…";
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ---------- Skeleton Animation ---------- */
.skeleton { display: grid; gap: 10px; }
.sk-line {
  height: 12px;
  background: linear-gradient(90deg, rgba(15,23,38,0.4), rgba(0,191,255,0.08), rgba(15,23,38,0.4));
  border-radius: 8px;
  animation: sk 1.3s infinite linear;
}
.sk-h1 { height: 20px; width: 40%; }
.sk-card {
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(15,23,38,0.4), rgba(0,191,255,0.08), rgba(15,23,38,0.4));
  animation: sk 1.3s infinite linear;
}
@keyframes sk { 0% { background-position: 0% } 100% { background-position: 200% } }

/* ---------- City Links / Pills ---------- */
#sa-viewer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
#sa-viewer .pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  background: none;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}
#sa-viewer .pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Mobile Sticky Bar ---------- */
#sa-sticky {
  position: sticky;
  bottom: 0;
  background: rgba(15,23,38,0.65);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
  padding: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 50;
}
#sa-sticky .pill {
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}
#sa-sticky .pill:hover {
  background: var(--accent-dark);
}
@media (min-width: 769px) { #sa-sticky { display: none; } }

/* ---------- Compact Section Spacing ---------- */
#sa-viewer h1,
#sa-cta .inner strong {
  letter-spacing: 0.01em;
}
#sa-viewer .card,
#sa-cta .inner {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
