/* Sealwise Application Form — front-end styles
   Scoped under .swaf-wrapper so they don't leak into the host theme.

   Theme: teal card designed to sit on a dark blue website background,
   with a white Sealwise logo and white labels / headings. Input fields
   stay white for readability. */

.swaf-wrapper {
	--swaf-primary: #042444;      /* dark navy — used on the submit button */
	--swaf-accent:  #09aba3;      /* teal — the card background */
	--swaf-accent-2:#078d86;      /* slightly darker teal for borders */
	--swaf-bg:      #09aba3;      /* card background */
	--swaf-field:   #ffffff;      /* input field background (white for contrast) */
	--swaf-border:  rgba(255,255,255,0.35);
	--swaf-text:    #1b2a3a;      /* text inside the white inputs */
	--swaf-on-teal: #ffffff;      /* text directly on the teal card */
	--swaf-muted:   rgba(255,255,255,0.78);
	--swaf-error:   #ffd4d9;
	--swaf-radius:  10px;

	max-width: 760px;
	margin: 0 auto;
	padding: 24px 0;
	color: var(--swaf-on-teal);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.swaf-wrapper *,
.swaf-wrapper *::before,
.swaf-wrapper *::after { box-sizing: border-box; }

/* Kill any theme-injected pseudo-elements (e.g. arrow overlays on <select>)
   that might appear on labels, fields or their containers. Scoped to the form only. */
.swaf-wrapper .swaf-field::before,
.swaf-wrapper .swaf-field::after,
.swaf-wrapper .swaf-field > label::before,
.swaf-wrapper .swaf-field > label::after,
.swaf-wrapper label.swaf-field::before,
.swaf-wrapper label.swaf-field::after,
.swaf-wrapper .swaf-phone::before,
.swaf-wrapper .swaf-phone::after,
.swaf-wrapper .swaf-field > span::before,
.swaf-wrapper .swaf-field > span::after,
.swaf-wrapper .swaf-field select::before,
.swaf-wrapper .swaf-field select::after,
.swaf-wrapper .swaf-field .elementor-select-wrapper::before,
.swaf-wrapper .swaf-field .elementor-select-wrapper::after {
	content: none !important;
	display: none !important;
	background: none !important;
	background-image: none !important;
	border: 0 !important;
	width: 0 !important;
	height: 0 !important;
}

/* Belt-and-braces: if the theme wraps our select in a ::before/::after icon button
   using absolute positioning, make sure our select stays fully interactive. */
.swaf-wrapper .swaf-field select { position: relative; z-index: 1; }

.swaf-card {
	background: var(--swaf-bg);
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--swaf-on-teal);
}

/* Header ---------------------------------------------------------- */
.swaf-header { text-align: center; margin-bottom: 28px; }
.swaf-logo   { max-width: 260px; height: auto; margin-bottom: 16px; }
.swaf-header h2 {
	margin: 0 0 8px;
	color: var(--swaf-on-teal);
	font-size: 1.7rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.swaf-intro { color: var(--swaf-muted); margin: 0; }

/* Honeypot -------------------------------------------------------- */
.swaf-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Sections -------------------------------------------------------- */
.swaf-section {
	border: 0;
	padding: 0;
	margin: 0 0 28px;
}
.swaf-section legend {
	font-weight: 700;
	color: var(--swaf-on-teal);
	font-size: 1.1rem;
	padding: 0 0 10px;
	margin-bottom: 8px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.45);
	width: 100%;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.swaf-subhead {
	margin: 20px 0 8px;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--swaf-on-teal);
}
.swaf-subhead small { font-weight: 500; color: var(--swaf-muted); }

