/* Cloudswired Ultimate Membership — Registration checkout
 * Aero-inspired clean modern design.
 */

:root {
	--cum-primary: #2563eb;
	--cum-primary-hover: #1d4ed8;
	--cum-primary-light: #eff6ff;
	--cum-success: #059669;
	--cum-danger: #dc2626;
	--cum-text: #111827;
	--cum-text-muted: #6b7280;
	--cum-text-light: #9ca3af;
	--cum-border: #e5e7eb;
	--cum-border-strong: #d1d5db;
	--cum-bg: #ffffff;
	--cum-bg-soft: #f9fafb;
	--cum-radius: 8px;
	--cum-radius-sm: 6px;
	--cum-shadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
	--cum-shadow-md: 0 4px 8px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.06);
}

.cum-reg,
.cum-reg * {
	box-sizing: border-box;
}

.cum-reg {
	max-width: 780px;
	margin: 0 auto;
	padding: 32px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--cum-text);
	line-height: 1.5;
}

/* ========================================================================
 * Plan picker (top of page)
 * ======================================================================== */

.cum-reg__plans {
	margin-bottom: 28px;
}

.cum-reg__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--cum-text);
	margin: 0 0 20px;
	line-height: 1.25;
}

.cum-plan-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
}

.cum-plan-card {
	position: relative !important;
	display: block !important;
	background: var(--cum-bg);
	border: 2px solid var(--cum-border);
	border-radius: var(--cum-radius);
	padding: 20px !important;
	cursor: pointer;
	transition: all .15s ease;
	box-shadow: var(--cum-shadow);
	margin: 0 !important;
	width: 100%;
	box-sizing: border-box;
	min-height: 100px;
}

.cum-plan-card__body {
	display: block;
}

.cum-plan-card:hover {
	border-color: var(--cum-primary);
	transform: translateY(-1px);
	box-shadow: var(--cum-shadow-md);
}

.cum-plan-card.is-selected {
	border-color: var(--cum-primary);
	background: var(--cum-primary-light);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.cum-plan-card input[type="radio"] {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 20px;
	height: 20px;
	accent-color: var(--cum-primary);
	cursor: pointer;
}

.cum-plan-card__title {
	font-size: 17px;
	font-weight: 700;
	color: var(--cum-text);
	margin-bottom: 8px;
	padding-right: 28px;
	line-height: 1.3;
}

.cum-plan-card__price {
	font-size: 24px;
	font-weight: 700;
	color: var(--cum-primary);
	line-height: 1.1;
	margin-bottom: 6px;
}

.cum-plan-card__price del {
	color: var(--cum-text-light);
	font-size: 16px;
	font-weight: 500;
	margin-right: 6px;
}

.cum-plan-card__meta {
	font-size: 13px;
	color: var(--cum-text-muted);
}

.cum-reg__loading {
	text-align: center;
	color: var(--cum-text-muted);
	font-size: 13px;
	margin-top: 12px;
	padding: 8px;
}

/* Dim the order review while WC refreshes it after plan swap. WC toggles the
   `processing` state; we hook it for a subtle visual. */
.cum-reg__checkout .blockUI.blockOverlay {
	background: rgba(255, 255, 255, .5) !important;
}

.cum-reg__checkout .processing {
	opacity: .55;
	pointer-events: none;
	transition: opacity .15s;
}

/* ========================================================================
 * WC Checkout section container
 * ======================================================================== */

.cum-reg .cum-reg__checkout,
.cum-reg__checkout,
.cum-reg__checkout .woocommerce,
.cum-reg__checkout form.woocommerce-checkout,
.cum-reg__checkout .woocommerce-billing-fields,
.cum-reg__checkout .woocommerce-additional-fields {
	background: transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Kill Woo's default checkout title if we're rendering our own */
.cum-reg__checkout > h3:first-child {
	display: none;
}

/* Override WC's default columns — go single column, cleaner */
.cum-reg__checkout .woocommerce-checkout,
.cum-reg__checkout form.woocommerce-checkout {
	display: block;
}

.cum-reg__checkout #customer_details {
	float: none !important;
	width: 100% !important;
	padding: 0 !important;
}

.cum-reg__checkout .col-1,
.cum-reg__checkout .col-2 {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
}

.cum-reg__checkout .col2-set {
	display: block !important;
	width: 100% !important;
}

/* ========================================================================
 * Section headings inside checkout
 * ======================================================================== */

.cum-reg__checkout h3,
.cum-reg__checkout .woocommerce-billing-fields h3,
.cum-reg__checkout .woocommerce-shipping-fields h3,
.cum-reg__checkout .woocommerce-additional-fields h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--cum-text);
	margin: 24px 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--cum-border);
}

