/**
 * SPRAY Site Core — front-end baseline styles.
 *
 * Scoped to plugin components only (quote form + shortcodes) so the form is
 * usable on ANY theme. Colours pull from CSS custom properties when the theme
 * defines them (spray-sheffield-theme does), with safe hard-coded fallbacks.
 */

:root {
	--spray-pink: #ec168f;
	--spray-pink-hover: #c81179;
	--spray-pink-accent: #ff4fb0;
	--spray-ink: #111217;
	--spray-card: #16181d;
	--spray-line: #2a2d34;
	--spray-muted: #6b7280;
	--spray-white: #ffffff;
	--spray-radius: 12px;
	--spray-radius-sm: 8px;
	--spray-focus: #ff4fb0;
}

/* ------------------------------------------------------------------ */
/* Buttons (shared)                                                    */
/* ------------------------------------------------------------------ */
.spray-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .85em 1.5em;
	border: 2px solid transparent;
	border-radius: var(--spray-radius-sm);
	font-weight: 800;
	font-size: 1rem;
	line-height: 1.1;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .05s ease;
	font-family: inherit;
	letter-spacing: .01em;
}
.spray-btn:active { transform: translateY(1px); }

.spray-btn--primary {
	background: var(--spray-pink);
	color: var(--spray-white);
	border-color: var(--spray-pink);
}
.spray-btn--primary:hover,
.spray-btn--primary:focus {
	background: var(--spray-pink-hover);
	border-color: var(--spray-pink-hover);
	color: var(--spray-white);
}

