/* ============================================================
   KIDS AND FUN THEME  —  theme-kidsandfun
   Portal: kids-and-fun-za-v4  |  www.kidsandfun.net
   Design authority: legacy kidsandfun.net
   ============================================================ */

/* ── Web fonts (company CDN) ──────────────────────────────── */
@font-face {
  font-family: 'CircularStd-Book';
  src: url('https://d2obs2d3lmpnq9.cloudfront.net/Collections/fun/fonts/CircularStd-Book.otf')
       format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CircularStd-Medium';
  src: url('https://d2obs2d3lmpnq9.cloudfront.net/Collections/fun/fonts/CircularStd-Medium.otf')
       format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CircularStd-Bold';
  src: url('https://d2obs2d3lmpnq9.cloudfront.net/Collections/fun/fonts/CircularStd-Bold.otf')
       format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Blinker-Bold';
  src: url('https://d2obs2d3lmpnq9.cloudfront.net/Collections/fun/fonts/Blinker-Bold.ttf')
       format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Design tokens ────────────────────────────────────────── */
.theme-kidsandfun {
  /* Brand palette */
  --kaf-pink:    #f94593;
  --kaf-yellow:  #f6b93b;
  --kaf-blue:    #7acefa;
  --kaf-bg:      #f9f9f9;
  --kaf-text:    #4d4d4d;
  --kaf-text-muted: #6f6f6f;
  --kaf-white:   #ffffff;
  --kaf-border:  #e5e5e5;

  /* Semantic tokens — override shadcn/globals defaults */
  --background:               var(--kaf-bg);
  --foreground:               var(--kaf-text);
  --primary:                  var(--kaf-pink);
  --color-primary:            var(--kaf-pink);
  --primary-foreground:       var(--kaf-white);
  --secondary:                var(--kaf-yellow);
  --secondary-foreground:     var(--kaf-text);
  --muted:                    #f0f0f0;
  --muted-foreground:         var(--kaf-text-muted);
  --accent:                   var(--kaf-blue);
  --accent-foreground:        var(--kaf-text);
  --border:                   var(--kaf-border);
  --input:                    var(--kaf-border);
  --ring:                     var(--kaf-pink);

  /* Color overrides used throughout components */
  --color-bg-base:            var(--kaf-bg);
  --color-bg-card:            var(--kaf-white);
  --color-text-base:          var(--kaf-text);
  --color-text-muted:         var(--kaf-text-muted);
  --color-text-inverse:       var(--kaf-white);
  --color-border:             var(--kaf-border);
  --color-input-bg:           var(--kaf-white);
  --color-input-border:       var(--kaf-border);
  --color-error:              #e74c3c;
  --color-success:            #27ae60;

  /* Header */
  --header-bg:                var(--kaf-white);
  --header-shadow:            0 2px 8px rgba(0, 0, 0, 0.08);
  --header-border:            var(--kaf-border);

  /* Footer */
  --footer-bg:                var(--kaf-bg);
  --footer-border:            var(--kaf-border);

  /* Typography */
  --font-body:    'CircularStd-Book', Arial, Helvetica, sans-serif;
  --font-heading: 'Blinker-Bold', Arial, Helvetica, sans-serif;

  /* Font family aliases used by page.tsx / unsubscribe / webs-sdk components */
  --font-family-base:    var(--font-body);
  --font-family-display: var(--font-heading);

  /* Light-mode override for dark globals (login card, signup card use --neutral-* directly) */
  --neutral-950:          var(--kaf-white);
  --neutral-900:          var(--kaf-bg);
  --neutral-800:          var(--kaf-border);
  --neutral-700:          var(--kaf-text-muted);
  --neutral-600:          var(--kaf-text-muted);
  /* shadcn card/popover tokens — override dark defaults */
  --card:                 var(--kaf-white);
  --card-foreground:      var(--kaf-text);
  --popover:              var(--kaf-white);
  --popover-foreground:   var(--kaf-text);

  /* Motion */
  --motion-duration-fast:   150ms;
  --motion-duration-normal: 200ms;
  --motion-ease-standard:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-btn:  999px;
  --radius-card: 16px;
  --radius:      8px;
}

/* ── Body font override ────────────────────────────────────── */
.theme-kidsandfun {
  font-family: var(--font-body);
  color: var(--kaf-text);
  background-color: var(--kaf-bg);
}

.theme-kidsandfun main {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* The global header overlays page heroes, but loading placeholders must begin
   below it so skeleton content remains fully visible. */
.theme-kidsandfun .page-loading-skeleton {
  margin-top: 111px;
}

@media (min-width: 992px) {
  .theme-kidsandfun .page-loading-skeleton {
    margin-top: 139px;
  }
}

/* Keep Bricolage available for the upfront/docs sub-tree */
.theme-kidsandfun [data-upfront-docs] {
  font-family: var(--font-bricolage), Arial, sans-serif;
}

/* ── Header layout ─────────────────────────────────────────── */
.theme-kidsandfun .kaf-header {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.theme-kidsandfun .kaf-header--solid {
  background: var(--kaf-white);
  border-bottom: 0;
  box-shadow: 0 4px 18px rgba(51, 42, 61, 0.06);
}

.theme-kidsandfun .kaf-header--channel {
  background: #f8f0e5;
  border-bottom: 0;
  box-shadow: none;
}

.theme-kidsandfun .kaf-header__inner {
  width: calc(100% - 96px);
  max-width: 1800px;
  min-height: 96px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
}

/* Desktop breakpoint — 992 px */
@media (min-width: 992px) {
  .theme-kidsandfun .kaf-header__inner {
    height: 139px;
    padding: 0;
    display: grid;
    grid-template-columns: 25% 1fr 25%;
    align-items: center;
  }

  .theme-kidsandfun .kaf-header__logo {
    grid-column: 1;
    justify-self: start;
    transform: translateY(10.484px);
  }

  .theme-kidsandfun .kaf-header__auth {
    grid-column: 3;
    justify-self: end;
    margin-top: 5px;
    margin-right: 5px;
  }

  .theme-kidsandfun .kaf-desktop\:flex { display: flex !important; }
  .theme-kidsandfun .kaf-desktop\:hidden { display: none !important; }
}

@media (max-width: 991px) {
  .theme-kidsandfun .kaf-header__inner {
    width: 100%;
    min-height: 111px;
    margin: 0;
    padding: 31px 24px 0;
  }

  .theme-kidsandfun .kaf-header__logo {
    flex: 1;
  }

  .theme-kidsandfun .kaf-header__mobile-controls {
    width: 44px;
    flex: 0 0 44px;
    gap: 0;
    margin-top: 8px;
  }

  .theme-kidsandfun .kaf-header__mobile-controls > .kaf-btn-auth-icon,
  .theme-kidsandfun .kaf-header__mobile-controls > button:not(.kaf-btn-auth-icon) {
    display: none !important;
  }

  .theme-kidsandfun .kaf-desktop\:flex { display: none !important; }
  .theme-kidsandfun .kaf-desktop\:hidden { display: flex !important; }
}

/* Logo image sizing */
.theme-kidsandfun .kaf-logo-img {
  width: 138px;   /* mobile */
  height: auto;
  max-height: 25px;
  object-fit: contain;
}

@media (min-width: 992px) {
  .theme-kidsandfun .kaf-logo-img {
    width: 221.921875px;
    max-height: 40px;
  }
}

.theme-kidsandfun .kaf-logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--kaf-pink);
  text-decoration: none;
}

/* Auth button */
.theme-kidsandfun .kaf-btn-auth {
  font-family: var(--font-body);
  font-size: 0.875rem;
  border-radius: var(--radius-btn);
  background: var(--kaf-pink);
  color: var(--kaf-white);
  padding: 6px 18px;
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard);
}

