/* ── IP Fortress palette, applied via Bootstrap 5.3's CSS variable API ──── */
/* Same tokens as the IP Fortress dashboard app (roles/deploy_dashboard/files/dashboard). */

:root {
  --bs-body-bg: #F3F5F6;
  --bs-body-color: #1A1F23;
  --bs-primary: #007AC9;
  --bs-primary-rgb: 0, 122, 201;
  --bs-danger: #ED2C2C;
  --bs-danger-rgb: 237, 44, 44;
  --bs-border-color: #e2e6ea;
  --bs-link-color: #007AC9;
  --bs-link-hover-color: #005f9e;
}

body { background-color: var(--bs-body-bg); }

/* ── Header (copied from the dashboard app for brand consistency) ──────── */

header#nav { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }

header#nav > div {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  padding: 0.25rem 0;
}

.ipf-branding {
  padding: 0.5rem 0 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ipf-branding div.brand-title h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 0.1rem;
  color: #1A1F23;
}

.ipf-branding div.brand-title h4 {
  margin-bottom: 0;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.ipf-action-links {
  flex: 1 0 0;
  text-align: right;
  align-content: center;
  padding-right: 1.5rem;
}

.ipf-btn-secondary {
  background-color: #F3F5F6;
  color: #1A1F23;
  border-color: #C8CACC;
  font-size: 0.85rem;
  font-weight: 500;
}
.ipf-btn-secondary:hover { background-color: #DBDDDE; color: #1A1F23; border-color: #B8BABC; }

.ipf-btn-danger {
  background-color: #ED2C2C;
  color: #FBFFFF;
  border-color: #ED2C2C;
  font-size: 0.85rem;
  font-weight: 500;
}
.ipf-btn-danger:hover { background-color: #BA2323; border-color: #BA2323; color: #FBFFFF; }

/* Not present in the dashboard app (it has no primary-action buttons of its own) —
   added here using the same accent blue for our Save/Continue/Generate/Log in actions. */
.ipf-btn-primary {
  background-color: #007AC9;
  color: #FFFFFF;
  border-color: #007AC9;
  font-size: 0.85rem;
  font-weight: 500;
}
.ipf-btn-primary:hover { background-color: #005f9e; border-color: #005f9e; color: #FFFFFF; }
.ipf-btn-primary:disabled { background-color: #9fc7de; border-color: #9fc7de; }

nav.ipf-main-nav {
  background-color: #3F4952;
  padding: 0.4rem 0.5rem;
  min-height: 2.5rem;
}
nav.ipf-main-nav .navbar-text { color: #C6C9CB; font-size: 0.85rem; margin: 0; }
nav.ipf-main-nav a { color: #C6C9CB; }
nav.ipf-main-nav a:hover { color: #FFFFFF; }

/* ── Page-level heading (copied from the dashboard app) ─────────────────── */

.ipf-page-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3F4952;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #e9ecef;
  letter-spacing: 0.01em;
}

/* ── Cards (copied from the dashboard app) ──────────────────────────────── */

.ipf-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  border-color: #e2e6ea;
  margin-bottom: 1.25rem;
}

/* ── Wizard layout ───────────────────────────────────────────────────────── */

.wizard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .wizard-layout { grid-template-columns: 1fr; } }

.step-nav ol { list-style: none; margin: 0; padding: 0; }
.step-nav li { margin-bottom: 0.2rem; }
.step-nav a {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  text-decoration: none;
  color: #1A1F23;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.step-nav a:hover { background: #F3F5F6; }
.step-nav li.current a { background: #e6f2fa; color: #005f9e; font-weight: 600; }
.step-nav li.skipped a { color: #8a9198; font-style: italic; }
.step-nav .num { color: #8a9198; font-size: 0.8rem; min-width: 1.2em; }

/* ── Help / info callouts ────────────────────────────────────────────────── */

.help {
  background: #eef6fb;
  border-left: 3px solid var(--bs-primary);
  border-radius: 0 6px 6px 0;
  padding: 0.55rem 0.8rem;
  margin-top: 0.4rem;
  font-size: 0.87rem;
  color: #55606b;
}
.help p { margin: 0.15rem 0; }
.help strong { color: #1A1F23; }

.field { margin-bottom: 1.1rem; }
.field-error { color: var(--bs-danger); font-size: 0.85rem; margin-top: 0.25rem; }

/* Checkboxes: Bootstrap's default border color comes from --bs-border-color, which we've
   set to a very light gray for subtle card borders elsewhere — that leaves checkboxes
   nearly invisible, especially against the tinted .help background. Give them their own
   explicit, higher-contrast styling instead. */
.form-check {
  padding-left: 1.75em;
  min-height: 1.3em;
  display: flex;
  align-items: center;
  gap: 0;
}
.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-left: -1.75em;
  margin-top: 0;
  flex-shrink: 0;
  border: 2px solid #6c7680;
  background-color: #fff;
  cursor: pointer;
}
.form-check-input:hover { border-color: var(--bs-primary); }
.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.form-check-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 122, 201, 0.25);
}
.form-check-label { cursor: pointer; }

/* Ghost placeholder text (an example/format hint, never actually submitted) — pushed
   further from real input text (italic, lighter, letter-spaced) so it reads unmistakably
   as "not a real value." Real prefilled defaults are just normal input values — relying on
   this placeholder/value contrast alone to distinguish them, rather than extra badges/tint,
   which got noisy on pages with a lot of prefilled fields. */
.form-control::placeholder { color: #9aa3ab; font-style: italic; opacity: 1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

.actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; align-items: center; }

.narrow { max-width: 480px; margin: 2rem auto; }

/* ── Repeater widgets (DHCP subnets/pools, DNS zones/records, users) ────── */

.repeater-rows { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
.repeater-row {
  border: 1px dashed #C8CACC;
  border-radius: 6px;
  padding: 0.9rem;
  position: relative;
  background: #fbfcfd;
}
.repeater-row-index { font-size: 0.75rem; font-weight: 700; color: var(--bs-primary); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.3rem; }
.repeater-remove { position: absolute; top: 0.6rem; right: 0.6rem; }
.repeater-nested { margin-top: 0.75rem; padding-left: 0.9rem; border-left: 2px solid #e2e6ea; }

.collapse-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  padding-right: 5rem; /* keep clear of the absolutely-positioned Remove button */
}
.collapse-toggle:hover { color: var(--bs-primary); }
.collapse-icon { font-size: 0.9rem; }
.collapse-body { margin-top: 0.5rem; }

.pool-ip-widget .input-group { flex-wrap: nowrap; }
.pool-ip-widget input[type="number"] { min-width: 3.5rem; }

/* ── Share link box ───────────────────────────────────────────────────────── */

.share-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #eef6fb;
  border: 1px solid #cfe3f0;
  border-radius: 6px;
  padding: 0.6rem;
}
.share-box input { flex: 1; border: none; background: transparent; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.share-box input:focus { outline: none; box-shadow: none; }

/* ── YAML preview ─────────────────────────────────────────────────────────── */

pre.yaml-preview {
  background: #1A1F23;
  color: #d7e2ea;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.4;
}

.summary-grid { display: grid; grid-template-columns: 200px 1fr; row-gap: 0.4rem; column-gap: 1rem; font-size: 0.92rem; }
.summary-grid dt { color: #6c757d; }
.summary-grid dd { margin: 0; white-space: pre-line; }

.admin-table th { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; font-weight: 600; }

.is-hidden { display: none !important; }