.cum-reg__checkout .woocommerce-billing-fields h3:first-child {
	margin-top: 0;
}

/* ========================================================================
 * Form fields — modern floating-label-ish style
 * ======================================================================== */

.cum-reg__checkout .form-row {
	margin: 0 0 14px !important;
	padding: 0 !important;
}

.cum-reg__checkout .form-row label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--cum-text);
	margin-bottom: 6px;
}

.cum-reg__checkout .form-row .required {
	color: var(--cum-danger);
	text-decoration: none;
	margin-left: 2px;
}

.cum-reg__checkout .form-row .optional {
	color: var(--cum-text-light);
	font-weight: 400;
	font-size: 12px;
}

.cum-reg__checkout .input-text,
.cum-reg__checkout input[type="text"],
.cum-reg__checkout input[type="email"],
.cum-reg__checkout input[type="tel"],
.cum-reg__checkout input[type="password"],
.cum-reg__checkout input[type="number"],
.cum-reg__checkout input[type="date"],
.cum-reg__checkout textarea,
.cum-reg__checkout select {
	width: 100% !important;
	padding: 10px 12px !important;
	border: 1px solid var(--cum-border-strong) !important;
	border-radius: var(--cum-radius-sm) !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	background: var(--cum-bg) !important;
	color: var(--cum-text) !important;
	transition: border-color .15s, box-shadow .15s !important;
	box-shadow: none !important;
	height: auto !important;
}

.cum-reg__checkout .input-text:focus,
.cum-reg__checkout input:focus,
.cum-reg__checkout textarea:focus,
.cum-reg__checkout select:focus {
	outline: none !important;
	border-color: var(--cum-primary) !important;
	box-shadow: 0 0 0 3px rgba(37,99,235,.15) !important;
}

/* Two-column rows for name / postcode etc */
.cum-reg__checkout .form-row-first,
.cum-reg__checkout .form-row-last {
	width: calc(50% - 7px) !important;
	float: none !important;
	display: inline-block !important;
	vertical-align: top !important;
}

.cum-reg__checkout .form-row-first {
	margin-right: 12px !important;
}

.cum-reg__checkout .form-row-wide {
	width: 100% !important;
}

/* ------------------------------------------------------------------
 * v0.8.0 — layout widths.
 * Turn the billing group into a flex row so `.form-row-cum-wXX` cells
 * pack side-by-side. Rows that don't fit wrap onto the next line.
 * High-specificity selectors so themes (Elementor, Astra, etc.) can't
 * override our `form-row-first/last/wide` cleanup.
 * ------------------------------------------------------------------ */

.cum-reg .cum-reg__checkout .woocommerce-billing-fields__field-wrapper,
.cum-reg .cum-reg__checkout .woocommerce-billing-fields > .woocommerce-billing-fields__field-wrapper {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0 14px !important;
}

/* Reset any legacy WC float/width for rows that carry our width class. */
.cum-reg .cum-reg__checkout p.form-row[class*="form-row-cum-w"],
.cum-reg .cum-reg__checkout .form-row[class*="form-row-cum-w"] {
	float: none !important;
	display: block !important;
	clear: none !important;
	margin-right: 0 !important;
	max-width: 100% !important;
}

/* Widths — subtract the gap (14px) proportionally so cells always fit. */
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w25,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w25   { width: calc(25%     - 10.5px) !important; }
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w33,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w33   { width: calc(33.333% - 9.34px) !important; }
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w50,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w50   { width: calc(50%     - 7px) !important; }
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w66,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w66   { width: calc(66.666% - 4.66px) !important; }
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w75,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w75   { width: calc(75%     - 3.5px) !important; }
.cum-reg .cum-reg__checkout .form-row.form-row-cum-w100,
.cum-reg .cum-reg__checkout p.form-row.form-row-cum-w100  { width: 100% !important; }

/* Select2 (country dropdown) needs its wrapper to fill the row width. */
.cum-reg .cum-reg__checkout .form-row .select2-container {
	width: 100% !important;
}

/* Any form-row without a cum-wXX width class (third-party additions) falls
   back to full row so it doesn't collapse under flex-wrap. */
.cum-reg .cum-reg__checkout .woocommerce-billing-fields__field-wrapper > p.form-row:not([class*="form-row-cum-w"]) {
	width: 100% !important;
}

/* File input styling — for `file` type custom fields on registration. */
.cum-reg__checkout input[type="file"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px dashed var(--cum-border-strong);
	border-radius: var(--cum-radius-sm);
	background: var(--cum-bg-soft);
	font-size: 13px;
	cursor: pointer;
	color: var(--cum-text);
}

.cum-reg__checkout input[type="file"]:hover {
	border-color: var(--cum-primary);
	background: var(--cum-primary-light);
}