.theme-kidsandfun .kaf-btn-auth:hover {
  opacity: 0.88;
}

.theme-kidsandfun .kaf-btn-auth-icon {
  color: var(--kaf-text);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--motion-duration-fast) var(--motion-ease-standard);
}

.theme-kidsandfun .kaf-btn-auth-icon:hover {
  color: var(--kaf-pink);
}

.theme-kidsandfun .kaf-hamburger {
  color: var(--kaf-text);
}

/* ── Age/profile selector ──────────────────────────────────── */
.theme-kidsandfun .kaf-header__profile {
  position: relative;
  width: 72px;
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-kidsandfun .kaf-age-selector {
  position: relative;
}

.theme-kidsandfun .kaf-profile-icon--avatar {
  box-sizing: border-box;
  padding: 0;
  border: 5px solid #7dc8f5;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.theme-kidsandfun .kaf-age-selector__trigger {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.theme-kidsandfun .kaf-age-selector__trigger:focus-visible {
  outline: 3px solid var(--kaf-yellow);
  outline-offset: 3px;
}

.theme-kidsandfun .kaf-header__profile .kaf-age-selector__trigger {
  width: 72px;
  height: 72px;
  margin-top: -2px;
  padding: 6px;
}

.theme-kidsandfun [data-kaf-auth-icon] {
  position: absolute;
  top: 5px;
  right: 0;
  z-index: 3;
  width: 25px;
  height: 25px;
  min-width: 25px;
  padding: 0;
  border-radius: 50%;
  color: var(--kaf-text);
  background: var(--kaf-white);
}

.theme-kidsandfun [data-kaf-auth-icon] svg {
  width: 25px;
  height: 25px;
}

.theme-kidsandfun .kaf-profile-icon {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.theme-kidsandfun .kaf-age-selector__trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.theme-kidsandfun .kaf-age-selector__current {
  display: flex;
  min-width: 68px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--kaf-blue);
  font-family: var(--font-heading);
  font-size: 13px;
  line-height: 1;
}

.theme-kidsandfun .kaf-age-selector__avatar {
  display: block;
  width: 54px;
  height: 54px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: hidden;
  border: 4px solid #bde6fd;
  border-radius: 999px;
  background: #bde6fd;
  object-fit: cover;
  clip-path: circle(50%);
}

.theme-kidsandfun .kaf-age-selector__trigger:focus-visible {
  border-radius: 10px;
  outline: 3px solid var(--kaf-blue);
  outline-offset: 2px;
}

@media (max-width: 991px) {
  .theme-kidsandfun .kaf-age-selector__trigger {
    width: 44px;
    height: 44px;
  }

  .theme-kidsandfun .kaf-profile-icon {
    width: 44px;
    height: 44px;
  }

  .theme-kidsandfun .kaf-age-selector__current {
    min-width: 48px;
    font-size: 11px;
  }

  .theme-kidsandfun .kaf-age-selector__avatar {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
}

.theme-kidsandfun .kaf-age-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  min-width: 0;
  overflow: auto;
  pointer-events: auto;
  background: #001a42;
}

.theme-kidsandfun .kaf-age-modal__body {
  min-height: 100dvh;
  padding: 54px 74px 42px;
  background: #001a42;
}

.theme-kidsandfun .kaf-age-modal__header {
  display: flex;
  width: 100%;
  min-height: 100px;
  align-items: flex-start;
  justify-content: space-between;
}

.theme-kidsandfun .kaf-age-modal__back,
.theme-kidsandfun .kaf-age-modal__continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 30px;
  background: var(--kaf-yellow);
  color: var(--kaf-white);
  font-family: var(--font-heading);
  font-weight: 400;
  cursor: pointer;
}