.spray-btn--secondary {
	background: #050505;
	color: var(--spray-white);
	border-color: #050505;
}
.spray-btn--secondary:hover,
.spray-btn--secondary:focus { background: #1b1d22; border-color: #1b1d22; color: #fff; }

.spray-btn--ghost {
	background: transparent;
	color: currentColor;
	border-color: currentColor;
}
.spray-btn--ghost:hover,
.spray-btn--ghost:focus {
	background: var(--spray-pink);
	border-color: var(--spray-pink);
	color: #fff;
}

.spray-btn--block { width: 100%; }

.spray-btn:focus-visible {
	outline: 3px solid var(--spray-focus);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Quote form                                                          */
/* ------------------------------------------------------------------ */
.spray-quote-form {
	--field-bg: #fff;
	--field-border: #cfd3da;
	--field-text: #15171c;
	max-width: 760px;
	margin: 0;
}

.spray-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.spray-field { margin: 0; }
.spray-field--full { grid-column: 1 / -1; }

.spray-field label,
.spray-contactmethod legend {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	font-size: .95rem;
}

.spray-field .req { color: var(--spray-pink); }
.spray-field .opt { color: var(--spray-muted); font-weight: 400; font-size: .85em; }

.spray-quote-form input[type="text"],
.spray-quote-form input[type="tel"],
.spray-quote-form input[type="email"],
.spray-quote-form select,
.spray-quote-form textarea {
	width: 100%;
	padding: .8em .9em;
	background: var(--field-bg);
	border: 1px solid var(--field-border);
	border-radius: var(--spray-radius-sm);
	font-size: 1rem;
	font-family: inherit;
	color: var(--field-text);
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.spray-quote-form textarea { resize: vertical; min-height: 120px; }

.spray-quote-form input:focus,
.spray-quote-form select:focus,
.spray-quote-form textarea:focus {
	outline: none;
	border-color: var(--spray-pink);
	box-shadow: 0 0 0 3px rgba(236, 22, 143, .18);
}

.spray-quote-form input[aria-invalid="true"],
.spray-quote-form select[aria-invalid="true"],
.spray-quote-form textarea[aria-invalid="true"] {
	border-color: #d63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, .14);
}

.spray-field-error {
	display: block;
	margin-top: 6px;
	color: #b32024;
	font-size: .85rem;
	font-weight: 600;
}

.spray-hint {
	display: block;
	margin-top: 6px;
	color: var(--spray-muted);
	font-size: .82rem;
}

/* Contact method radios */
.spray-contactmethod {
	border: 0;
	padding: 0;
	margin: 0;
}
.spray-contactmethod legend { padding: 0; }
.spray-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 16px 6px 0;
	font-weight: 500;
	cursor: pointer;
}
.spray-radio input { margin: 0; }

/* File input */
.spray-quote-form input[type="file"] {
	width: 100%;
	padding: .6em;
	background: #fff;
	border: 1px dashed var(--field-border);
	border-radius: var(--spray-radius-sm);
	font-size: .95rem;
	box-sizing: border-box;
}

/* Consent */
.spray-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 500;
	font-size: .92rem;
	line-height: 1.5;
}
.spray-consent input { margin-top: 3px; flex: 0 0 auto; }

/* Summary / alerts */
.spray-form-summary {
	grid-column: 1 / -1;
	padding: 12px 16px;
	margin-bottom: 4px;
	background: #fff4f4;
	border: 1px solid #f2b6b7;
	border-left: 4px solid #d63638;
	border-radius: var(--spray-radius-sm);
	color: #8a1f22;
}

.spray-form-actions { margin-top: 20px; }
.spray-form-note {
	margin: 12px 0 0;
	font-size: .92rem;
	color: var(--spray-muted);
}
.spray-form-note a { font-weight: 700; }

/* Honeypot — visually hidden, still in the DOM for bots. */
.spray-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Success state */
.spray-quote-success {
	text-align: center;
	padding: 36px 24px;
	background: var(--spray-card, #16181d);
	color: #fff;
	border-radius: var(--spray-radius);
	border: 1px solid var(--spray-line, #2a2d34);
}
.spray-quote-success__icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 14px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(26, 126, 90, .16);
	color: #2fd58a;
}
.spray-quote-success h2 { margin: 0 0 8px; color: #fff; }
.spray-quote-success p { margin: 0 0 8px; color: #c9ccd3; }
.spray-quote-success__cta { margin-top: 18px; }

/* ------------------------------------------------------------------ */
/* CTA shortcode                                                       */
/* ------------------------------------------------------------------ */
.spray-cta { border-radius: var(--spray-radius); }
.spray-cta--band {
	background: linear-gradient(120deg, #050505 0%, #16181d 60%, #1b1d22 100%);
	color: #fff;
	padding: clamp(28px, 5vw, 56px);
	border: 1px solid var(--spray-line);
	position: relative;
	overflow: hidden;
}
.spray-cta--band::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	background: radial-gradient(circle, rgba(236, 22, 143, .35), transparent 65%);
	pointer-events: none;
}
.spray-cta--inline {
	background: transparent;
	padding: 18px 0;
}
.spray-cta__inner { position: relative; z-index: 1; }
.spray-cta__heading {
	font-size: clamp(1.3rem, 3vw, 1.9rem);
	font-weight: 800;
	margin: 0 0 8px;
	line-height: 1.15;
}
.spray-cta--inline .spray-cta__heading { color: inherit; }
.spray-cta__text { margin: 0 0 18px; opacity: .85; }
.spray-cta__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* ------------------------------------------------------------------ */
/* Business info + map shortcode                                       */
/* ------------------------------------------------------------------ */
.spray-bizinfo {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
}
.spray-bizinfo__item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.spray-bizinfo address { font-style: normal; line-height: 1.6; }
.spray-bizinfo__phone { font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.spray-bizinfo__hours { line-height: 1.7; margin: 0; }
.spray-map { grid-column: 1 / -1; margin-top: 4px; }
.spray-map iframe { display: block; width: 100%; border-radius: var(--spray-radius); border: 1px solid var(--spray-line); }
.spray-map--link { text-align: left; }
.spray-map__addr { margin: 10px 0 0; color: var(--spray-muted); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
	.spray-form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.spray-btn { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Admin: settings page tabs (stylesheet is shared with wp-admin)      */
/* ------------------------------------------------------------------ */
.spray-settings-wrap .spray-tab { cursor: pointer; }
.spray-settings-wrap .spray-tab-panel { padding-top: 8px; }
