/* Phase 3: account, children, cart child picker, help/contact, certificate. */

/* ---------- account shell ---------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 500;
  text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
  color: #8a4a22;
}

.account-lead {
  color: var(--muted);
  margin: -6px 0 24px;
}

.woocommerce-account h1,
.woocommerce-account .account-title {
  font-family: var(--font-display);
  font-weight: 800;
}

/* orders table → cards */
.woocommerce-orders-table {
  border-collapse: separate;
  border-spacing: 0 12px;
}

.woocommerce-orders-table tbody tr {
  background: var(--cream);
  box-shadow: 0 0 0 1.5px var(--line);
  border-radius: 22px;
}

.woocommerce-orders-table td,
.woocommerce-orders-table th {
  padding: 16px 18px;
  border: 0;
}

.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
  font-weight: 700;
  color: #8a4a22;
}

.woocommerce-orders-table .button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

/* ---------- children ---------- */
.child-avatar {
  display: inline-block;
  flex-shrink: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background-color: var(--honey);
  background-size: 135%;
  background-position: 45% 12%;
  background-repeat: no-repeat;
}

.child-avatar--reading {
  background-color: var(--ink);
}

.child-avatar--celebrate {
  background-color: var(--gold);
}

.child-avatar--welcome {
  background-color: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.child-avatar--encouraging {
  background-color: var(--amber);
}

.child-avatar--listening {
  background-color: var(--sunlight);
}

.child-panel {
  margin-bottom: 28px;
}

.child-panel > summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
}

.child-panel > summary::-webkit-details-marker {
  display: none;
}

.child-panel[open] > summary {
  display: none;
}

.child-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px;
  border-radius: 28px;
  background: var(--honey);
}

.child-form label {
  font-weight: 600;
  font-size: 14px;
}

.child-form__name input {
  display: block;
  width: min(100%, 420px);
  height: 56px;
  margin-top: 8px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: 500 17px var(--font);
}

.child-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.child-form legend {
  width: 100%;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}

.child-form legend small {
  font-weight: 400;
  color: var(--muted);
}

.child-form__chips input,
.child-form__avatars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.child-form__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  white-space: nowrap;
}

.child-form__chips input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.child-form__chips input:focus-visible + span,
.child-form__avatars input:focus-visible + .child-avatar {
  outline: 3px solid #8d5820;
  outline-offset: 3px;
}

.child-form__avatars label {
  padding: 3px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
}

.child-form__avatars label:has(input:checked) {
  border-color: var(--ink);
}

.child-form__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400 !important;
  line-height: 1.7;
}

.child-form__consent input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ink);
  flex-shrink: 0;
}

.child-form .button {
  align-self: flex-start;
}

.child-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.child-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius-card);
}

.child-card--0 {
  background: var(--cream);
  border: 1.5px solid var(--line);
}

.child-card--1 {
  background: var(--ink);
  color: var(--cream);
}

.child-card--2 {
  background: var(--honey);
}

.child-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.child-card__head strong {
  display: block;
  font: 800 24px/1.3 var(--font-display);
}

.child-card__head small {
  font-size: 13px;
  opacity: 0.75;
  white-space: nowrap;
}

.child-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.child-card__actions .button {
  min-height: 44px;
  padding: 0 18px;
}

.child-card--1 .child-card__actions .button:not(.button-outline) {
  background: var(--sunlight);
  border-color: var(--sunlight);
  color: var(--ink);
}

.child-card--1 .button-outline {
  color: var(--cream);
  border-color: var(--muted);
}

.child-card .text-link {
  color: #8a4a22;
  font-size: 13px;
  border: 0;
  background: none;
}

.child-card--1 .text-link {
  color: var(--sunlight);
}

.onboarding-hint {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  margin-bottom: 24px;
  border-radius: 24px;
  border: 1.5px solid var(--ink);
}

.onboarding-hint__mascot {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex-shrink: 0;
}

.onboarding-hint strong {
  font: 800 22px var(--font-display);
}

.onboarding-hint p {
  margin: 2px 0 6px;
  color: var(--muted);
}

/* ---------- cart child picker ---------- */
.cart-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.cart-child > span {
  color: var(--muted);
  white-space: nowrap;
}

.cart-child label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px 0 5px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.cart-child label:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.cart-child input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cart-child label:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cart-child--product {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.cart-child--product legend {
  float: inline-start;
  margin-inline-end: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 34px;
}

.cart-child a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px dashed var(--rust);
  color: #8a4a22;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- help + contact (templates/help.php, templates/contact.php) ---------- */
.support-hero,
.page-template-help .entry-header,
.page-template-contact .entry-header {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  padding-block: 64px 56px;
  text-align: center;
}

.page-template-help .entry-header::after,
.page-template-contact .entry-header::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--sun);
  left: -120px;
  bottom: -240px;
}

