/* ===========================================================================
 * AverionHair integration - verify panel, certificate, rewards, tracking, toasts.
 * Reuses the child-theme tokens (--avh-*). Loads on any page using the plugin shortcodes.
 * ===========================================================================*/

/* --- Verify panel + tracking form (shared) -------------------------------- */
.avh-verify, .avh-track { max-width: 34rem; margin-inline: auto; }
.avh-verify__head, .avh-track .avh-verify__head { text-align: center; margin-bottom: 1.75rem; }
.avh-verify__head h1 { font-size: var(--avh-text-3xl, 2rem); }
.avh-verify__form { display: flex; flex-direction: column; gap: 1rem; }
.avh-verify__form label { display: flex; flex-direction: column; gap: .375rem; font-size: var(--avh-text-sm, .875rem); }
.avh-verify__form label span { font-weight: 500; color: var(--avh-black, #191410); }
.avh-verify__form input {
  height: 2.75rem; padding: 0 .875rem; border-radius: var(--avh-radius-md, .6rem);
  border: 1px solid rgba(25,20,16,.15); background: var(--avh-pure, #fff);
  font-family: var(--avh-font-body); font-size: 1rem; letter-spacing: .04em;
}
.avh-verify__form input:focus { outline: none; border-color: var(--avh-gold, #c29a4f); box-shadow: 0 0 0 2px rgba(194,154,79,.25); }
.avh-verify__result, .avh-track__result { margin-top: 1.25rem; text-align: center; min-height: 2rem; }

/* --- Certificate of authenticity ----------------------------------------- */
.avh-cert {
  margin-top: 2rem; padding: 1.75rem; border: 1px solid rgba(25,20,16,.14);
  border-radius: var(--avh-radius-lg, 1rem); background: #fff; color: #191410;
}
.avh-cert__head { text-align: center; margin-bottom: 1.25rem; }
.avh-cert__title { font-family: var(--avh-font-heading); font-size: var(--avh-text-xl, 1.6rem); }
.avh-cert__grid { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.avh-cert__codes { display: grid; gap: 1rem; margin: 0; }
.avh-cert__codes dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; color: rgba(25,20,16,.55); }
.avh-cert__mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.15rem; letter-spacing: .08em; margin: .15rem 0 0; }
.avh-cert__qr { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.avh-cert__note { margin-top: 1.25rem; font-size: var(--avh-text-sm, .875rem); color: rgba(25,20,16,.6); }
.avh-qr { width: 148px; height: 148px; display: flex; align-items: center; justify-content: center; }
.avh-qr img, .avh-qr canvas { display: block; }
.avh-qr__fallback { font-size: .8rem; text-decoration: underline; color: var(--avh-gold, #c29a4f); text-align: center; }

/* Print: isolate the certificate (browsers drop backgrounds when printing). */
@media print {
  body * { visibility: hidden; }
  .avh-cert, .avh-cert * { visibility: visible; }
  .avh-cert { position: absolute; inset: 0 auto auto 0; width: 100%; border: none; }
}

/* --- Rewards + referral --------------------------------------------------- */
.avh-rewards { display: flex; flex-direction: column; gap: .75rem; }
.avh-rewards__tier { display: flex; align-items: center; gap: 1rem; }
.avh-rewards__points { margin: 0; font-size: var(--avh-text-lg, 1.25rem); }
.avh-rewards__points strong { font-family: var(--avh-font-heading); }
.avh-referral { display: flex; flex-direction: column; gap: .5rem; }
.avh-referral__link input {
  width: 100%; height: 2.75rem; padding: 0 .875rem; border-radius: var(--avh-radius-md, .6rem);
  border: 1px solid rgba(25,20,16,.15); background: var(--avh-pure, #fff); font-size: .9rem;
}

/* --- Tracking result card ------------------------------------------------- */
.avh-track__card { text-align: left; border: 1px solid rgba(25,20,16,.1); border-radius: var(--avh-radius-lg, 1rem); padding: 1.25rem; background: var(--avh-surface-raised, #ece0cf); }
.avh-track__card dl { display: grid; gap: .5rem; margin: 0 0 1rem; }
.avh-track__card dl > div { display: flex; justify-content: space-between; gap: 1rem; }
.avh-track__card dt { color: rgba(25,20,16,.55); font-size: .8rem; }
.avh-track__card dd { margin: 0; font-weight: 500; }

/* --- Toast ---------------------------------------------------------------- */
.avh-toast {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200;
  max-width: 22rem; padding: .875rem 1.125rem; border-radius: var(--avh-radius-md, .6rem);
  background: var(--avh-black, #191410); color: #fff; box-shadow: var(--avh-shadow-luxe);
  font-size: var(--avh-text-sm, .875rem);
  opacity: 0; transform: translateY(.75rem); transition: opacity .24s var(--avh-ease-luxe), transform .24s var(--avh-ease-luxe);
}
.avh-toast.is-in { opacity: 1; transform: translateY(0); }
.avh-toast--success { background: var(--avh-success, #3f7d5f); }
.avh-toast--info { background: var(--avh-ink-soft, #2a221a); }
