@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ── Brand tokens (RYCO red / black) ─────────────────────────────────────── */
:root {
  --brand: #E30613;
  --brand-dark: #B5050F;
  --brand-light: #fff5f5;
  --accent: #FFCB05;
  --secondary: #1a1a1a;
  --bg-page: #f4f4f6;
  --bg-page-gradient: linear-gradient(180deg, #ffffff 0%, #f4f4f6 60%, #ececef 100%);
  --border: #d7d8db;
  --border-soft: #ececef;
  --text: #181818;
  --text-muted: #5f6770;
  --text-faint: #9aa0a6;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --success: #198754;
  --success-bg: #e8f6ee;
  --warning: #b76c00;
  --warning-bg: #fff5e0;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, .06), 0 12px 32px -8px rgba(24, 24, 24, .12);
  --font-sans: "Inter", "Salesforce Sans", system-ui, -apple-system, sans-serif;
  --bs-secondary-rgb: 20,43,53;
  --bs-bg-opacity: 1;
  --bs-body-color-rgb: 33, 37, 41;
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ── Layout shell ────────────────────────────────────────────────────────── */
.kc-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-page-gradient);
}

.kc-shell {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 80px;
  background-image: url("../img/nzbackgroundjune2.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}

.kc-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, .55) 0%, rgba(17, 17, 17, .35) 60%, rgba(17, 17, 17, .55) 100%);
  z-index: -1;
}

@media (max-width: 640px) {
  .kc-shell { padding: 28px 12px 48px; }
}

/* ── Top bar (solid black like Salesforce community headers) ─────────────── */
.kc-topbar {
  color: #ffffff;
  background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
  /*border-bottom: 4px solid var(--brand);*/
  /*background: #111111;*/
}

.kc-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.kc-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.kc-logo:hover { text-decoration: none; color: #fff; }

.kc-logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 220px;
}

.kc-topbar-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.kc-topbar-links a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  transition: color .15s ease;
}

.kc-topbar-links a:hover { color: #fff; }

@media (max-width: 480px) {
  .kc-topbar-inner { padding: 12px 16px; }
  .kc-logo-img { height: 32px; }
  .kc-topbar-links { display: none; }
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.kc-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.kc-card-wide { max-width: 600px; }

.kc-card-header {
  padding: 36px 36px 0;
  text-align: center;
}

.kc-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 10px;
}

.kc-card-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.kc-card-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.kc-card-body { padding: 24px 36px 36px; }

@media (max-width: 480px) {
  .kc-card { border-radius: 6px; }
  .kc-card-header { padding: 28px 22px 0; }
  .kc-card-body { padding: 20px 22px 28px; }
  .kc-card-title { font-size: 22px; }
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.kc-form { display: flex; flex-direction: column; gap: 16px; }

.kc-field { display: flex; flex-direction: column; gap: 6px; }

.kc-label {
  font-size: 13px;
  font-weight: 600;
  color: #2a2a2a;
}

.kc-required { color: var(--danger); margin-left: 2px; }

.kc-input,
.kc-select,
.kc-textarea {
  width: 100%;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}

.kc-input::placeholder,
.kc-textarea::placeholder { color: var(--text-faint); }

.kc-input:focus,
.kc-select:focus,
.kc-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .15);
}

.kc-input.is-invalid,
.kc-select.is-invalid,
.kc-textarea.is-invalid {
  border-color: #e74c3c;
}

.kc-input.is-invalid:focus,
.kc-select.is-invalid:focus,
.kc-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .15);
}

.kc-field-error {
  margin: 0;
  font-size: 12px;
  color: var(--danger);
}

.kc-field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Checkbox ────────────────────────────────────────────────────────────── */
.kc-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #2a2a2a;
  cursor: pointer;
  user-select: none;
}

.kc-checkbox input[type="checkbox"],
.kc-checkbox input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ── Form footer row ─────────────────────────────────────────────────────── */
.kc-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.kc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  text-transform: uppercase;
}

.kc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .28);
}

.kc-btn:active { transform: translateY(1px); }

.kc-btn-primary {
  background: var(--brand);
  color: #fff;
}

.kc-btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}

.kc-btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.kc-btn-secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

.kc-btn-secondary:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
  text-decoration: none;
}

.kc-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  text-transform: none;
  font-weight: 600;
}

.kc-btn-ghost:hover {
  background: #f4f4f6;
  color: var(--text);
  text-decoration: none;
}

.kc-btn-block { width: 100%; }

.kc-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.kc-btn-row .kc-btn { flex: 1; }

/* ── Links / inline meta ─────────────────────────────────────────────────── */
.kc-inline-link {
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

.kc-inline-link:hover { color: var(--brand-dark); }

.kc-meta-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.kc-meta-row a { font-weight: 600; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.kc-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.kc-alert-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.kc-alert-error {
  background: var(--danger-bg);
  border-color: #f5c6c0;
  color: #8a1c12;
}

.kc-alert-warning {
  background: var(--warning-bg);
  border-color: #ffe0a3;
  color: #6e4200;
}

.kc-alert-success {
  background: var(--success-bg);
  border-color: #b8e3c8;
  color: #105c34;
}

.kc-alert-info {
  background: var(--brand-light);
  border-color: rgba(227, 6, 19, .18);
  color: var(--brand-dark);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.kc-footer {
  background: #111111;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  margin-top: auto;
  background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
}

.kc-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.kc-footer-links {
  display: inline-flex;
  gap: 16px;
}

.kc-footer a { color: rgba(255, 255, 255, .85); }
.kc-footer a:hover { color: #fff; text-decoration: underline; }

/* ── Try-another-way / form actions ──────────────────────────────────────── */
.kc-form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.kc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kc-mt-0 { margin-top: 0; }
.kc-mt-2 { margin-top: 8px; }
.kc-mt-4 { margin-top: 16px; }
