/* Aimer Core — forms, booking, chat and consent. Uses theme tokens with safe fallbacks. */
.aimer-form, .aimer-chat, .aimer-consent, .aimer-success {
	--af-gold: var(--wp--preset--color--gold, #F1BD05);
	--af-gold-deep: var(--wp--preset--color--gold-deep, #7A5C00);
	--af-char: var(--wp--preset--color--charcoal, #000000);
	--af-muted: var(--wp--preset--color--muted, #5E5E62);
	--af-line: var(--wp--preset--color--line, #E3E3E3);
	--af-ivory: var(--wp--preset--color--ivory, #F6F6F6);
	--af-error: #B3261E;
}
.aimer-form { background: #fff; border: 1px solid var(--af-line); border-radius: 4px; padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: 0 18px 40px -28px rgba(0,0,0,.35); color: var(--af-char); }
.aimer-form__title { margin: 0 0 .5rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.aimer-form__intro { color: var(--af-muted); margin: 0 0 1.25rem; }
.aimer-form__grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .aimer-form__grid { grid-template-columns: 1fr 1fr; } .aimer-field--full { grid-column: 1 / -1; } }
.aimer-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.aimer-field label { font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
.aimer-req { color: var(--af-gold-deep); }
.aimer-field input, .aimer-field select, .aimer-field textarea {
	font: inherit; font-size: 16px; /* 16px prevents iOS zoom on focus */
	color: var(--af-char); background: #fff; border: 1px solid #C9C9C9; border-radius: 3px;
	padding: .8rem .9rem; min-height: 48px; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s;
}
.aimer-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000000' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 22px; padding-right: 2.4rem; }
.aimer-field textarea { min-height: 110px; resize: vertical; }
.aimer-field input:focus, .aimer-field select:focus, .aimer-field textarea:focus { border-color: var(--af-char); box-shadow: 0 0 0 3px rgba(241,189,5,.45); outline: none; }
.aimer-field [aria-invalid="true"] { border-color: var(--af-error); background: #FFF8F7; }
.aimer-field__error { color: var(--af-error); font-size: .8125rem; font-weight: 600; min-height: 0; }
.aimer-field__error:empty { display: none; }
.aimer-form__consent { margin: 1.25rem 0 1rem; display: grid; gap: .6rem; }
.aimer-check { display: flex; gap: .65rem; align-items: flex-start; font-size: .8125rem; line-height: 1.5; color: var(--af-muted); cursor: pointer; }
.aimer-check input { width: 20px; height: 20px; margin: .1rem 0 0; flex-shrink: 0; accent-color: var(--af-char); }
.aimer-check a { color: var(--af-gold-deep); }
.aimer-form__submit { width: 100%; margin-top: .5rem; font-size: .9375rem !important; min-height: 54px; }
.aimer-form__submit[disabled] { opacity: .65; cursor: progress; }
.aimer-form__fine { font-size: .75rem; color: var(--af-muted); text-align: center; margin: .75rem 0 0; }
.aimer-form__status { padding: .8rem 1rem; border-radius: 3px; margin-bottom: 1rem; font-size: .9375rem; font-weight: 600; background: #FFF4F3; color: var(--af-error); border: 1px solid #F3C7C3; }
.aimer-form__status[hidden] { display: none; }
.aimer-turnstile:not(:empty) { margin: .5rem 0 1rem; min-height: 65px; }
.aimer-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Appointment choices */
.aimer-appts { border: 0; padding: 0; margin: 0 0 1.25rem; }
.aimer-appts__legend { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--af-gold-deep); margin-bottom: .75rem; padding: 0; }
.aimer-appts__legend--step { margin: 0 0 .75rem; }
.aimer-appts__grid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .aimer-appts__grid { grid-template-columns: 1fr 1fr; } }
.aimer-appt { position: relative; display: block; cursor: pointer; }
.aimer-appt input { position: absolute; opacity: 0; inset: 0; }
.aimer-appt__body { display: flex; flex-direction: column; gap: .3rem; height: 100%; box-sizing: border-box; border: 1.5px solid var(--af-line); border-radius: 4px; padding: 1rem 1rem 1rem 2.8rem; background: #fff; transition: border-color .15s, background .15s; position: relative; }
.aimer-appt__body::before { content: ""; position: absolute; left: 1rem; top: 1.15rem; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #A9A296; background: #fff; }
.aimer-appt input:checked + .aimer-appt__body { border-color: var(--af-char); background: var(--af-ivory); }
.aimer-appt input:checked + .aimer-appt__body::before { border-color: var(--af-char); background: radial-gradient(circle, var(--af-gold) 0 45%, #fff 50%); }
.aimer-appt input:focus-visible + .aimer-appt__body { outline: 2px solid var(--af-char); outline-offset: 2px; box-shadow: 0 0 0 5px var(--af-gold); }
.aimer-appt__title { font-weight: 700; font-size: 1rem; }
.aimer-appt__meta { font-size: .8125rem; font-weight: 700; color: var(--af-gold-deep); }
.aimer-appt__summary { font-size: .8125rem; color: var(--af-muted); line-height: 1.5; }

/* Success panel */
.aimer-success { background: #fff; border: 1px solid var(--af-line); border-top: 3px solid var(--af-gold); padding: 2rem; border-radius: 4px; display: grid; gap: 1rem; justify-items: start; }
.aimer-success:focus { outline: none; }
.aimer-success p { margin: 0; }
.aimer-success__title { font-size: 1.5rem; font-family: var(--wp--preset--font-family--serif, Georgia, serif); font-weight: 600; }
.aimer-next-steps { display: grid; gap: .5rem; }

/* Chat launcher + dialog */
.aimer-chat__launcher { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: 1.25rem; z-index: 70; display: inline-flex; align-items: center; gap: .55rem; background: var(--af-char); color: #fff; border: 0; border-radius: 999px; padding: .8rem 1.15rem; font: 700 .8125rem/1 var(--wp--preset--font-family--sans, sans-serif); letter-spacing: .04em; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); min-height: 48px; }
.aimer-chat__launcher .aimer-icon { color: var(--af-gold); }
.aimer-chat__launcher:hover { background: #000; }
@media (max-width: 781px) { .aimer-chat__launcher { bottom: calc(80px + env(safe-area-inset-bottom)); padding: .75rem; } .aimer-chat__launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.aimer-chat__dialog { border: 0; padding: 0; border-radius: 6px; width: min(440px, calc(100vw - 1.5rem)); max-height: min(720px, calc(100dvh - 2rem)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); margin: auto; overflow: auto; }
@media (min-width: 782px) { .aimer-chat__dialog { margin: auto 1.25rem 5.5rem auto; } }
.aimer-chat__dialog::backdrop { background: rgba(0,0,0,.45); }
.aimer-chat__head { display: flex; justify-content: space-between; align-items: center; background: var(--af-char); color: #fff; padding: .9rem 1.1rem; position: sticky; top: 0; z-index: 1; }
.aimer-chat__title { margin: 0; font-weight: 700; font-size: .9375rem; }
.aimer-chat__close { background: transparent; border: 0; color: #fff; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; }
.aimer-chat__body { padding: 1.1rem; }
.aimer-chat__greeting { margin: 0 0 .9rem; font-size: .9375rem; }
.aimer-chat__quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.aimer-chat__quick p { margin: 0; }
.aimer-chat .aimer-form { border: 0; box-shadow: none; padding: 0; }
.aimer-chat .aimer-form__grid { grid-template-columns: 1fr; }
.aimer-ai-note { position: fixed; left: 1rem; bottom: 1rem; z-index: 71; max-width: 320px; background: #fff; border: 1px solid var(--af-line, #E3E3E3); padding: .75rem 2.5rem .75rem 1rem; font-size: .8125rem; border-radius: 4px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.3); }
.aimer-ai-note__close { position: absolute; right: .25rem; top: .25rem; border: 0; background: transparent; font-size: 1.25rem; width: 36px; height: 36px; cursor: pointer; }

/* Consent banner */
.aimer-consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80; max-width: 560px; background: #fff; border: 1px solid var(--af-line); border-radius: 6px; padding: 1.1rem 1.25rem; box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); font-size: .875rem; color: var(--af-char); }
.aimer-consent[hidden] { display: none; }
.aimer-consent p { margin: 0 0 .9rem; }
.aimer-consent a { color: var(--af-gold-deep); }
.aimer-consent__actions { display: flex; gap: .6rem; justify-content: flex-end; }
@media (max-width: 781px) { .aimer-consent { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* Host override guard: some hosts (e.g. GoDaddy's "site designer" contrast fallback)
   inject high-specificity input styles that can wipe the field borders. The :not(#aimer-x)
   adds ID-level specificity so the form keeps its own look without !important. */
.aimer-form:not(#aimer-x) .aimer-field :is(input, select, textarea) { border: 1px solid #C9C9C9; background-color: #fff; color: var(--af-char); border-radius: 3px; }
.aimer-form:not(#aimer-x) .aimer-field :is(input, select, textarea):focus { border-color: var(--af-char); }
.aimer-form:not(#aimer-x) .aimer-field [aria-invalid="true"] { border-color: var(--af-error); background-color: #FFF8F7; }
