/*
 * C2FO Self Help Portal - reskinned to the C2FO Liquidity Design System.
 * Drop-in replacement for app/public/assets/css/style.css.
 * No build step required - hand-written CSS using C2FO design tokens.
 */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  /* ── C2FO Liquidity Design System tokens ── */
  --sh-color-text: rgba(33, 31, 31, 0.87);
  --sh-color-text-secondary: rgba(33, 31, 31, 0.64);
  --sh-color-text-hint: rgba(33, 31, 31, 0.54);
  --sh-color-bg: #F9F9F9;              /* canvas */
  --sh-color-card-bg: #ffffff;
  --sh-color-primary: #06A76C;          /* green-500 */
  --sh-color-primary-dark: #058154;     /* green-700 */
  --sh-color-secondary: #2C324F;        /* deep-blue-500 */
  --sh-color-secondary-dark: #22273D;   /* deep-blue-700 */
  --sh-color-error: #E14F42;            /* red-500 */
  --sh-color-error-dark: #AE3D33;
  --sh-color-error-bg: #FCF3F3;
  --sh-color-success: #06A76C;
  --sh-color-success-bg: #F2F8F4;
  --sh-color-info: #369DD9;             /* light-blue-500 */
  --sh-color-info-dark: #2A7AA8;
  --sh-color-info-bg: #F3F7FB;
  --sh-color-border: #C9C9C9;           /* deep-gray-200 */
  --sh-color-border-light: #E5E5E5;     /* deep-gray-100 */
  --sh-font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --sh-font-serif: 'Libre Baskerville', serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --sh-radius: 16px;
  --sh-radius-sm: 6px;
  --sh-shadow-card: 0 4px 12px rgba(33, 31, 31, 0.08);
  --sh-max-width: 480px;
  --sh-space-1: 0.5rem;
  --sh-space-2: 1rem;
  --sh-space-3: 1.5rem;
  --sh-space-4: 2rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--sh-font-sans);
  color: var(--sh-color-text);
  background: var(--sh-color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--sh-color-info-dark); }
a:hover { color: var(--sh-color-info); }
a:focus, button:focus, input:focus, summary:focus {
  outline: 2px solid var(--sh-color-primary-dark);
  outline-offset: 2px;
}

.sh-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.sh-header {
  padding: var(--sh-space-2) var(--sh-space-3);
  background: var(--sh-color-card-bg);
  border-bottom: 1px solid var(--sh-color-border-light);
}
.sh-brand {
  display: flex;
  align-items: center;
  gap: var(--sh-space-2);
  text-decoration: none;
  color: var(--sh-color-text);
}
.sh-brand__logo { height: 28px; width: auto; }
.sh-brand__name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--sh-color-text-secondary);
  padding-left: var(--sh-space-2);
  border-left: 1px solid var(--sh-color-border);
}

/* ---------- Main / card ---------- */
.sh-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--sh-space-4) var(--sh-space-2);
}
.sh-card {
  width: 100%;
  max-width: var(--sh-max-width);
  background: var(--sh-color-card-bg);
  border: none;
  border-radius: var(--sh-radius);
  padding: var(--sh-space-4);
  box-shadow: var(--sh-shadow-card);
}
.sh-card__title {
  margin: 0 0 var(--sh-space-1);
  font-family: var(--sh-font-serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--sh-color-text);
}
.sh-card__subtitle { margin: 0 0 var(--sh-space-3); color: var(--sh-color-text-secondary); font-size: 1rem; }

