/**
 * BAS Checkout — Vendor Registration Form Styles
 *
 * Re-skins the [dokan-vendor-registration] shortcode output to match
 * Butter & Sage Market's brand palette and button standards.
 *
 * Selectors are scoped to .bas-pt-modal__form (the modal context) wherever
 * possible to ensure higher specificity and avoid collisions with Dokan's own
 * stylesheet or Divi global styles.
 *
 * The .dokan-registration-container / .dokan-seller-registration bare selectors
 * are kept as lower-specificity fallbacks for any standalone usage.
 *
 * @package BAS_Checkout
 * @since   1.4.2
 */

/* ─── Custom Properties ──────────────────────────────────────────────────── */

:root {
	--bas-sage:        #70ac43;
	--bas-lime:        #c2e86b;
	--bas-forest:      #1d741b;
	--bas-teal:        #30b2b4;
	--bas-yellow:      #ffda3d;
	--bas-orange:      #ff4c25;
	--bas-coral:       #ff7660;
	--bas-cream:       #fffbef;
	--bas-charcoal:    #313131;
	--bas-border:      #d8e8c8;
	--bas-radius-pill: 100px;
	--bas-radius-card: 12px;
}

/* ─── Dokan form container ───────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-registration-container,
.bas-pt-modal__form .dokan-seller-registration,
.dokan-registration-container,
.dokan-seller-registration {
	background: #fff;
	border-radius: var(--bas-radius-card);
}

/* Strip Dokan's default border/shadow/padding in the modal — bas-pt.css handles layout */
.bas-pt-modal__form .dokan-registration-container,
.bas-pt-modal__form .dokan-seller-registration {
	border: none !important;
	padding: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

/* ─── Section headings ───────────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-registration-container h2,
.bas-pt-modal__form .dokan-registration-container h3,
.bas-pt-modal__form .dokan-seller-registration h2,
.bas-pt-modal__form .dokan-seller-registration h3,
.dokan-registration-container h2,
.dokan-registration-container h3,
.dokan-seller-registration h2,
.dokan-seller-registration h3 {
	font-family: 'Playfair Display', Georgia, serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--bas-charcoal) !important;
	margin: 0 0 18px !important;
	padding-bottom: 12px !important;
	border-bottom: 2px solid var(--bas-border) !important;
}

/* ─── Field groups ───────────────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-form-group,
.bas-pt-modal__form .dokan-registration-container .form-group,
.dokan-form-group,
.dokan-registration-container .form-group {
	margin-bottom: 16px !important;
}

.bas-pt-modal__form .dokan-form-group label,
.bas-pt-modal__form .dokan-registration-container label,
.dokan-form-group label,
.dokan-registration-container label {
	display: block !important;
	font-family: Lato, sans-serif !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: var(--bas-charcoal) !important;
	margin-bottom: 5px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
}

/* Required asterisk */
.bas-pt-modal__form label .required,
.bas-pt-modal__form .dokan-registration-container label .required,
.dokan-registration-container label .required {
	color: var(--bas-orange) !important;
	margin-left: 2px !important;
}

/* ─── Inputs & textareas ─────────────────────────────────────────────────── */

.bas-pt-modal__form input[type="text"],
.bas-pt-modal__form input[type="email"],
.bas-pt-modal__form input[type="password"],
.bas-pt-modal__form input[type="tel"],
.bas-pt-modal__form input[type="url"],
.bas-pt-modal__form input[type="number"],
.bas-pt-modal__form select,
.bas-pt-modal__form textarea,
.dokan-registration-container input[type="text"],
.dokan-registration-container input[type="email"],
.dokan-registration-container input[type="password"],
.dokan-registration-container input[type="tel"],
.dokan-registration-container input[type="url"],
.dokan-registration-container input[type="number"],
.dokan-registration-container select,
.dokan-registration-container textarea,
.dokan-seller-registration input[type="text"],
.dokan-seller-registration input[type="email"],
.dokan-seller-registration input[type="password"],
.dokan-seller-registration input[type="tel"],
.dokan-seller-registration input[type="url"],
.dokan-seller-registration input[type="number"],
.dokan-seller-registration select,
.dokan-seller-registration textarea {
	width: 100% !important;
	padding: 11px 14px !important;
	font-family: Lato, sans-serif !important;
	font-size: 14px !important;
	color: var(--bas-charcoal) !important;
	background: #fff !important;
	border: 1px solid #ccc !important;
	border-radius: 8px !important;
	outline: none !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	box-sizing: border-box !important;
}

.bas-pt-modal__form input:focus,
.bas-pt-modal__form select:focus,
.bas-pt-modal__form textarea:focus,
.dokan-registration-container input:focus,
.dokan-registration-container select:focus,
.dokan-registration-container textarea:focus,
.dokan-seller-registration input:focus,
.dokan-seller-registration select:focus,
.dokan-seller-registration textarea:focus {
	border-color: var(--bas-sage) !important;
	box-shadow: 0 0 0 3px rgba(112, 172, 67, 0.18) !important;
}

/* ─── Password strength meter ────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-password-strength,
.dokan-registration-container .dokan-password-strength,
.dokan-seller-registration .dokan-password-strength {
	font-size: 12px !important;
	margin-top: 5px !important;
	padding: 4px 10px !important;
	border-radius: 4px !important;
}

/* ─── Country / state Select2 ────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-select2,
.bas-pt-modal__form .select2-container,
.dokan-registration-container .dokan-select2,
.dokan-seller-registration .dokan-select2,
.dokan-registration-container .select2-container,
.dokan-seller-registration .select2-container {
	width: 100% !important;
}

.bas-pt-modal__form .select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single {
	height: 42px !important;
	border: 1px solid #ccc !important;
	border-radius: 8px !important;
	padding: 8px 14px !important;
	line-height: 1.5 !important;
}

.bas-pt-modal__form .select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--bas-sage) !important;
	box-shadow: 0 0 0 3px rgba(112, 172, 67, 0.18) !important;
	outline: none !important;
}

.bas-pt-modal__form .select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 24px !important;
	padding-left: 0 !important;
	color: var(--bas-charcoal) !important;
	font-family: Lato, sans-serif !important;
	font-size: 14px !important;
}

.bas-pt-modal__form .select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 42px !important;
	right: 10px !important;
}

/* ─── Address sub-fields row ─────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-form-group .dokan-form-row,
.bas-pt-modal__form .dokan-registration-container .dokan-w5,
.dokan-form-group .dokan-form-row,
.dokan-registration-container .dokan-w5 {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 12px !important;
}

/* ─── Submit button ──────────────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-btn,
.bas-pt-modal__form button[type="submit"],
.bas-pt-modal__form input[type="submit"],
.dokan-registration-container .dokan-btn,
.dokan-seller-registration .dokan-btn,
.dokan-registration-container button[type="submit"],
.dokan-seller-registration button[type="submit"] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	padding: 13px 32px !important;
	font-family: Lato, sans-serif !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #fff !important;
	background: linear-gradient(180deg, var(--bas-lime) 0%, var(--bas-sage) 100%) !important;
	border: 1px solid var(--bas-sage) !important;
	border-radius: var(--bas-radius-pill) !important;
	cursor: pointer !important;
	text-decoration: none !important;
	transition: filter 0.2s, transform 0.1s !important;
	width: 100% !important;
	margin-top: 8px !important;
	box-shadow: none !important;
}

.bas-pt-modal__form .dokan-btn:hover,
.bas-pt-modal__form button[type="submit"]:hover,
.bas-pt-modal__form input[type="submit"]:hover,
.dokan-registration-container .dokan-btn:hover,
.dokan-seller-registration .dokan-btn:hover,
.dokan-registration-container button[type="submit"]:hover,
.dokan-seller-registration button[type="submit"]:hover {
	filter: brightness(1.05) !important;
}

.bas-pt-modal__form .dokan-btn:active,
.bas-pt-modal__form button[type="submit"]:active,
.bas-pt-modal__form input[type="submit"]:active {
	transform: scale(0.98) !important;
}

/* ─── Error / notice messages ────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-alert,
.bas-pt-modal__form .woocommerce-error,
.bas-pt-modal__form .woocommerce-message,
.dokan-registration-container .dokan-alert,
.dokan-seller-registration .dokan-alert {
	border-radius: 8px !important;
	padding: 12px 16px !important;
	font-family: Lato, sans-serif !important;
	font-size: 14px !important;
	margin-bottom: 14px !important;
	list-style: none !important;
}

.bas-pt-modal__form .dokan-alert-danger,
.bas-pt-modal__form .woocommerce-error,
.dokan-registration-container .dokan-alert-danger,
.dokan-seller-registration .dokan-alert-danger {
	background: #fff0ee !important;
	border: 1px solid var(--bas-coral) !important;
	color: #8b1a00 !important;
}

.bas-pt-modal__form .dokan-alert-success,
.bas-pt-modal__form .woocommerce-message,
.dokan-registration-container .dokan-alert-success,
.dokan-seller-registration .dokan-alert-success {
	background: #f0f8ea !important;
	border: 1px solid var(--bas-sage) !important;
	color: var(--bas-forest) !important;
}

/* ─── Inline field error text ────────────────────────────────────────────── */

.bas-pt-modal__form .dokan-error,
.bas-pt-modal__form small.error,
.bas-pt-modal__form .field-error {
	color: var(--bas-orange) !important;
	font-size: 12px !important;
	margin-top: 4px !important;
	display: block !important;
}

/* ─── Terms / checkbox area ──────────────────────────────────────────────── */

.bas-pt-modal__form input[type="checkbox"],
.bas-pt-modal__form .dokan-form-group input[type="checkbox"],
.dokan-registration-container .dokan-form-group input[type="checkbox"],
.dokan-seller-registration .dokan-form-group input[type="checkbox"] {
	width: auto !important;
	accent-color: var(--bas-sage) !important;
	margin-right: 8px !important;
}

/* ─── Social login divider (if Dokan Social Login enabled) ───────────────── */

.bas-pt-modal__form .dokan-social-login,
.dokan-registration-container .dokan-social-login,
.dokan-seller-registration .dokan-social-login {
	margin-top: 20px !important;
	padding-top: 20px !important;
	border-top: 1px solid var(--bas-border) !important;
	text-align: center !important;
}

/* ─── "Already have an account?" link ────────────────────────────────────── */

.bas-pt-modal__form .dokan-login-link,
.bas-pt-modal__form .dokan-seller-registration p a,
.dokan-registration-container .dokan-login-link,
.dokan-seller-registration p a {
	color: var(--bas-teal) !important;
	text-decoration: none !important;
	font-family: Lato, sans-serif !important;
	font-size: 13px !important;
}

.bas-pt-modal__form .dokan-login-link:hover,
.bas-pt-modal__form .dokan-seller-registration p a:hover,
.dokan-registration-container .dokan-login-link:hover,
.dokan-seller-registration p a:hover {
	text-decoration: underline !important;
}

/* ─── Loading spinner (Dokan shows one on submit) ────────────────────────── */

.bas-pt-modal__form .dokan-loading,
.bas-pt-modal__form .dokan-btn.loading {
	opacity: 0.7 !important;
	pointer-events: none !important;
}

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

@media (max-width: 600px) {
	.bas-pt-modal__form .dokan-form-group .dokan-form-row,
	.bas-pt-modal__form .dokan-registration-container .dokan-w5,
	.dokan-form-group .dokan-form-row,
	.dokan-registration-container .dokan-w5 {
		grid-template-columns: 1fr !important;
	}
}
