/* Pay a Bill — inspired layout (generic medical billing, not affiliated) */
:root {
  --osu-red: #ba0c2f;
  --osu-red-hover: #9a0a28;
  --text: #333333;
  --text-muted: #757575;
  --border: #e0e0e0;
  --white: #ffffff;
  --hero-overlay: rgba(0, 0, 0, 0.55);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #faf9f7;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— Skip link (a11y) —— */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--osu-red);
  color: var(--white);
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(52vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: #1a1a1a;
  background-image:
    linear-gradient(var(--hero-overlay), var(--hero-overlay)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=2000&q=80");
  background-size: cover;
  background-position: center;
}

.hero__inner {
  max-width: 720px;
}

.hero__org {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.hero__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero__sub {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
}

/* Shorter hero for inner pages */
.hero--compact {
  min-height: min(36vh, 280px);
  padding: 1.75rem 1.25rem;
}

.hero--compact .hero__title {
  font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.hero--compact .hero__org {
  font-size: 0.875rem;
}

/* —— Breadcrumb —— */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  flex: 1;
  width: 100%;
}

.breadcrumb {
  margin: 0;
  padding: 1rem 0 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus {
  text-decoration: underline;
  color: var(--text);
}

/* —— Card row —— */
.card-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
}

@media (max-width: 768px) {
  .card-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.card-row__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

.card-row__divider span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: lowercase;
}

@media (max-width: 768px) {
  .card-row__divider {
    min-height: 0;
    order: 2;
  }
  .card-row__divider span {
    padding: 0.25rem 0;
  }
  .card--left {
    order: 1;
  }
  .card--right {
    order: 3;
  }
}

/* —— Cards —— */
.card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 2rem clamp(1.25rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--osu-red);
  line-height: 1.25;
}

.card__body {
  flex: 1;
}

.card__body p {
  margin: 0;
  color: var(--text);
}

.card__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.card__list li {
  margin-bottom: 0.65rem;
}
.card__list li:last-child {
  margin-bottom: 0;
}

.card__actions {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.card--left .card__actions {
  align-self: flex-start;
}

.card--right .card__actions {
  text-align: center;
  align-self: center;
  width: 100%;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus {
  outline: 2px solid var(--osu-red);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--osu-red);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--osu-red-hover);
}

/* —— Chat FAB —— */
.chat-fab {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  background: var(--osu-red);
  border: none;
  box-shadow: 0 4px 14px rgba(186, 12, 47, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: background 0.15s ease, transform 0.15s ease;
}

.chat-fab:hover {
  background: var(--osu-red-hover);
  transform: scale(1.04);
}

.chat-fab:focus {
  outline: 2px solid var(--osu-red);
  outline-offset: 2px;
}

.chat-fab svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* —— Sub navigation (matches index actions: Pay a Bill / guest / login) —— */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0 0 1.25rem;
  margin: 0 0 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sub-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.sub-nav a:hover {
  color: var(--osu-red);
  text-decoration: underline;
}

.sub-nav__btn {
  margin-left: auto;
  padding: 0.5rem 1.1rem;
  background: var(--osu-red);
  color: var(--white) !important;
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.sub-nav__btn:hover {
  filter: brightness(0.92);
  text-decoration: none !important;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--osu-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* —— Content panel (billing, payment, error) —— */
.container {
  max-width: 850px;
  margin: 0 auto 3rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 1.75rem 2.5rem;
  box-shadow: 0 18px 50px rgba(12, 31, 30, 0.06);
}

.container--narrow {
  max-width: 520px;
}

.container--error {
  max-width: 640px;
  text-align: center;
}

.page-main {
  padding-bottom: 2rem;
}

/* —— Site header (optional; prefer hero + sub-nav on most pages) —— */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.15rem;
  background: var(--white);
}

.header-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  justify-self: start;
}

.brand__mark {
  width: 42px;
  height: 42px;
  background: var(--osu-red);
  color: var(--white);
  font-weight: 800;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.brand__text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  max-width: 220px;
}

.mychart-wordmark {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--osu-red);
  letter-spacing: -0.02em;
  justify-self: center;
  grid-column: 2;
  line-height: 1.1;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  grid-column: 3;
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.header-nav-links a:hover {
  color: var(--osu-red);
  text-decoration: underline;
}

.header-login-btn {
  background: var(--osu-red);
  color: #fff;
  padding: 10px 22px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.header-login-btn:hover {
  filter: brightness(0.92);
}

@media (max-width: 960px) {
  .header-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .brand {
    justify-self: center;
    flex-direction: column;
  }

  .brand__text {
    max-width: none;
  }

  .mychart-wordmark {
    grid-column: 1;
  }

  .header-actions {
    grid-column: 1;
    justify-self: center;
    justify-content: center;
  }
}

/* —— Login / guest pay layout —— */
.main-shell {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 18px 50px rgba(12, 31, 30, 0.06);
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

.form-column {
  padding: 2rem 1.75rem 2.25rem;
}

.login-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.login-mode-tabs button {
  flex: 1;
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.login-mode-tabs button:hover {
  color: var(--text);
}

.login-mode-tabs button[aria-selected="true"] {
  color: var(--osu-red);
  border-bottom-color: var(--osu-red);
}

.login-mode-tabs button:focus {
  outline: 2px solid rgba(186, 12, 47, 0.35);
  outline-offset: 2px;
}

.login-panel[hidden] {
  display: none !important;
}

.login-panel .field + .field {
  margin-top: 1rem;
}

#mychart-form .form-actions {
  margin-top: 1.35rem;
}

.panel-guest-intro {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.login-panel__note {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.mychart-extras {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.mychart-extras a {
  color: var(--osu-red);
  font-weight: 500;
}

.form-column h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text);
}

.form-column .subhead {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.form-column .hint {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-column .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .form-column .field-row {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 1rem;
  font-family: inherit;
}

.field input:focus {
  outline: 2px solid rgba(186, 12, 47, 0.35);
  outline-offset: 1px;
  border-color: var(--osu-red);
}

.req {
  color: var(--osu-red);
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.btn-lookup,
.btn-next {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #ececec;
  color: var(--text);
  cursor: pointer;
}

.btn-lookup:hover,
.btn-next:hover {
  filter: brightness(0.97);
}

.row-next-cancel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-cancel {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-cancel:hover {
  background: #f0f0f0;
}

.lookup-msg {
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.25em;
}

.lookup-msg.ok {
  color: #2e7d32;
}

.sidebar {
  background: #f3f2ef;
  padding: 2rem 1.5rem 2.25rem;
  border-left: 1px solid var(--border);
}

@media (max-width: 900px) {
  .sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.sidebar h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--osu-red);
}

.sidebar p {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.sidebar section:last-child p {
  margin-bottom: 0;
}

/* —— Billing / payment forms —— */
.page-header-block,
.container .header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.page-header-block h1,
.container .header h1 {
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header-block h2,
.container .header h2 {
  color: var(--osu-red);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.page-header-block p,
.container .header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.security-info {
  background: #f8f4f5;
  border: 1px solid rgba(186, 12, 47, 0.25);
  border-left: 4px solid var(--osu-red);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h2 {
  color: var(--osu-red);
  font-size: 1.25rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}

.form-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  flex: 1;
  margin-bottom: 1.25rem;
}

.form-group.full-width {
  flex: 100%;
}

.form-group label {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.required {
  color: var(--osu-red);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid rgba(186, 12, 47, 0.25);
  border-color: var(--osu-red);
}

.amount-display {
  background: #f8f4f5;
  border: 1px solid rgba(186, 12, 47, 0.35);
  font-weight: 700;
}

.continue-btn,
.pay-now-btn,
.submit-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 2px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: filter 0.15s ease;
}

.continue-btn,
.pay-now-btn {
  background: var(--osu-red);
  color: var(--white);
}

.continue-btn:hover,
.pay-now-btn:hover {
  filter: brightness(0.92);
}

.submit-btn {
  background: var(--text);
  color: var(--white);
  margin-top: 1rem;
}

.submit-btn:hover {
  filter: brightness(1.15);
}

.payment-section {
  background: #f8f6f4;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.card-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  flex-wrap: wrap;
}

.card-icon {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .container {
    padding: 1.5rem 1.15rem 2rem;
    margin-inline: 0.25rem;
  }
}

/* —— Payment portal extras —— */
.no-statement {
  margin: 1.25rem 0;
  text-align: center;
}

.no-statement a {
  color: var(--osu-red);
  font-weight: 600;
  text-decoration: none;
}

.no-statement a:hover {
  text-decoration: underline;
}

.container .footer,
.mini-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.container .footer p,
.mini-footer p {
  margin: 0.35rem 0;
}

.container .footer .logo,
.mini-footer .brand-line {
  color: var(--osu-red);
  font-weight: 700;
}

/* —— Error page —— */
.error-lead {
  color: var(--osu-red);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 700;
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
}

.spinner {
  width: 100%;
  height: 100%;
  border: 4px solid #eee;
  border-top-color: var(--osu-red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
  margin-bottom: 1.5rem;
  background: #fdf5f6;
  border: 1px solid rgba(186, 12, 47, 0.35);
  border-radius: 2px;
  padding: 1.25rem;
  text-align: left;
}

.error-code {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.error-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.phone-section {
  background: #f3f2ef;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.phone-text {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.phone-number {
  color: var(--osu-red);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
}

.call-now-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--osu-red);
  color: var(--white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
}

.call-now-btn:hover {
  filter: brightness(0.92);
}

.phone-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.patient-notebook {
  color: var(--osu-red);
  font-weight: 700;
}

/* —— Login page footer (full width) —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 2.5rem;
  margin-top: auto;
  background: var(--white);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-contact {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fake-store-btn {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: #222;
  color: #fff;
  font-size: 0.65rem;
  border-radius: 2px;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.epic-badge {
  font-weight: 700;
  color: var(--text);
}

.epic-badge span {
  color: var(--osu-red);
  font-style: italic;
}