/* ---------- Forms ---------- */
.sh-form {
  display: flex;
  flex-direction: column;
  gap: var(--sh-space-1);
  margin-bottom: var(--sh-space-3);
}
.sh-form label { font-weight: 500; font-size: 1rem; margin-top: var(--sh-space-1); color: var(--sh-color-text); }
.sh-form input[type="text"],
.sh-form input[type="password"],
.sh-form input[type="email"],
.sh-form input[type="tel"] {
  font-family: var(--sh-font-sans);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--sh-color-border);
  border-radius: var(--sh-radius-sm);
  width: 100%;
  min-height: 48px;
  transition: border-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-form input:hover { border-color: #369DD9; }
.sh-form input:focus { border-color: #058154; border-width: 2px; outline: none; }
.sh-form input:invalid:not(:placeholder-shown) { border-color: var(--sh-color-error); border-width: 2px; }

/* ---------- Buttons (pill, CTA 3D-shadow) ---------- */
.sh-button {
  display: inline-block;
  background: var(--sh-color-primary);
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 14px 28px;
  font-family: var(--sh-font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 48px;
  box-shadow: -4px 6px 0px -1px var(--sh-color-secondary);
  transition: background-color 150ms cubic-bezier(0.16, 1, 0.3, 1), transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 150ms;
}
.sh-button:hover, .sh-button:focus { background: var(--sh-color-primary-dark); }
.sh-button:active { transform: translate(-0.2em, 0.3em); box-shadow: none; }
.sh-button--block { display: block; width: 100%; margin-bottom: var(--sh-space-1); }
.sh-button--secondary {
  background: transparent;
  color: var(--sh-color-secondary);
  border: 1px solid var(--sh-color-secondary);
  box-shadow: none;
}
.sh-button--secondary:hover, .sh-button--secondary:focus { background: rgba(44, 50, 79, 0.06); }
.sh-button--secondary:active { transform: none; }
.sh-button[disabled] { opacity: 0.38; cursor: not-allowed; box-shadow: none; }

/* ---------- Actions list (landing page) ---------- */
.sh-actions { list-style: none; margin: 0; padding: 0; }
.sh-actions li { margin-bottom: var(--sh-space-3); }
.sh-actions__hint { font-size: 0.9rem; color: var(--sh-color-text-secondary); margin: 10px 0 0; }

/* ---------- Alerts ---------- */
.sh-alert {
  padding: var(--sh-space-2);
  border-radius: var(--sh-radius-sm);
  margin-bottom: var(--sh-space-2);
  font-size: 0.9rem;
}
.sh-alert--error { background: var(--sh-color-error-bg); color: var(--sh-color-error-dark); }
.sh-alert--success { background: var(--sh-color-success-bg); color: #046A44; }
.sh-alert--info { background: var(--sh-color-info-bg); color: var(--sh-color-info-dark); }
.sh-alert:empty { display: none; }

.sh-field-error { color: var(--sh-color-error-dark); font-size: 0.85rem; min-height: 1.2em; }

/* ---------- Misc ---------- */
.sh-hint { font-size: 0.9rem; color: var(--sh-color-text-secondary); }

/* Masked 2FA challenge value - styled as a chip/pill, matches C2FO Chip component look. */
.sh-mask-value {
  display: inline-block;
  font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: #F3F3F3;
  color: var(--sh-color-text);
  border-radius: 9999px;
  padding: 4px 12px;
  margin-left: 0.35rem;
  word-break: break-all;
}
.sh-requirements { font-size: 0.9rem; margin-top: var(--sh-space-2); color: var(--sh-color-text-secondary); }
.sh-requirements summary { cursor: pointer; font-weight: 500; color: var(--sh-color-text); }
.sh-requirements ul { margin: var(--sh-space-1) 0 0 1.1rem; padding: 0; }

/* ---------- Footer ---------- */
.sh-footer {
  padding: var(--sh-space-2) var(--sh-space-3);
  text-align: center;
  font-size: 0.75rem;
  color: var(--sh-color-text-hint);
}
.sh-footer p { margin: 0.2rem 0; }

/* =========================================================================
 * Breakpoints
 * ========================================================================= */
@media (min-width: 481px) {
  .sh-card { padding: 2.5rem; }
}
@media (min-width: 769px) {
  :root { --sh-max-width: 520px; }
  .sh-card__title { font-size: 2rem; }
}
@media (min-width: 1025px) {
  :root { --sh-max-width: 560px; }
  .sh-main { padding-top: var(--sh-space-4); }
}
@media (min-width: 1441px) {
  :root { --sh-max-width: 600px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
