/* 24HR Tyre Services Core forms. Uses theme colour presets when present, with fallbacks. */
.hrtyre-form, .hrtyre-coverage, .hrtyre-dialog {
	--hr-accent: var(--wp--preset--color--lime, #caff38);
	--hr-ink: var(--wp--preset--color--ink, #111b23);
	--hr-line: #cfd9dd;
	--hr-muted: #5b6870;
	--hr-error: #b3261e;
	--hr-focus: var(--wp--custom--focus, #0c80db);
}
.hrtyre-form { display: grid; gap: 15px; position: relative; }
.hrtyre-form__heading { margin: 0; }
.hrtyre-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.hrtyre-field { grid-column: 1 / -1; display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.hrtyre-field.is-half { grid-column: span 1; }
.hrtyre-field > label, .hrtyre-field legend { font-weight: 750; font-size: .86rem; color: #253640; }
.hrtyre-form__req { color: var(--hr-error); }
.hrtyre-form__opt { color: #6f7b82; font-size: .76rem; font-weight: 400; }
.hrtyre-field input:not([type=checkbox]):not([type=radio]), .hrtyre-field select, .hrtyre-field textarea,
.hrtyre-coverage select, .hrtyre-coverage input {
	width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid var(--hr-line); border-radius: 10px;
	background: #fff; color: var(--hr-ink); font: inherit; font-size: 1rem; box-sizing: border-box;
}
.hrtyre-field textarea { min-height: 105px; resize: vertical; }
.hrtyre-form.is-compact textarea { min-height: 70px; }
.hrtyre-field input:focus-visible, .hrtyre-field select:focus-visible, .hrtyre-field textarea:focus-visible,
.hrtyre-coverage select:focus-visible, .hrtyre-coverage input:focus-visible, .hrtyre-form button:focus-visible {
	outline: 3px solid var(--hr-focus); outline-offset: 2px;
}
.hrtyre-field__help { font-size: .8rem; color: var(--hr-muted); }
.hrtyre-field__error { font-size: .82rem; color: var(--hr-error); font-weight: 700; }
.hrtyre-field.has-error input, .hrtyre-field.has-error select, .hrtyre-field.has-error textarea { border-color: var(--hr-error); border-width: 2px; }
.hrtyre-check { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; font-weight: 450; color: #4f5d67; line-height: 1.5; }
.hrtyre-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: #6f960a; flex: 0 0 auto; }
.hrtyre-check a { text-decoration: underline; }
.hrtyre-form__submit {
	width: 100%; min-height: 52px; border: 2px solid var(--hr-accent); border-radius: 11px; background: var(--hr-accent);
	color: var(--hr-ink); font-weight: 900; font-size: .95rem; cursor: pointer; transition: transform .15s, background-color .15s;
}
.hrtyre-form__submit:hover { background: #ddff84; transform: translateY(-2px); }
.hrtyre-form__submit[disabled] { opacity: .7; cursor: progress; transform: none; }
.hrtyre-form__foot { font-size: .8rem; margin: 0; color: var(--hr-muted); }
.hrtyre-form__foot a { color: #3e5a0a; font-weight: 900; }
.hrtyre-form__alert { border: 2px solid var(--hr-error); background: #fdf1f0; border-radius: 10px; padding: 12px 16px; color: #5c1410; }
.hrtyre-form__alert p { margin: 0 0 .3rem; color: inherit; font-weight: 700; }
.hrtyre-form__alert ul { margin: 0; padding-left: 1.2rem; }
.hrtyre-form__alert a { color: inherit; }
.hrtyre-form__trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.hrtyre-form__captcha { min-height: 78px; }

/* Area checker */
.hrtyre-coverage { background: #fff; border: 1px solid #d9e0e3; box-shadow: 0 10px 25px rgba(16,33,43,.14); border-radius: 15px; padding: 15px 17px; color: var(--hr-ink); }
.hrtyre-coverage__form { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(165px, 230px) minmax(130px, 170px) 190px; gap: 13px; align-items: center; margin: 0; }
.hrtyre-coverage__title { display: flex; align-items: center; gap: 12px; font-size: 1.09rem; margin: 0; color: var(--hr-ink) !important; }
.hrtyre-coverage__title::before { content: ""; width: 26px; height: 26px; flex: 0 0 auto; background: #6f960a;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.hrtyre-coverage button { min-height: 49px; border: 2px solid var(--hr-accent); border-radius: 11px; background: var(--hr-accent); color: var(--hr-ink); font-weight: 900; cursor: pointer; }
.hrtyre-coverage__result { margin-top: 13px; padding: 14px 16px; border-radius: 8px; background: #eff7e6; font-size: .93rem; }
.hrtyre-coverage__result p { margin: 0; color: var(--hr-ink); }
.hrtyre-coverage__result a { font-weight: 800; text-decoration: underline; }
@media (max-width: 940px) { .hrtyre-coverage__form { grid-template-columns: 1fr 1fr; } .hrtyre-coverage__title { grid-column: 1 / -1; } }
@media (max-width: 700px) {
	.hrtyre-form__grid, .hrtyre-coverage__form { grid-template-columns: 1fr; }
	.hrtyre-field.is-half { grid-column: 1 / -1; }
}

/* Pop-ups */
.hrtyre-dialog { width: min(95vw, 660px); max-height: 90vh; overflow: auto; border: 0; border-radius: 20px; padding: 25px 27px; box-shadow: 0 25px 90px rgba(0,0,0,.55); color: var(--hr-ink); background: #fff; }
.hrtyre-dialog::backdrop { background: rgba(2,10,15,.77); }
.hrtyre-dialog__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.hrtyre-dialog__top h2 { font-size: 1.9rem; margin: 0 0 6px; }
.hrtyre-dialog__top p { margin: 0; }
.hrtyre-dialog__kicker { font-size: .76rem !important; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #4d6908 !important; margin-bottom: 8px !important; }
.hrtyre-dialog__close { border: 0; background: #edf1f2; border-radius: 50%; width: 40px; height: 40px; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--hr-ink); flex: 0 0 auto; }
@media (max-width: 700px) { .hrtyre-dialog { padding: 22px 17px; } .hrtyre-dialog__top h2 { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { .hrtyre-form__submit:hover { transform: none; } }
