/*
 * CaaT Academy support and donation section
 * Loaded after theme.css.
 */

.caat-support-section {
  --support-surface: rgba(255, 255, 255, 0.88);
  --support-surface-strong: #ffffff;
  --support-text: #0f172a;
  --support-muted: #526079;
  --support-border: rgba(15, 23, 42, 0.13);
  --support-accent: #0e7490;
  --support-accent-strong: #155e75;
  --support-accent-soft: rgba(14, 116, 144, 0.1);
  --support-icon-surface: rgba(255, 255, 255, 0.94);
  --support-code-surface: #f1f5f9;
  --support-warning-surface: #fff7ed;
  --support-warning-text: #9a3412;
  --support-shadow: 0 24px 65px rgba(15, 23, 42, 0.13);

  position: relative;
  width: 100%;
  margin: 36px 0 64px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--support-text);
  isolation: isolate;
}

html[data-theme="dark"] .caat-support-section {
  --support-surface: rgba(9, 17, 31, 0.91);
  --support-surface-strong: #101b2d;
  --support-text: #f1f5f9;
  --support-muted: #afbdd2;
  --support-border: rgba(148, 163, 184, 0.22);
  --support-accent: #5ee7f7;
  --support-accent-strong: #8bf3df;
  --support-accent-soft: rgba(94, 231, 247, 0.1);
  --support-icon-surface: rgba(18, 31, 51, 0.94);
  --support-code-surface: #08111f;
  --support-warning-surface: rgba(124, 45, 18, 0.24);
  --support-warning-text: #fdba74;
  --support-shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
}

/* Homepage width. */
body.crl-home .caat-support-section {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 64px !important;
}

.caat-support-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid var(--support-border);
  border-radius: 28px;
  background-color: var(--support-surface);
  box-shadow: var(--support-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.caat-support-card::before,
.caat-support-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.caat-support-card::before {
  width: 250px;
  height: 250px;
  top: -135px;
  right: -105px;
  border: 1px solid var(--support-border);
  border-radius: 42% 58% 55% 45%;
  transform: rotate(18deg);
}

.caat-support-card::after {
  width: 170px;
  height: 85px;
  bottom: -52px;
  left: 38%;
  border: 1px dashed var(--support-border);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.caat-support-intro,
.caat-support-donation {
  min-width: 0;
}

.caat-support-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--support-accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.caat-support-kicker::before {
  content: "</>";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--support-border);
  border-radius: 10px;
  background: var(--support-accent-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: -0.08em;
}

.caat-support-section h2 {
  max-width: 720px;
  margin: 0 !important;
  color: var(--support-text) !important;
  font-family:
    var(--crl-font-display, "Space Grotesk", "Inter", sans-serif);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.caat-support-description {
  max-width: 760px;
  margin: 17px 0 0 !important;
  color: var(--support-muted) !important;
  font-size: 1rem !important;
  line-height: 1.78 !important;
  text-align: left !important;
}

.caat-support-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}

.caat-support-social-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 47px;
  min-width: 47px;
  height: 47px;
  padding: 0 !important;
  border: 1px solid var(--support-border) !important;
  border-radius: 14px;
  color: var(--support-text) !important;
  background: var(--support-icon-surface) !important;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.08);
  font-size: 1.25rem;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.caat-support-social-link:hover {
  color: var(--support-accent-strong) !important;
  border-color: var(--support-accent) !important;
  background: var(--support-accent-soft) !important;
  box-shadow: 0 13px 30px rgba(14, 116, 144, 0.16);
  transform: translateY(-3px);
}

.caat-support-social-link:focus-visible,
.caat-wallet-copy:focus-visible {
  outline: 3px solid var(--support-accent) !important;
  outline-offset: 3px !important;
}

.caat-support-donation {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--support-border);
  border-radius: 22px;
  background: var(--support-surface-strong);
}

.caat-donation-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caat-ethereum-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--support-border);
  border-radius: 14px;
  color: var(--support-accent);
  background: var(--support-accent-soft);
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 900;
}

.caat-donation-heading strong {
  display: block;
  color: var(--support-text);
  font-size: 1rem;
  line-height: 1.35;
}

