/*
  Visual language borrowed from calvaryftl.org (Divi theme, Poppins):
  - white header with the sun-cross mark, grey 600-weight nav text and a blue outlined pill
  - black headings, grey body copy, bright sky-blue accent (#00b4ef) and link blue (#2ea3f2)
  - pill buttons with a 3px black border and a trailing arrow
  - black rounded tiles with white text; a light sky-blue page wash
  - black footer
*/

:root {
  --cc-blue: #00b4ef;
  --cc-blue-dark: #2098d1;
  --cc-link: #2ea3f2;
  --cc-sky: #e6f6fd;
  --cc-sky-deep: #bfe8fa;
  --cc-black: #000;
  --cc-ink: #222;
  --cc-body: #555;
  --cc-muted: #777;
  --cc-line: #e4e9ee;
  --cc-radius: 1.25rem;
  --cc-pill: 50rem;

  --bs-font-sans-serif: "Poppins", Helvetica, Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-color: var(--cc-body);
  --bs-link-color: var(--cc-link);
  --bs-link-hover-color: var(--cc-blue-dark);
  --bs-link-color-rgb: 46, 163, 242;
  --bs-link-hover-color-rgb: 32, 152, 209;
  --bs-primary: var(--cc-blue);
  --bs-primary-rgb: 0, 180, 239;
  --bs-border-color: var(--cc-line);
  --bs-secondary-color: var(--cc-muted);
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  font-family: var(--bs-font-sans-serif);
  font-weight: 500;
  color: var(--cc-body);
  background: linear-gradient(180deg, #fff 0, var(--cc-sky) 160px, var(--cc-sky) 70%, #fff 100%);
  margin-bottom: 120px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--cc-black);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong, .fw-semibold, .fw-bold {
  color: var(--cc-ink);
}

/* Header */

.portal-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--cc-ink);
  text-decoration: none;
}

.portal-brand:hover {
  text-decoration: none;
}

.portal-brand-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.portal-brand-org {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-muted);
}

.portal-brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cc-black);
}

/* Signed-in user: avatar + menu, mirroring the calvaryftl.org header widget */

.portal-user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.portal-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cc-blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 50px;
  text-align: center;
}

.portal-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.portal-chevron {
  width: 14px;
  height: 14px;
  color: #666;
  transition: transform 0.15s ease;
}

.portal-user-toggle.show .portal-chevron {
  transform: rotate(180deg);
}

.portal-dropdown {
  --bs-dropdown-min-width: 130px;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(90deg, #36c5f2 67.98%, #00b5ef 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.portal-dropdown .dropdown-item {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  padding: 8px 12px;
  background: transparent;
}

.portal-dropdown .dropdown-item:hover,
.portal-dropdown .dropdown-item:focus {
  color: #003e5c;
  background: transparent;
}

/* Buttons: pill with black border and trailing arrow, like the site's calls to action */

.btn {
  font-weight: 700;
  border-radius: var(--cc-pill);
  padding: 0.5rem 1.4rem;
}

.btn-lg {
  padding: 0.65rem 1.75rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.3rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-primary,
.btn-primary:disabled {
  color: var(--cc-black);
  background: transparent;
  border: 3px solid var(--cc-black);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary:active {
  color: #fff !important;
  background: var(--cc-black) !important;
  border-color: var(--cc-black) !important;
}

.btn-primary:disabled {
  opacity: 0.4;
}

.btn-arrow::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.5em;
  transition: transform 0.15s ease;
}

.btn-arrow:hover::after {
  transform: translateX(3px);
}

.btn-outline-primary,
.btn-outline-light {
  color: var(--cc-link);
  background: transparent;
  border: 1px solid var(--cc-blue);
  font-weight: 600;
}

.btn-outline-primary:hover,
.btn-outline-light:hover,
.btn-check:checked + .btn-outline-primary,
.btn-check:focus-visible + .btn-outline-primary {
  color: #fff;
  background: var(--cc-blue);
  border-color: var(--cc-blue);
}

/* Black tiles and white cards */

.portal-card {
  background: #fff;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  padding: 1.5rem;
}

.portal-tile {
  background: var(--cc-black);
  color: #fff;
  border-radius: var(--cc-radius);
  padding: 1.5rem;
}

.portal-tile .text-muted,
.portal-tile .small {
  color: rgba(255, 255, 255, 0.7) !important;
}

.portal-tile .btn-primary {
  color: #fff;
  border-color: #fff;
}

.portal-tile .btn-primary:hover,
.portal-tile .btn-primary:focus-visible {
  color: var(--cc-black) !important;
  background: #fff !important;
  border-color: #fff !important;
}

.portal-balance {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--cc-black);
}

.portal-tile .portal-balance {
  color: var(--cc-blue);
}

.portal-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-muted);
}