.cum-reg__checkout input[type="file"]:disabled {
	opacity: .6;
	cursor: wait;
}

.cum-file-field__wrap {
	display: block;
}

.cum-file-field__status {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 500;
	min-height: 16px;
}

/* Select2 (WC's country dropdown) */
.cum-reg__checkout .select2-container .select2-selection {
	height: 42px !important;
	border: 1px solid var(--cum-border-strong) !important;
	border-radius: var(--cum-radius-sm) !important;
}

.cum-reg__checkout .select2-container .select2-selection__rendered {
	line-height: 40px !important;
	padding-left: 12px !important;
}

.cum-reg__checkout .select2-container .select2-selection__arrow {
	height: 40px !important;
}

/* ========================================================================
 * Email exists notice
 * ======================================================================== */

.cum-email-exists {
	display: block;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: var(--cum-radius-sm);
	padding: 10px 14px;
	margin-top: 8px;
	font-size: 13px;
	color: #92400e;
}

.cum-email-exists a {
	color: #b45309;
	font-weight: 600;
	margin-left: 6px;
	text-decoration: underline;
}

.cum-email-exists a:hover {
	color: #78350f;
}

/* ========================================================================
 * Custom fields section (injected)
 * ======================================================================== */

.cum-checkout-fields {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--cum-border);
}

.cum-checkout-section h3 {
	font-size: 16px;
	font-weight: 600;
	color: var(--cum-text);
	margin: 20px 0 12px;
}

.cum-checkout-section:first-child h3 {
	margin-top: 0;
}

/* ========================================================================
 * Order review / summary
 * ======================================================================== */

#order_review_heading {
	font-size: 18px;
	font-weight: 700;
	margin: 32px 0 16px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--cum-border);
}

.cum-reg__checkout #order_review {
	background: var(--cum-bg-soft);
	border: 1px solid var(--cum-border);
	border-radius: var(--cum-radius);
	padding: 20px;
	margin-top: 8px;
}

.cum-reg__checkout .shop_table {
	background: transparent !important;
	border: none !important;
	border-collapse: collapse !important;
	margin-bottom: 16px;
}

.cum-reg__checkout .shop_table thead {
	display: none;
}

.cum-reg__checkout .shop_table th,
.cum-reg__checkout .shop_table td {
	padding: 10px 0 !important;
	border: none !important;
	border-bottom: 1px solid var(--cum-border) !important;
	background: transparent !important;
	font-size: 14px !important;
}

.cum-reg__checkout .shop_table .cart_item td.product-name {
	color: var(--cum-text);
	font-weight: 500;
}

.cum-reg__checkout .shop_table .cart_item td.product-total {
	text-align: right;
	color: var(--cum-text);
	font-weight: 600;
}

.cum-reg__checkout .shop_table .cart-subtotal,
.cum-reg__checkout .shop_table tr.tax-rate {
	color: var(--cum-text-muted);
}

.cum-reg__checkout .shop_table .cart-subtotal th,
.cum-reg__checkout .shop_table .cart-subtotal td,
.cum-reg__checkout .shop_table tr.tax-rate th,
.cum-reg__checkout .shop_table tr.tax-rate td {
	color: var(--cum-text-muted);
	font-weight: 500;
}

.cum-reg__checkout .shop_table .order-total th,
.cum-reg__checkout .shop_table .order-total td {
	font-size: 17px !important;
	font-weight: 700 !important;
	color: var(--cum-text) !important;
	padding-top: 14px !important;
	border-top: 2px solid var(--cum-border) !important;
	border-bottom: none !important;
}

/* ========================================================================
 * Payment methods
 * ======================================================================== */

.cum-reg__checkout .woocommerce-checkout-payment {
	background: transparent !important;
	border-radius: 0 !important;
	margin-top: 20px;
}

.cum-reg__checkout .wc_payment_methods {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--cum-bg) !important;
	border: 1px solid var(--cum-border) !important;
	border-radius: var(--cum-radius) !important;
	overflow: hidden;
}

.cum-reg__checkout .wc_payment_method {
	background: var(--cum-bg) !important;
	padding: 14px 16px !important;
	border-bottom: 1px solid var(--cum-border) !important;
	margin: 0 !important;
}

.cum-reg__checkout .wc_payment_method:last-child {
	border-bottom: none !important;
}

.cum-reg__checkout .wc_payment_method label {
	display: flex !important;
	align-items: center !important;
	gap: 10px;
	font-weight: 500;
	color: var(--cum-text);
	cursor: pointer;
	margin: 0 !important;
	padding: 0 !important;
}

.cum-reg__checkout .wc_payment_method input[type="radio"] {
	accent-color: var(--cum-primary);
	width: 18px;
	height: 18px;
}

