/* Deploy: the slate accent (outside any environment) and the app's own pieces.
   Inside an environment, layout.html sets that environment's accent after this file.
   Everything else comes from syad_kit.ui_kit; the app's own names start with dp-. */
:root { --ui-accent: #64748b; --ui-accent-text: #fff; }

/* Tabs under the header */
.dp-tabs { display: flex; gap: 4px; margin: 6px 0 0; }
.dp-tabs a {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: var(--ui-tap);
  padding: 0 8px; white-space: nowrap; border-radius: 10px; color: var(--ui-dim); text-decoration: none; font-weight: 600;
}
@media (max-width: 389px) { .dp-tabs { gap: 0; } .dp-tabs a { padding: 0 5px; font-size: 0.88rem; } }
.dp-tabs a:hover { background: var(--ui-hover); }
.dp-tabs a[aria-current="page"] { background: var(--ui-accent-dim); color: var(--ui-accent-link); }

/* The environment being viewed: its colour and name, hard to miss */
.dp-env-banner {
  display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 10px 14px; border-radius: 10px;
  background: var(--ui-accent); color: var(--ui-accent-text); font-weight: 700; letter-spacing: 0.02em;
}
.dp-env-banner .dp-dot { background: var(--ui-accent-text); }

.dp-dot { flex: 0 0 auto; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dp-env, var(--ui-accent)); }
.dp-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; margin-right: 8px;
  background: var(--dp-env); }

.dp-indent { padding-left: 14px; }
.dp-start { justify-content: flex-start; }
.dp-hint { margin: 4px 0 0; font-size: var(--ui-text-sm); }
.dp-loading { margin: 8px 0; }
.dp-ok { color: var(--ui-ok); font-weight: 600; }
.dp-bad { color: var(--ui-danger); font-weight: 600; }
.dp-mono, .dp-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; }

/* Environments on the home page */
.dp-envs { list-style: none; margin: 0; padding: 0 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.dp-env-link {
  display: flex; align-items: center; gap: 10px; min-height: var(--ui-tap); padding: 0 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--dp-env) 14%, transparent); color: var(--ui-text); text-decoration: none; font-weight: 600;
}
.dp-env-link:hover { background: color-mix(in srgb, var(--dp-env) 24%, transparent); }
.dp-env-link .ui-muted { font-weight: 400; }

/* Projects on the home page */
/* 0.9.6: each project is its own card */
.dp-projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dp-project { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; background: var(--ui-surface); border-radius: 12px; }
.dp-project__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dp-project__name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.dp-project__versions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.dp-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--dp-env) 14%, transparent); color: var(--ui-text); text-decoration: none; font-size: 0.9rem;
}
.dp-chip:hover { background: color-mix(in srgb, var(--dp-env) 24%, transparent); }

/* Environment rows: a colour bar beside each */
.dp-env-row { border-left: 4px solid var(--dp-env); padding-left: 10px; border-radius: 2px; }
.dp-env-row + .dp-env-row { margin-top: 4px; }

/* Colour choice */
.dp-colours { border: 0; padding: 0; margin: 0; }
.dp-colours legend { padding: 0; margin-bottom: 6px; }
.dp-colour { display: inline-flex; align-items: center; min-height: var(--ui-tap); padding: 0 12px 0 4px; margin: 0 6px 6px 0;
  border-radius: 12px; cursor: pointer; }
.dp-colour input { width: 20px; height: 20px; margin: 0 8px 0 4px; accent-color: var(--dp-env); }
.dp-colour:hover { background: var(--ui-hover); }

/* Setup steps */
.dp-steps { padding-left: 22px; }
.dp-steps li + li { margin-top: 14px; }
.dp-code { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--ui-surface2); overflow-x: auto; white-space: pre; }

.dp-confirm { padding: 12px 0; }
.dp-link-row { display: flex; align-items: center; min-height: var(--ui-tap); color: var(--ui-accent-link); font-weight: 600; text-decoration: none; }

/* Change log */
.dp-changes { list-style: none; margin: 0; padding: 0 0 0 14px; }
.dp-change { padding: 10px 0; }
.dp-change p { margin: 0; }
.dp-change__by { font-size: var(--ui-text-sm); }
.dp-change__details { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: var(--ui-text-sm); color: var(--ui-dim); }

/* Host keys to confirm */
.dp-keys { list-style: none; margin: 8px 0; padding: 0; }
.dp-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; }
.dp-key__type { font-weight: 600; min-width: 100px; }
.dp-key__print { flex: 1 1 220px; overflow-wrap: anywhere; font-size: 0.88rem; }
.dp-steps code, .ui-main > p code { overflow-wrap: anywhere; }
.dp-steps li { min-width: 0; }

/* Phase 2: versions, what's changed, deploying */
.dp-versions { margin: 12px 0; padding-left: 14px; }
.dp-sub { margin: 12px 0 6px; font-size: var(--ui-text-md); }
.dp-sub--small { font-size: var(--ui-text-sm); color: var(--ui-dim); }
.dp-offered { list-style: none; margin: 0; padding: 0; }
.dp-offered li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 0; }
.dp-entries { list-style: none; margin: 0; padding: 0 0 0 14px; }
.dp-entries li + li { margin-top: 10px; }
.dp-entry__head { margin: 0; }
.dp-entry__body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--ui-text-sm); }
.dp-diff, .dp-log { white-space: pre-wrap; overflow-wrap: anywhere; }
.dp-decline { margin-top: 16px; }
.dp-deployment { margin: 8px 0; }
.dp-deployment__head { margin: 0; }
.dp-chip--new { border: 1px dashed var(--dp-env); background: transparent; }

/* 0.5.0: Refresh next to a heading, and on each project */
.dp-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dp-group-head .ui-group__title { margin: 0; }
.dp-project__refresh { min-height: 40px; }

/* 0.7.0: rollback's data choice */
.dp-data { border: 0; padding: 0; margin: 8px 0; }
.dp-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; }

/* 0.9.5: Refresh inside the environment banner, at its right */
.dp-env-banner__name { flex: 1 1 auto; min-width: 0; }
.dp-env-banner__refresh {
  flex: 0 0 auto; min-height: var(--ui-tap, 44px); padding: 0 12px; margin: -8px -10px -8px 0; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.dp-env-banner__refresh:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.dp-env-banner__refresh:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* 0.9.6: while a Refresh runs it reads "Refreshing…" (htmx adds .htmx-request and disables it) */
.dp-busy { display: none; }
[data-refresh].htmx-request .dp-idle { display: none; }
[data-refresh].htmx-request .dp-busy { display: inline; }
[data-refresh]:disabled { cursor: progress; opacity: .75; }
.dp-refresh-failed { margin: 6px 0 0; color: var(--ui-warn, #e0a030); font-size: .95em; }

/* 0.10.4: environment page rows: the name, and the version in a pill at the right (as on Home) */
.dp-stage-tap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dp-stage-tap .ui-line__title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.dp-chip--static { flex: 0 0 auto; pointer-events: none; }