/* Fields ---------------------------------------------------------- */
.swaf-field {
	display: block;
	margin-bottom: 14px;
}
.swaf-field > span {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--swaf-on-teal);
}
.swaf-field > span i     { color: #ffd4d9; font-style: normal; margin-left: 2px; }
.swaf-field > span small { font-weight: 500; color: var(--swaf-muted); }

/* --- force white fields, override theme rules (scoped to .swaf-wrapper only) --- */
.swaf-wrapper .swaf-field input[type="text"],
.swaf-wrapper .swaf-field input[type="email"],
.swaf-wrapper .swaf-field input[type="tel"],
.swaf-wrapper .swaf-field input[type="number"],
.swaf-wrapper .swaf-field textarea,
.swaf-wrapper .swaf-field select {
	width: 100% !important;
	padding: 12px 14px !important;
	border: 1px solid var(--swaf-border) !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	background-image: none !important;
	border-radius: var(--swaf-radius) !important;
	font-size: 1rem !important;
	font-family: inherit !important;
	color: var(--swaf-text) !important;
	line-height: 1.4 !important;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	   -moz-appearance: none;
	        appearance: none;
	min-height: 46px;
}

/* re-add a custom chevron on <select> since appearance:none removes the native one */
.swaf-wrapper .swaf-field select {
	padding-right: 40px !important;
	background-image:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231b2a3a' d='M6 8L0 0h12z'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 12px 8px !important;
}

.swaf-wrapper .swaf-field textarea { resize: vertical; min-height: 84px !important; }

.swaf-wrapper .swaf-field input::placeholder,
.swaf-wrapper .swaf-field textarea::placeholder { color: #8c96a4 !important; opacity: 1 !important; }

.swaf-wrapper .swaf-field input:focus,
.swaf-wrapper .swaf-field textarea:focus,
.swaf-wrapper .swaf-field select:focus {
	outline: none !important;
	border-color: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45) !important;
}

.swaf-field.swaf-invalid input,
.swaf-field.swaf-invalid textarea,
.swaf-field.swaf-invalid select {
	border-color: #ff8894;
	box-shadow: 0 0 0 3px rgba(255, 136, 148, 0.35);
}

/* Two-up row ------------------------------------------------------ */
.swaf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 560px) {
	.swaf-row { grid-template-columns: 1fr; gap: 0; }
}

/* Phone ----------------------------------------------------------- */
.swaf-phone {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 8px;
}
.swaf-phone select {
	padding: 12px 8px;
}

/* Checkbox -------------------------------------------------------- */
.swaf-checkbox {
	display: grid;
	grid-template-columns: 24px 1fr;
	gap: 12px;
	align-items: start;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--swaf-radius);
	padding: 14px;
}
.swaf-wrapper .swaf-checkbox input[type="checkbox"] {
	width: 20px !important;
	height: 20px !important;
	min-height: 20px !important;
	margin: 2px 0 0 !important;
	padding: 0 !important;
	accent-color: #042444 !important;
	-webkit-appearance: auto;
	        appearance: auto;
	background: #ffffff !important;
	border: 1px solid var(--swaf-border) !important;
}
.swaf-checkbox > span { margin: 0; font-weight: 500; color: var(--swaf-on-teal); }

/* Conditional block ---------------------------------------------- */
.swaf-conditional {
	margin-top: 12px;
	padding: 20px;
	background: rgba(4, 36, 68, 0.15);
	border: 1px dashed rgba(255, 255, 255, 0.35);
	border-radius: 12px;
}
.swaf-conditional[hidden] { display: none; }

/* Submit ---------------------------------------------------------- */
.swaf-wrapper .swaf-actions { margin-top: 24px; text-align: right; }
.swaf-wrapper .swaf-submit,
.swaf-wrapper button.swaf-submit,
.swaf-wrapper button[type="submit"].swaf-submit {
	background: var(--swaf-primary) !important;
	background-color: var(--swaf-primary) !important;
	background-image: none !important;
	color: #ffffff !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	padding: 14px 32px !important;
	border: 0 !important;
	border-radius: var(--swaf-radius) !important;
	cursor: pointer !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.4 !important;
	transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
	-webkit-appearance: none;
	        appearance: none;
}
.swaf-wrapper .swaf-submit:hover  { background: #063366 !important; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important; }
.swaf-wrapper .swaf-submit:active { transform: translateY(1px); }
.swaf-wrapper .swaf-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Message --------------------------------------------------------- */
.swaf-message { margin-top: 16px; padding: 0; font-size: 0.95rem; }
.swaf-message.swaf-success {
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #9ad9b0;
	color: #1a6b37;
	border-radius: var(--swaf-radius);
}
.swaf-message.swaf-error {
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #f3aab2;
	color: #a6162d;
	border-radius: var(--swaf-radius);
}

/* Small screens --------------------------------------------------- */
@media (max-width: 480px) {
	.swaf-card { padding: 22px; }
	.swaf-header h2 { font-size: 1.35rem; }
}
