/* Credential card: the top of the login detail modal (public/js/credential-card.js).
   Reuses the app tokens and button primitives from styles.css; only the card's own
   layout lives here. */

.ccard-host { margin-bottom: 18px; }
.ccard {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px 16px;
  box-shadow: var(--sh-2);
  display: flex; flex-direction: column; gap: 16px;
}

/* Header: carrier, office, branch and status badges */
.ccard-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ccard-title { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ccard-title a.profile-link { color: var(--ink); }
.ccard-title a.profile-link:hover { color: var(--info); }
.ccard-sub { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.ccard-office a.profile-link { color: var(--ink-2); font-weight: 500; }
.ccard-office a.profile-link:hover { color: var(--info); }
.ccard-branches, .ccard-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Actions: Open website is the strongest control on the card */
.ccard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ccard-site { display: inline-flex; min-width: 0; }
.ccard-open { padding: 12px 20px; font-size: 15px; border-radius: var(--r-md); }
.ccard-open .ic { width: 17px; height: 17px; }
.ccard-open:disabled { opacity: .55; }
.ccard-nosite { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: var(--r-md); background: var(--bg-tint); color: var(--muted); font-size: 14px; font-weight: 500; border: 1px dashed var(--line-strong); }
.ccard-nosite .ic { width: 16px; height: 16px; flex: none; }
.ccard-addsite { color: var(--info); font-weight: 600; text-decoration: none; margin-left: 4px; }
.ccard-addsite:hover { text-decoration: underline; }

/* Username and password blocks */
.ccard-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ccard-field { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px 14px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ccard-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.ccard-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ccard-edit-btn { display: inline-flex; align-items: center; gap: 4px; }
.ccard-edit-btn .ic { width: 13px; height: 13px; }
.ccard-field-body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; min-height: 44px; }
.ccard-val {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 18px; line-height: 1.3; color: var(--ink);
  overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}
.ccard-masked { letter-spacing: .05em; color: var(--ink-2); white-space: nowrap; overflow: hidden; user-select: none; -webkit-user-select: none; }
.ccard-empty { flex: 1 1 auto; color: var(--muted); font-size: 14px; }
/* Show and Copy travel together: beside a short value, under a long one */
.ccard-controls { display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 100%; }
.ccard-copy { flex: none; padding: 11px 16px; font-size: 14px; border-radius: var(--r-md); }
.ccard-copy .ic { width: 16px; height: 16px; }
.ccard-copy .copied-lbl { font-size: 14px; }
.ccard-reveal { flex: none; height: 32px; padding: 0 10px; gap: 6px; font-size: 12px; font-weight: 600; border-radius: var(--r-sm); }
.ccard-reveal .ic { width: 15px; height: 15px; }
.ccard-field .inline-edit { flex: 1 1 auto; }

/* Keyboard hints on the buttons */
.ccard-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
  font-family: var(--font); font-size: 10.5px; font-weight: 700; line-height: 1;
  color: var(--muted); background: var(--bg-tint); border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 5px;
}
.ccard-kbd-light { color: #fff; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }
.copied .ccard-kbd { display: none; }

/* The three steps, quiet */
.ccard-steps { list-style: none; margin: 0; padding: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12.5px; color: var(--muted); }
.ccard-steps li { display: inline-flex; align-items: center; gap: 7px; }
.ccard-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 10.5px; font-weight: 700; color: var(--ink-2); background: var(--bg-tint);
}

@media (max-width: 760px) {
  .ccard { padding: 16px 14px 14px; border-radius: var(--r-md); gap: 14px; }
  .ccard-title { font-size: 20px; }
  .ccard-fields { grid-template-columns: 1fr; }
  .ccard-field-body { flex-wrap: wrap; }
  .ccard-val { flex-basis: 100%; }
  .ccard-controls { width: 100%; }
  .ccard-copy { flex: 1 1 auto; }
  .ccard-site, .ccard-open { width: 100%; }
  .ccard-nosite { width: 100%; flex-wrap: wrap; }
  .ccard-steps { gap: 6px 16px; }
}