.theme-kidsandfun .kaf-age-modal__back {
  min-width: 85px;
  min-height: 48px;
  gap: 8px;
  margin-top: 22px;
  padding: 15px 18px;
  font-size: 14px;
  line-height: 18px;
}

.theme-kidsandfun .kaf-age-modal__back > svg {
  display: block;
  width: 10px;
  height: 18px;
  flex: 0 0 auto;
}

.theme-kidsandfun .kaf-age-modal__kidsafe {
  display: block;
  width: 189px;
  height: 103px;
  margin: -3px -3px -48px 0;
}

.theme-kidsandfun .kaf-age-modal__kidsafe iframe {
  display: block;
  width: 200px;
  height: 112px;
  border: 0;
  pointer-events: none;
}

.theme-kidsandfun .kaf-age-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 70px;
}

.theme-kidsandfun .kaf-age-modal__content h2 {
  width: min(700px, 100%);
  margin: 0;
  color: var(--kaf-blue);
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.theme-kidsandfun .kaf-age-modal__cards {
  display: grid;
  grid-template-columns: repeat(3, 235px);
  width: 750px;
  margin-top: 70px;
  padding: 0 22px;
  overflow: visible;
}

.theme-kidsandfun .kaf-age-card {
  position: relative;
  display: flex;
  width: 235px;
  min-width: 235px;
  min-height: 333px;
  flex-direction: column;
  align-items: center;
  padding: 12px 9px;
  border: 0;
  background: transparent;
  color: var(--kaf-text);
  cursor: pointer;
  font-family: var(--font-body);
}

.theme-kidsandfun .kaf-age-card__image {
  position: relative;
  display: block;
  width: 217px;
  height: 217px;
  overflow: visible;
  isolation: isolate;
  border: 8px solid transparent;
  border-radius: 50%;
}

.theme-kidsandfun .kaf-age-card__image::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  box-shadow: inset 2px 13px 11px rgba(0, 0, 0, 0.2),
              inset 1px 6px 5px rgba(0, 0, 0, 0.2);
  content: '';
  pointer-events: none;
}

