/* Login-details popover opened from the username chip in the child hero.
   Markup: app/components/child_header_component.html.erb (the `<dialog>`).
   Behaviour: app/javascript/controllers/credentials_dialog_controller.js. */

.cred-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(420px, calc(100vw - 32px));
  border: none;
  padding: 0;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 20px 40px -20px rgba(0, 0, 0, 0.35);
  color: #0F172A;
}

.cred-dialog::backdrop {
  background: rgba(8, 47, 106, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cred-dialog[open] { animation: cred-in 0.18s ease-out; }

@keyframes cred-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.cred-dialog-card {
  position: relative;
  padding: 22px 24px 22px;
}

.cred-dialog-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #F1F5F9;
  color: #475569;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.cred-dialog-close:hover { background: #E2E8F0; color: #0F172A; }

.cred-dialog-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.cred-dialog-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
  padding-right: 36px;
}

.cred-dialog-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
}

.cred-dialog-rows {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.cred-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
}

.cred-row dt {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
}

.cred-row dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.cred-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.cred-reveal-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #1565C0;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.cred-reveal-btn:hover {
  background: #E8F1FB;
  color: #0D47A1;
}