.page-template-help h1,
.page-template-contact h1 {
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.faq details summary {
  font-weight: 600;
}

.contact-form,
.wpcf7-form {
  padding: 28px;
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 0 0 1.5px var(--line);
}

.contact-form input,
.contact-form textarea,
.wpcf7-form input:not([type="submit"]),
.wpcf7-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  font: 400 15px var(--font);
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-channels a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--cream);
  text-decoration: none;
}

.contact-channels .icon {
  width: 44px;
  height: 44px;
  padding: 12px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sunlight);
}

/* ---------- certificate (A4 landscape) ---------- */
.certificate {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 297 / 210;
  container-type: inline-size;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  border-radius: 12px;
  box-shadow:
    0 30px 50px -30px rgb(16 14 17 / 0.45),
    0 0 0 1px #e6dcc2;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.certificate__sun {
  position: absolute;
  width: 28cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  left: -13cqw;
  bottom: -14cqw;
}

.certificate__ring {
  position: absolute;
  width: 40cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0.15cqw solid var(--gold);
  left: -19cqw;
  bottom: -20cqw;
  opacity: 0.55;
}

.certificate__crest {
  position: absolute;
  right: 6cqw;
  top: -3.2cqw;
  display: flex;
  gap: 0.6cqw;
  align-items: flex-end;
}

.certificate__crest i {
  display: block;
  width: 2.2cqw;
  height: 7cqw;
  border-radius: 0 100%;
  background: var(--rust);
  transform-origin: bottom;
}

.certificate__crest i:nth-child(1) {
  transform: rotate(-14deg);
}

.certificate__crest i:nth-child(2) {
  height: 9cqw;
  background: var(--ink);
}

.certificate__crest i:nth-child(3) {
  border-radius: 100% 0;
  background: var(--gold);
  transform: rotate(14deg);
}

.certificate__frame {
  position: absolute;
  inset: 2.6cqw;
  border: 0.2cqw solid var(--ink);
  border-radius: 1.6cqw;
}

.certificate__frame--inner {
  inset: 3.3cqw;
  border-width: 0.08cqw;
  border-color: var(--gold);
  border-radius: 1.2cqw;
}

.certificate__body {
  position: absolute;
  inset: 6cqw 8cqw 5cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.certificate__logo {
  width: 22cqw;
}

.certificate__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.certificate__kicker {
  margin-top: 2.4cqw;
  font: 700 1.05cqw var(--font);
  letter-spacing: 0.35em;
  color: #8a4a22;
  white-space: nowrap;
}

.certificate h1 {
  margin: 0.6cqw 0 0;
  font: 900 4.6cqw/1.2 var(--font-display);
}

.certificate p {
  margin: 1.4cqw 0 0;
  max-width: none;
  font-size: 1.45cqw;
  color: var(--bark);
  white-space: nowrap;
}

.certificate__name {
  margin-top: 0.8cqw;
  font: 900 6.2cqw/1.15 var(--font-display);
}

.certificate__line {
  width: 28cqw;
  height: 0.12cqw;
  margin-top: 0.6cqw;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.certificate__course {
  margin-top: 0.4cqw;
  font: 800 2.8cqw var(--font-display);
  color: #8a4a22;
}

.certificate__sign {
  margin-top: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 4cqw;
  font-size: 1.05cqw;
  color: var(--muted);
}

.certificate__sign > span:not(.certificate__seal) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4cqw;
}

.certificate__sign i {
  display: block;
  width: 16cqw;
  height: 0.1cqw;
  background: var(--ink);
  margin-top: 2.4cqw;
}

.certificate__seal {
  width: 10cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  outline: 0.1cqw dashed var(--sunlight);
  outline-offset: -0.6cqw;
}

.certificate__seal img {
  width: 62%;
  height: 62%;
  border-radius: 50%;
}

.certificate__meta {
  margin-top: 1.4cqw;
  font-size: 0.95cqw;
  color: var(--muted);
  white-space: nowrap;
}

@media print {
  @page {
    size: a4 landscape;
    margin: 0;
  }

  body * {
    visibility: hidden;
  }

  .certificate,
  .certificate * {
    visibility: visible;
  }

  .certificate {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .hoopoe {
    display: none !important;
  }
}