.theme-kidsandfun .kaf-age-card__image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.theme-kidsandfun .kaf-age-card--selected .kaf-age-card__image {
  border-color: var(--kaf-yellow);
}

.theme-kidsandfun .kaf-age-card:focus-visible {
  outline: 3px solid var(--kaf-yellow);
  outline-offset: 2px;
  border-radius: 18px;
}

.theme-kidsandfun .kaf-age-card__name {
  width: 100%;
  min-height: 38px;
  margin-top: 18px;
  color: var(--kaf-white);
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 19px;
  text-align: center;
}

.theme-kidsandfun .kaf-age-card__range {
  width: 100%;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 19px;
  text-align: center;
}

.theme-kidsandfun .kaf-age-card__lock {
  position: absolute;
  right: 50%;
  bottom: -54px;
  display: flex;
  width: 90px;
  height: 90px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0;
  color: var(--kaf-white);
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.25));
  transform: translateX(50%);
}

.theme-kidsandfun .kaf-age-modal__continue {
  min-height: 60px;
  margin-top: 55px;
  padding: 18px 24px;
  font-size: 20px;
  line-height: 24px;
}

.theme-kidsandfun .kaf-age-modal__continue:disabled {
  cursor: default;
}

.theme-kidsandfun .kaf-age-modal__back:hover,
.theme-kidsandfun .kaf-age-modal__continue:not(:disabled):hover {
  background: #e2a429;
}

.theme-kidsandfun .kaf-age-modal__back:focus-visible,
.theme-kidsandfun .kaf-age-modal__continue:focus-visible {
  outline: 3px solid var(--kaf-white);
  outline-offset: 3px;
}

