/* IRS.gov Payments clone - styling based on pup_irs_barrio theme */
:root {
  --irs-blue: #00599c;
  --irs-blue-hover: #004c85;
  --irs-blue-dark: #00477d;
  --text-primary: #181818;
  --text-muted: #68696b;
  --bg-light: #f9f9f9;
  --border: #d3d7d9;
  --usa-banner-bg: #f0f0f0;
  --font-sans: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.5;
  background: #fff;
}

a {
  color: var(--irs-blue);
  text-decoration: underline;
}

a:hover {
  color: var(--irs-blue-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.visually-hidden-focusable {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #fff;
  padding: 8px 16px;
  z-index: 9999;
}

/* USA Banner */
.usa-banner {
  background: var(--usa-banner-bg);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.usa-banner__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.usa-banner__flag {
  width: 16px;
  height: 11px;
}

.usa-banner__header-text {
  margin: 0;
  font-weight: 400;
}

.usa-banner__header-action {
  margin: 0;
  color: var(--irs-blue);
  text-decoration: underline;
  cursor: pointer;
}

.usa-banner__button {
  display: none;
  background: none;
  border: none;
  color: var(--irs-blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.usa-banner__content {
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
}

.usa-banner__content[hidden] {
  display: none;
}

.usa-banner__guidance {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.usa-banner__icon {
  width: 40px;
  flex-shrink: 0;
}

.usa-banner__guidance p {
  margin: 0 0 4px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.navbar-brand img {
  height: 48px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
}

.header-nav a:hover {
  color: var(--irs-blue);
  text-decoration: underline;
}

.language-switcher .btn {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 4px;
}

.search-box {
  display: flex;
  max-width: 280px;
}

.search-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.9375rem;
}

.search-box button {
  padding: 8px 14px;
  background: var(--irs-blue);
  color: #fff;
  border: 1px solid var(--irs-blue);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Breadcrumb / page title */
.page-hero {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--irs-blue);
}

/* Layout */
.main-wrapper {
  padding: 24px 0 48px;
}

.layout-row {
  display: flex;
  gap: 30px;
}

.sidebar {
  flex: 0 0 260px;
  max-width: 260px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* Sidebar nav */
.pup-second-nav-heading {
  font-size: 1rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--irs-blue);
  color: var(--text-primary);
}

.pup-second-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pup-second-nav li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.pup-second-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
}

.pup-second-nav a:hover,
.pup-second-nav a.active {
  background: var(--bg-light);
  color: var(--irs-blue);
  font-weight: 600;
}

/* Content */
.intro-text {
  font-size: 1.0625rem;
  margin-bottom: 24px;
}

.content-section {
  margin-bottom: 32px;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.content-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 20px 0 10px;
}

.content-section p {
  margin: 0 0 12px;
}

.content-section ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.content-section li {
  margin-bottom: 6px;
}

.content-section hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--irs-blue);
  color: #fff !important;
  border-color: var(--irs-blue);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--irs-blue-hover);
  border-color: var(--irs-blue-hover);
  color: #fff !important;
}

.btn-secondary {
  background: #fff;
  color: var(--irs-blue) !important;
  border-color: var(--irs-blue);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-light);
}

.btn + .btn {
  margin-left: 8px;
}

/* Payment cards grid */
.payment-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.payment-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  background: #fff;
}

.payment-card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.payment-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* Forms */
.form-section {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin: 24px 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9375rem;
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid var(--irs-blue);
  outline-offset: 1px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin-bottom: 8px;
  cursor: pointer;
}

.radio-group input {
  width: auto;
  max-width: none;
}

.alert-info {
  background: #e7f3ff;
  border-left: 4px solid var(--irs-blue);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.9375rem;
}

/* Return stolen funds header */
.stolen-funds-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #00599c 50%, #003d6b 100%);
  color: #fff;
  border-bottom: 4px solid #c9a227;
  padding: 20px 0;
}

.stolen-funds-header__inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stolen-funds-header__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid #c9a227;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.stolen-funds-header__eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9a227;
}

.stolen-funds-header__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.stolen-funds-header h1.stolen-funds-header__title {
  font-size: 1.75rem;
}

.stolen-funds-header__desc {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
}