.caat-donation-heading span {
  display: block;
  margin-top: 3px;
  color: var(--support-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.caat-wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
  margin-top: 17px;
}

.caat-wallet-address {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  margin: 0 !important;
  padding: 11px 13px;
  overflow-wrap: anywhere;
  border: 1px solid var(--support-border);
  border-radius: 12px;
  color: var(--support-text) !important;
  background: var(--support-code-surface) !important;
  font-family:
    Consolas,
    "SFMono-Regular",
    "Liberation Mono",
    monospace;
  font-size: 0.77rem;
  line-height: 1.5;
}

.caat-wallet-copy {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 48px;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 1px solid var(--support-accent) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  background: var(--support-accent-strong) !important;
  box-shadow: none !important;
  font-family: var(--crl-font-main, "Inter", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  text-transform: none !important;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

html[data-theme="dark"] .caat-wallet-copy {
  color: #06202a !important;
}

.caat-wallet-copy:hover {
  color: #ffffff !important;
  background: var(--support-accent-strong) !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

html[data-theme="dark"] .caat-wallet-copy:hover {
  color: #06202a !important;
}

.caat-wallet-copy.is-error {
  border-color: #ef4444 !important;
  color: #ffffff !important;
  background: #b91c1c !important;
}

.caat-support-warning {
  margin: 13px 0 0 !important;
  padding: 11px 12px;
  border: 1px solid rgba(194, 65, 12, 0.22);
  border-radius: 11px;
  color: var(--support-warning-text) !important;
  background: var(--support-warning-surface) !important;
  font-size: 0.76rem !important;
  font-weight: 700;
  line-height: 1.55 !important;
  text-align: left !important;
}

.caat-support-maintainer {
  margin: 14px 0 0 !important;
  color: var(--support-muted) !important;
  font-size: 0.78rem !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

.caat-support-maintainer a {
  color: var(--support-accent-strong) !important;
  font-weight: 800;
}

@media (max-width: 900px) {
  .caat-support-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .caat-support-section {
    margin-top: 28px !important;
    margin-bottom: 42px !important;
  }

  .caat-support-card {
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
  }

  .caat-support-donation {
    padding: 17px;
    border-radius: 18px;
  }

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

  .caat-wallet-copy {
    width: 100%;
  }

  .caat-support-social-link {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caat-support-social-link,
  .caat-wallet-copy {
    transition: none !important;
  }
}

/* CaaT support section fixes v2: start */

.caat-support-section .caat-ethereum-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

body:not(.crl-home) .caat-support-section .caat-wallet-copy {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-width: 132px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 1px solid #0e7490 !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  background: #155e75 !important;
  background-color: #155e75 !important;
  background-image: none !important;
  box-shadow: none !important;
  font-family: var(--crl-font-main, "Inter", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  text-transform: none !important;
}

body:not(.crl-home) .caat-support-section .caat-wallet-copy:hover {
  color: #ffffff !important;
  background: #0e7490 !important;
  background-color: #0e7490 !important;
  background-image: none !important;
  filter: brightness(1.04);
  transform: translateY(-1px);
}

html[data-theme="dark"] body:not(.crl-home)
  .caat-support-section .caat-wallet-copy {
  border-color: #5ee7f7 !important;
  color: #06202a !important;
  background: #8bf3df !important;
  background-color: #8bf3df !important;
  background-image: none !important;
}

html[data-theme="dark"] body:not(.crl-home)
  .caat-support-section .caat-wallet-copy:hover {
  color: #04191f !important;
  background: #5ee7f7 !important;
  background-color: #5ee7f7 !important;
  background-image: none !important;
}

body:not(.crl-home) .caat-support-section .caat-wallet-copy.is-error,
html[data-theme="dark"] body:not(.crl-home)
  .caat-support-section .caat-wallet-copy.is-error {
  border-color: #ef4444 !important;
  color: #ffffff !important;
  background: #b91c1c !important;
  background-color: #b91c1c !important;
  background-image: none !important;
}

/* CaaT support section fixes v2: end */