@media (max-width: 991px) {
  .theme-kidsandfun .kaf-age-modal__body {
    min-width: 100%;
    padding: 33px 0 34px;
  }

  .theme-kidsandfun .kaf-age-modal__header {
    min-height: 100px;
  }

  .theme-kidsandfun .kaf-age-modal__back {
    margin-left: 23px;
  }

  .theme-kidsandfun .kaf-age-modal__kidsafe {
    margin-right: 0;
  }

  .theme-kidsandfun .kaf-age-modal__content {
    margin-top: 70px;
  }

  .theme-kidsandfun .kaf-age-modal__content h2 {
    width: 315px;
    font-size: 20px;
    line-height: 24px;
  }

  .theme-kidsandfun .kaf-age-modal__cards {
    display: flex;
    width: 100%;
    margin-top: 30px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .theme-kidsandfun .kaf-age-modal__cards::-webkit-scrollbar {
    display: none;
  }

  .theme-kidsandfun .kaf-age-card {
    width: 210px;
    min-width: 210px;
    min-height: 314px;
    padding: 12px 6px;
    scroll-snap-align: start;
  }

  .theme-kidsandfun .kaf-age-card__image {
    width: 198px;
    height: 198px;
  }

  .theme-kidsandfun .kaf-age-modal__continue {
    min-height: 48px;
    margin-top: 55px;
    padding: 15px 18px;
    font-size: 14px;
    line-height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-kidsandfun .kaf-age-modal *,
  .theme-kidsandfun .kaf-age-modal *::before,
  .theme-kidsandfun .kaf-age-modal *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Footer: styled in src/styles/kaf-footer.css (legacy parity). */

/* ── Cookie consent: legacy Kids and Fun treatment ─────────── */
.theme-kidsandfun .cc-overlay {
  padding: 24px 0;
}

.theme-kidsandfun .cc-banner {
  display: block;
  width: 80%;
  max-width: none;
  padding: 18px 72px;
  border-radius: 0 !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.36) !important;
}

.theme-kidsandfun .cc-content {
  min-height: 55px;
}

.theme-kidsandfun .cc-title {
  display: none;
}

.theme-kidsandfun .cc-description {
  color: #323232;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 200;
  line-height: 22.5px;
  padding: 6px 17px 0 0;
  opacity: 1;
}

.theme-kidsandfun .cc-link,
.theme-kidsandfun .cc-inline-settings {
  color: #6b4600 !important;
  font-weight: 700;
}

.theme-kidsandfun .cc-inline-settings {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.theme-kidsandfun .cc-config-link {
  display: none;
}

.theme-kidsandfun .cc-actions {
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-right: 6px;
}

.theme-kidsandfun .cc-btn {
  min-height: 32px;
  padding: 6px 24px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
}

.theme-kidsandfun .cc-btn-essential {
  order: 1;
  background: var(--kaf-yellow) !important;
  border-color: var(--kaf-yellow) !important;
  color: #1a1a1a !important;
}

.theme-kidsandfun .cc-btn-accept,
.theme-kidsandfun .cc-settings-footer .cc-btn {
  background: var(--kaf-yellow) !important;
  color: #1a1a1a !important;
}

.theme-kidsandfun .cc-btn-accept {
  order: 2;
}

.theme-kidsandfun .cc-btn:hover,
.theme-kidsandfun .cc-inline-settings:hover {
  opacity: 0.82;
}

@media (max-width: 639px) {
  .theme-kidsandfun .cc-overlay {
    padding: 3px 0;
  }

  .theme-kidsandfun .cc-banner {
    width: 98%;
    padding: 18px 5vw;
  }

  .theme-kidsandfun .cc-description {
    font-size: 15px;
  }

  .theme-kidsandfun .cc-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
  }

  .theme-kidsandfun .cc-btn {
    width: 100%;
    margin: 0;
  }
}

/* ── SDK data-slot overrides ───────────────────────────────── */

/* Buttons */
.theme-kidsandfun [data-slot="button"][data-variant="default"],
.theme-kidsandfun [data-slot="button"]:not([data-variant]) {
  background: var(--kaf-pink);
  color: var(--kaf-white);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 500;
  transition:
    opacity var(--motion-duration-fast) var(--motion-ease-standard),
    box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
}

.theme-kidsandfun [data-slot="button"][data-variant="default"]:hover,
.theme-kidsandfun [data-slot="button"]:not([data-variant]):hover {
  background: #df347f;
  opacity: 1;
  box-shadow: 0 7px 18px rgba(249, 69, 147, 0.2);
}

.theme-kidsandfun [data-slot="button"][data-variant="outline"] {
  border-color: color-mix(in srgb, var(--kaf-pink) 42%, transparent);
  color: var(--kaf-pink);
  border-radius: var(--radius-btn);
}

.theme-kidsandfun [data-slot="button"][data-variant="ghost"] {
  color: var(--kaf-text);
  border-radius: var(--radius-btn);
}

.theme-kidsandfun [data-slot="button"][data-variant="link"] {
  color: var(--kaf-text-muted);
  font-size: 0.8rem;
}

.theme-kidsandfun [data-slot="button"][data-variant="link"]:hover {
  color: var(--kaf-pink);
}

/* Legacy auth controls use the template button class system rather than data-slot. */
.theme-kidsandfun .btn-primary,
.theme-kidsandfun .btn-tertiary {
  background: var(--kaf-pink) !important;
  background-color: var(--kaf-pink) !important;
  color: var(--kaf-white) !important;
  border-color: transparent !important;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
}

.theme-kidsandfun .btn-primary:hover:not(:disabled),
.theme-kidsandfun .btn-tertiary:hover:not(:disabled) {
  background: #df347f !important;
  background-color: #df347f !important;
  box-shadow: 0 7px 18px rgba(249, 69, 147, 0.2);
}

.theme-kidsandfun .btn-primary:disabled,
.theme-kidsandfun .btn-tertiary:disabled {
  background: #f58abb !important;
  background-color: #f58abb !important;
  color: rgba(255, 255, 255, 0.78) !important;
  opacity: 1;
}

.theme-kidsandfun .login-page {
  min-height: 100%;
  flex: 1;
  align-items: center;
  background: var(--kaf-bg);
}

.theme-kidsandfun .login-page-inner {
  gap: 0;
  margin-top: 96px;
}

.theme-kidsandfun .login-page [data-slot="card"] {
  border-color: transparent;
  background: var(--kaf-white);
  box-shadow: 0 14px 40px rgba(51, 42, 61, 0.1);
}

.theme-kidsandfun .login-page [data-slot="input-group"] {
  border: 1px solid #ddd8df;
  border-radius: 12px;
  background: var(--kaf-white);
  box-shadow: none;
}

.theme-kidsandfun .login-page [data-slot="input-group"]:hover {
  border-color: #cfc7d0;
  opacity: 1;
}

.theme-kidsandfun .login-page [data-slot="input-group"]:focus-within {
  border-color: var(--kaf-pink);
  box-shadow: 0 0 0 3px rgba(249, 69, 147, 0.12);
}

/* General interactive elements */
.theme-kidsandfun :where(
  [data-slot="button"],
  [data-slot$="trigger"],
  [data-slot$="item"],
  [data-slot="navigation-menu-link"],
  [data-slot="tabs-trigger"]
) {
  transition-property: color, background-color, border-color, opacity, box-shadow;
  transition-duration: var(--motion-duration-fast);
  transition-timing-function: var(--motion-ease-standard);
}

/* Cards */
.theme-kidsandfun [data-slot="card"] {
  background: var(--kaf-white);
  border-color: transparent;
  border-radius: 16px;
}

/* Inputs */
.theme-kidsandfun [data-slot="input"],
.theme-kidsandfun [data-slot="textarea"] {
  background: var(--kaf-white);
  border-color: var(--kaf-border);
  color: var(--kaf-text);
  border-radius: var(--radius);
}

.theme-kidsandfun [data-slot="input"]:focus-visible,
.theme-kidsandfun [data-slot="textarea"]:focus-visible {
  --ring: var(--kaf-pink);
}

/* Dialog / overlay */
.theme-kidsandfun [data-slot="dialog-content"],
.theme-kidsandfun [data-slot="alert-dialog-content"] {
  background: var(--kaf-white);
  border-radius: var(--radius-card);
  color: var(--kaf-text);
}

/* Dropdown menus */
.theme-kidsandfun [data-slot="dropdown-menu-content"] {
  background: var(--kaf-white);
  border-color: var(--kaf-border);
  color: var(--kaf-text);
}

/* ── PasswordReset SDK component overrides ─────────────────── */
.theme-kidsandfun .pr-page {
  background-color: var(--kaf-bg);
  color: var(--kaf-text);
  font-family: var(--font-body);
}

.theme-kidsandfun .pr-card {
  background-color: var(--kaf-white);
  border-color: var(--kaf-border);
  border-radius: var(--radius-card);
}

.theme-kidsandfun .pr-title {
  color: var(--kaf-text);
  font-family: var(--font-heading);
}

.theme-kidsandfun .pr-subtitle,
.theme-kidsandfun .pr-label {
  color: var(--kaf-text-muted);
}

.theme-kidsandfun .pr-input {
  background: var(--kaf-white);
  border-color: var(--kaf-border);
  color: var(--kaf-text);
  border-radius: var(--radius-btn);
}

.theme-kidsandfun .pr-input:focus {
  border-color: var(--kaf-pink);
}

.theme-kidsandfun .pr-btn {
  background-color: var(--kaf-pink) !important;
  color: var(--kaf-white) !important;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 700;
}

.theme-kidsandfun .pr-error-msg {
  color: var(--color-error);
}

/* ── Focus states (WCAG 2.4.7) ───────────────────────────── */
/*
  Scoped entirely within .theme-kidsandfun so generic docs / other themes
  are unaffected. We rely on :focus-visible (keyboard/programmatic focus only).
*/
.theme-kidsandfun :focus-visible {
  outline: 2px solid var(--kaf-pink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Buttons and interactive slots get a soft glow in addition to the outline */
.theme-kidsandfun [data-slot='button']:focus-visible,
.theme-kidsandfun .kaf-btn-auth:focus-visible,
.theme-kidsandfun .age-selector-tab:focus-visible {
  outline: 2px solid var(--kaf-pink);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(249, 69, 147, 0.18);
}

/* Inputs — ring effect is handled by shadcn via --ring; add an extra outline */
.theme-kidsandfun [data-slot='input']:focus-visible,
.theme-kidsandfun [data-slot='textarea']:focus-visible {
  outline: 2px solid var(--kaf-pink);
  outline-offset: 0;
}

/* Anchors inside legal content */
.theme-kidsandfun .legal-content a:focus-visible,
.theme-kidsandfun .footer-legal a:focus-visible {
  outline: 2px solid var(--kaf-pink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Legal pages \ login — light-surface consistency ─────── */
/*
  .legal-page-container is set directly by the legal page.tsx for the wrapper
  div, so this selector is theme-safe and does not bleed into other pages.
  The login card uses CSS-module-generated classes that cannot be targeted here,
  but the .theme-kidsandfun overrides for --neutral-950 / --card in the token
  block above already make the card background light.
*/
.theme-kidsandfun .legal-page-container {
  background: var(--kaf-bg);
  color: var(--kaf-text);
}

/* Legal HTML links should use brand pink, not the default orange */
.theme-kidsandfun .legal-content a {
  color: var(--kaf-pink);
}

.theme-kidsandfun .legal-content a:hover {
  opacity: 0.8;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .theme-kidsandfun :where([data-slot]),
  .theme-kidsandfun .kaf-btn-auth,
  .theme-kidsandfun .age-selector-tab,
  .theme-kidsandfun .kaf-btn-auth-icon {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