.portal-steps li + li {
  margin-top: 0.5rem;
}

.portal-steps li::marker {
  color: var(--cc-blue);
  font-weight: 700;
}

/* Tables */

.table {
  --bs-table-color: var(--cc-body);
  --bs-table-border-color: var(--cc-line);
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cc-muted);
  border-bottom-width: 2px;
}

.table-history td, .table-history th {
  white-space: nowrap;
}

.table-history td.wrap {
  white-space: normal;
}

/* Forms */

.form-label {
  font-weight: 600;
  color: var(--cc-ink);
}

.form-control, .form-select, .input-group-text {
  border-radius: 0.75rem;
  border-color: #d5dde4;
}

.input-group > .input-group-text:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .form-control:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.form-control:focus, .form-select:focus {
  border-color: var(--cc-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 180, 239, 0.25);
}

.form-check-input:checked {
  background-color: var(--cc-blue);
  border-color: var(--cc-blue);
}

.pay-account {
  border-radius: 1rem;
  border-color: var(--cc-line) !important;
}

.pay-account:has(.pay-select:checked) {
  border-color: var(--cc-blue) !important;
  background: rgba(0, 180, 239, 0.05);
}

/* Badges and alerts */

.badge {
  border-radius: var(--cc-pill);
  font-weight: 600;
  padding: 0.45em 0.9em;
}

.badge.text-bg-success {
  background-color: var(--cc-blue) !important;
  color: #fff !important;
}

.alert {
  border-radius: 1rem;
}

.alert-info {
  --bs-alert-bg: var(--cc-sky);
  --bs-alert-border-color: var(--cc-sky-deep);
  --bs-alert-color: #0b5f80;
}

/* Footer */

.portal-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--cc-black);
  color: rgba(255, 255, 255, 0.75);
}

.portal-footer a {
  color: #fff;
  font-weight: 600;
}

.portal-footer-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Sample check for the bank-account method: where the routing and account numbers are */

.check-sample {
  max-width: 520px;
}

.check-sample svg {
  display: block;
  width: 100%;
  height: auto;
}

.check-paper {
  fill: #fffdf5;
  stroke: var(--cc-line);
  stroke-width: 1.5;
}

.check-ink {
  fill: var(--cc-muted);
  font-family: Poppins, sans-serif;
}

.check-small {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.check-num {
  font-weight: 600;
}

.check-rule {
  stroke: var(--cc-line);
  stroke-width: 1.5;
}

.check-rule-box {
  fill: none;
  stroke: var(--cc-line);
  stroke-width: 1.5;
}

.check-micr {
  fill: var(--cc-ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.check-hl {
  fill: none;
  stroke-width: 2;
  transition: fill 0.15s ease;
}

.check-hl-routing {
  stroke: var(--cc-blue);
}

.check-hl-account {
  stroke: var(--cc-black);
}

.check-label {
  font-family: Poppins, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.check-label-routing {
  fill: var(--cc-blue-dark);
}

.check-label-account {
  fill: var(--cc-black);
}

.check-label-muted {
  fill: var(--cc-muted);
  font-weight: 500;
}

/* The field being edited lights up its spot on the check */

.check-sample.is-routing .check-hl-routing {
  fill: rgba(0, 180, 239, 0.18);
}

.check-sample.is-account .check-hl-account {
  fill: rgba(0, 0, 0, 0.08);
}

/* Build number in the footer: present for support, not for attention */

.portal-version {
  font-size: 0.75rem;
  opacity: 0.7;
  white-space: nowrap;
}