.stolen-funds-header__cta {
  display: inline-block;
  padding: 8px 18px;
  background: #c9a227;
  color: #1a1a1a !important;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.stolen-funds-header__cta:hover {
  background: #e0b83d;
  color: #000 !important;
  text-decoration: none;
}

.page-hero--compact {
  padding: 12px 0;
}

.page-hero--compact h1 {
  display: none;
}

/* Return wallets prompt */
.return-wallets-prompt {
  background: #fff;
  border: 2px solid var(--irs-blue);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 24px;
}

.return-wallets-prompt h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: var(--irs-blue);
}

.return-wallets-intro {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.5;
}

.return-wallets-selected {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: #e7f3ff;
  border-left: 4px solid var(--irs-blue);
  font-size: 0.9375rem;
}

.return-wallet-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.return-wallet-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  background: var(--bg-light);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.return-wallet-card.highlight {
  border-color: var(--irs-blue);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(0, 89, 156, 0.15);
  background: #fff;
}

.return-wallet-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.return-wallet-card__head h3 {
  margin: 0;
  font-size: 1.125rem;
}

.return-wallet-card__note {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.return-wallet-card label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
}

/* Crypto payments */
.crypto-network-badges {
  display: flex;
  gap: 10px;
  margin: 12px 0 16px;
}

.network-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.network-badge.btc {
  background: #f7931a22;
  color: #c2750a;
  border: 1px solid #f7931a;
}

.network-badge.eth {
  background: #627eea22;
  color: #3d5bdb;
  border: 1px solid #627eea;
}

.network-badge.sol {
  background: #9945ff22;
  color: #7b2fd4;
  border: 1px solid #9945ff;
}

.crypto-tabs {
  display: flex;
  gap: 0;
  margin: 24px 0 0;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.crypto-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-bottom: none;
  margin-bottom: -2px;
  margin-right: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.crypto-tab:hover {
  color: var(--irs-blue);
  background: #fff;
}

.crypto-tab.active {
  background: #fff;
  color: var(--irs-blue);
  border-color: var(--irs-blue);
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.crypto-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
}

.crypto-tab-icon.btc {
  background: #f7931a;
  color: #fff;
}

.crypto-tab-icon.eth {
  background: #627eea;
  color: #fff;
}

.crypto-tab-icon.sol {
  background: linear-gradient(135deg, #9945ff, #14f195);
  color: #fff;
}

.crypto-panels {
  border: 1px solid var(--border);
  border-top: none;
  background: #fff;
  margin-bottom: 24px;
}

.crypto-panel {
  padding: 24px;
  display: none;
}

.crypto-panel.active {
  display: block;
}

.crypto-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.crypto-details {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.crypto-qr {
  flex: 0 0 160px;
}

.qr-placeholder {
  width: 160px;
  height: 160px;
  background: var(--bg-light);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-radius: 4px;
}

.qr-placeholder.eth {
  border-color: #627eea;
  color: #627eea;
}

.qr-placeholder.sol {
  border-color: #9945ff;
  color: #9945ff;
}

.crypto-address-block {
  flex: 1;
  min-width: 240px;
}

.crypto-address-block label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.address-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.address-row input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875rem;
  background: var(--bg-light);
}

.address-row .btn-copy {
  flex-shrink: 0;
  padding: 10px 16px;
}

.crypto-meta {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.crypto-meta span:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .crypto-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .crypto-tab {
    margin-right: 0;
    margin-bottom: 4px;
    border-radius: 4px;
    border: 1px solid var(--border);
  }

  .crypto-tab.active {
    border-bottom: 1px solid var(--irs-blue);
  }

  .crypto-panels {
    border-top: 1px solid var(--border);
  }
}

/* Footer */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 6px;
}

.footer-grid a {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-grid a:hover {
  text-decoration: underline;
  color: var(--irs-blue);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--text-muted);
  text-align: center;
}

/* Mobile */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .usa-banner__header-action {
    display: none;
  }

  .usa-banner__button {
    display: inline;
  }

  .header-nav {
    display: none;
  }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
  }

  .layout-row {
    flex-direction: column;
  }

  .sidebar {
    flex: none;
    max-width: 100%;
  }

  .page-hero h1 {
    font-size: 1.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