.cum-reg__checkout .payment_box {
	background: var(--cum-bg-soft) !important;
	border-radius: var(--cum-radius-sm) !important;
	padding: 14px !important;
	margin-top: 10px !important;
	font-size: 13px;
	color: var(--cum-text-muted);
}

.cum-reg__checkout .payment_box::before {
	display: none !important;
}

/* ========================================================================
 * Place order button
 * ======================================================================== */

.cum-reg__checkout #place_order,
.cum-reg__checkout button.button.alt {
	display: block !important;
	width: 100% !important;
	background: var(--cum-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--cum-radius) !important;
	padding: 14px 24px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	margin-top: 16px !important;
	transition: background .15s;
	text-shadow: none !important;
	box-shadow: none !important;
}

.cum-reg__checkout #place_order:hover,
.cum-reg__checkout button.button.alt:hover {
	background: var(--cum-primary-hover) !important;
}

.cum-reg__checkout #place_order:disabled {
	opacity: .6;
	cursor: not-allowed;
}

/* Privacy text below button */
.cum-reg__checkout .woocommerce-privacy-policy-text {
	font-size: 12px;
	color: var(--cum-text-muted);
	margin-top: 12px;
	line-height: 1.4;
}

.cum-reg__checkout .woocommerce-terms-and-conditions-wrapper {
	margin-top: 12px;
	font-size: 13px;
	color: var(--cum-text-muted);
}

/* ========================================================================
 * Login prompt bar at top of checkout
 * ======================================================================== */

.cum-reg__checkout .woocommerce-form-login-toggle {
	background: var(--cum-primary-light) !important;
	border: 1px solid #bfdbfe !important;
	border-radius: var(--cum-radius-sm) !important;
	padding: 12px 16px !important;
	margin-bottom: 20px !important;
	color: var(--cum-text) !important;
}

.cum-reg__checkout .woocommerce-form-login-toggle a {
	color: var(--cum-primary) !important;
	font-weight: 600;
}

.cum-reg__checkout .woocommerce-form-login {
	background: var(--cum-bg-soft) !important;
	border: 1px solid var(--cum-border) !important;
	border-radius: var(--cum-radius) !important;
	padding: 20px !important;
	margin-bottom: 20px !important;
}

/* ========================================================================
 * Coupon toggle (hide by default — clutter)
 * ======================================================================== */

.cum-reg__checkout .woocommerce-form-coupon-toggle {
	background: transparent !important;
	border: none !important;
	padding: 8px 0 !important;
	margin-bottom: 0 !important;
	font-size: 13px;
}

.cum-reg__checkout .woocommerce-form-coupon-toggle a {
	color: var(--cum-primary);
	font-weight: 500;
}

.cum-reg__checkout .checkout_coupon {
	background: var(--cum-bg-soft) !important;
	border: 1px solid var(--cum-border) !important;
	border-radius: var(--cum-radius) !important;
	padding: 16px !important;
	margin-bottom: 20px !important;
}

/* ========================================================================
 * Notices (WC messages)
 * ======================================================================== */

.cum-reg .woocommerce-message,
.cum-reg .woocommerce-info,
.cum-reg .woocommerce-error,
.cum-reg .woocommerce-notice {
	background: var(--cum-bg-soft) !important;
	border-radius: var(--cum-radius-sm) !important;
	border-left-width: 4px !important;
	padding: 12px 16px !important;
	margin-bottom: 16px !important;
	color: var(--cum-text);
	font-size: 14px;
	list-style: none !important;
}

.cum-reg .woocommerce-message {
	border-left-color: var(--cum-success) !important;
}

.cum-reg .woocommerce-info {
	border-left-color: var(--cum-primary) !important;
}

.cum-reg .woocommerce-error {
	border-left-color: var(--cum-danger) !important;
	color: #7f1d1d;
}

/* ========================================================================
 * Alerts (our own)
 * ======================================================================== */

.cum-alert {
	padding: 14px 18px;
	border-radius: var(--cum-radius-sm);
	margin: 16px 0;
	font-size: 14px;
	line-height: 1.5;
}

.cum-alert--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.cum-alert--info {
	background: var(--cum-primary-light);
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.cum-alert a {
	font-weight: 600;
	text-decoration: underline;
}

/* ========================================================================
 * Responsive
 * ======================================================================== */

@media (max-width: 720px) {
	.cum-reg {
		padding: 20px 12px;
	}
	.cum-plan-grid {
		grid-template-columns: 1fr;
	}
	.cum-reg__checkout .form-row-first,
	.cum-reg__checkout .form-row-last {
		width: 100% !important;
		display: block !important;
		margin-right: 0 !important;
	}
	/* On phones every field spans the row regardless of chosen width. */
	.cum-reg__checkout .form-row[class*="form-row-cum-w"] {
		width: 100% !important;
	}
}
