/* Barweb Stripe Subscriptions — all styles scoped to .bws-checkout */

.bws-checkout {
	max-width: 560px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
	color: #111827;
	line-height: 1.5;
}

/* ── Fields ──────────────────────────────────────────────────────────── */

.bws-field {
	margin-bottom: 1rem;
}

.bws-field label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: #374151;
}

.bws-req {
	color: #dc2626;
	margin-left: 2px;
}

.bws-field__hint {
	margin: 0.3rem 0 0;
	font-size: 0.8rem;
	color: #6b7280;
	line-height: 1.4;
}

.bws-field input[type="text"],
.bws-field input[type="email"],
.bws-field input[type="tel"],
.bws-field select {
	display: block;
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 1rem;
	line-height: 1.5;
	color: #111827;
	background-color: #ffffff;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bws-field input[type="text"]:focus,
.bws-field input[type="email"]:focus,
.bws-field input[type="tel"]:focus,
.bws-field select:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.bws-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.65rem center;
	background-size: 1.2em;
	padding-right: 2.2rem;
}

/* Row layout for city / state / postcode */
.bws-field-row {
	display: flex;
	gap: 0.75rem;
}

.bws-field-row .bws-field {
	flex: 1;
}

.bws-field-row .bws-field--state {
	flex: 0 0 130px;
}

.bws-field-row .bws-field--postcode {
	flex: 0 0 110px;
}

/* ── Section divider ─────────────────────────────────────────────────── */

.bws-section-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 1.5rem 0 1.25rem;
}

/* ── Payment placeholder (shown before email is entered) ─────────────── */

.bws-payment-placeholder {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 1rem;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 6px;
	color: #6b7280;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

/* ── Loading state ───────────────────────────────────────────────────── */

.bws-payment-loading {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 1rem 0;
	color: #6b7280;
	font-size: 0.9rem;
}

.bws-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: bws-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes bws-spin {
	to { transform: rotate(360deg); }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.bws-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
	text-decoration: none;
	line-height: 1;
}

.bws-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.bws-btn--primary {
	background-color: #2563eb;
	color: #ffffff;
	width: 100%;
	margin-top: 1.1rem;
}

.bws-btn--primary:hover:not(:disabled) {
	background-color: #1d4ed8;
}

/* ── Messages ────────────────────────────────────────────────────────── */

.bws-message {
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

.bws-message--error {
	background-color: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.bws-message--success {
	background-color: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

/* ── Payment Element container ───────────────────────────────────────── */

#bws-payment-element {
	margin-bottom: 1.1rem;
}

/* ── BECS mandate disclosure ─────────────────────────────────────────── */

.bws-mandate {
	padding: 0.5rem 0 0.25rem;
	margin-bottom: 1rem;
	font-size: 0.8rem;
	color: #4b5563;
	line-height: 1.55;
}

.bws-mandate p {
	margin: 0 0 0.55rem;
}

.bws-mandate p:last-child {
	margin-bottom: 0;
}

.bws-mandate ul {
	margin: 0 0 0.55rem;
	padding-left: 1.2rem;
}

.bws-mandate li {
	margin-bottom: 0.3rem;
}

.bws-checkout .bws-mandate a {
	color: #2563eb !important;
	text-decoration: underline !important;
	font-weight: 600;
}

.bws-checkout .bws-mandate a:hover {
	color: #1d4ed8 !important;
}

/* ── Success screen ──────────────────────────────────────────────────── */

.bws-success {
	text-align: center;
	padding: 2.5rem 1rem;
}

.bws-success h2 {
	font-size: 1.5rem;
	color: #15803d;
	margin: 0 0 0.75rem;
}

.bws-success p {
	color: #374151;
	font-size: 1rem;
	max-width: 420px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
	.bws-field-row {
		flex-direction: column;
		gap: 0;
	}

	.bws-field-row .bws-field--state,
	.bws-field-row .bws-field--postcode {
		flex: unset;
	}
}
