/*
 * P2B checkout shell skin — applied ONLY inside templates/checkout-shell.php (body.p2b-co-shell).
 * The theme's header/footer never render there; this file re-skins the classic WooCommerce checkout
 * to the storefront design system and neutralizes leaked theme styles. Cosmetic only.
 */
body.p2b-co-shell {
	--co-ink: #101828; --co-muted: #667085; --co-line: #EAECF0; --co-paper: #F8FAFC;
	--co-accent: #2563EB; --co-hot: #3B82F6; --co-deep: #1D4ED8; --co-ring: 0 0 0 4px rgba(37,99,235,.16);
	margin: 0 !important; padding: 0 !important;
	background: #fff !important; color: var(--co-ink) !important;
	font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif !important;
	line-height: 1.65;
}
body.p2b-co-shell.admin-bar { margin-top: 32px !important; }

/* Header / footer */
.p2b-co-hdr {
	position: sticky; top: 0; z-index: 90; display: flex; align-items: center; gap: 16px;
	padding: 14px clamp(16px, 4vw, 44px); background: rgba(255,255,255,.9);
	backdrop-filter: blur(12px); border-block-end: 1px solid var(--co-line);
}
body.p2b-co-shell.admin-bar .p2b-co-hdr { top: 32px; }
.p2b-co-hdr__logo { font-family: Alexandria, sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -.5px; color: var(--co-ink); text-decoration: none; direction: ltr; unicode-bidi: isolate; }
.p2b-co-hdr__logo span { color: var(--co-accent); }
.p2b-co-hdr__title { font-size: 13.5px; font-weight: 700; color: var(--co-muted); }
.p2b-co-hdr__back { margin-inline-start: auto; font-size: 13.5px; font-weight: 700; color: var(--co-accent); text-decoration: none; }
.p2b-co-hdr__back:hover { text-decoration: underline; }
.p2b-co-ftr { border-block-start: 1px solid var(--co-line); margin-top: 46px; padding: 26px 16px 34px; text-align: center; color: var(--co-muted); font-size: 12.5px; }
.p2b-co-ftr p { margin: 0; }

/* Layout */
.p2b-co-main { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3vw, 34px) clamp(14px, 4vw, 40px); }
.p2b-co-main .woocommerce { font-family: inherit; }

/* Headings */
body.p2b-co-shell h1, body.p2b-co-shell h2, body.p2b-co-shell h3 {
	font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif !important; color: var(--co-ink);
	letter-spacing: -.3px;
}
body.p2b-co-shell #order_review_heading { margin-top: 0; }

/* Form fields */
body.p2b-co-shell form .form-row input.input-text,
body.p2b-co-shell form .form-row textarea,
body.p2b-co-shell form .form-row select,
body.p2b-co-shell .select2-container--default .select2-selection--single {
	border: 1.5px solid var(--co-line) !important; border-radius: 12px !important;
	background: var(--co-paper) !important; padding: 12px 16px !important; min-height: 48px;
	font: inherit !important; color: var(--co-ink) !important; box-shadow: none !important;
}
body.p2b-co-shell form .form-row input.input-text:focus,
body.p2b-co-shell form .form-row textarea:focus,
body.p2b-co-shell form .form-row select:focus {
	outline: none !important; background: #fff !important; border-color: var(--co-accent) !important; box-shadow: var(--co-ring) !important;
}
body.p2b-co-shell form .form-row label { font-weight: 700; font-size: 13px; color: var(--co-ink); }
body.p2b-co-shell .select2-container--default .select2-selection__rendered { line-height: 46px !important; }
body.p2b-co-shell .select2-container--default .select2-selection__arrow { height: 46px !important; }

/* Order review + payment cards */
body.p2b-co-shell .woocommerce-checkout-review-order,
body.p2b-co-shell #order_review {
	background: var(--co-paper); border: 1px solid var(--co-line); border-radius: 20px; padding: 22px;
}
body.p2b-co-shell table.shop_table { border: none !important; background: transparent; }
body.p2b-co-shell table.shop_table td, body.p2b-co-shell table.shop_table th { border-color: var(--co-line) !important; }
body.p2b-co-shell #payment { background: transparent !important; border-radius: 14px; }
body.p2b-co-shell #payment .payment_box { background: #fff !important; border-radius: 12px; }
body.p2b-co-shell #payment ul.payment_methods { border-bottom-color: var(--co-line) !important; }

/* Buttons — every action takes the gradient accent. */
body.p2b-co-shell .button, body.p2b-co-shell button[type="submit"], body.p2b-co-shell input[type="submit"],
body.p2b-co-shell #place_order {
	background: var(--co-accent) !important;
	color: #fff !important; border: none !important; border-radius: 999px !important;
	padding: 14px 28px !important; font-weight: 600 !important; font-family: inherit !important;
	box-shadow: 0 1px 2px rgba(16,24,40,.06) !important; text-shadow: none !important; cursor: pointer;
	transition: background .18s ease, box-shadow .18s ease;
}
body.p2b-co-shell .button:hover, body.p2b-co-shell #place_order:hover { background: var(--co-deep) !important; box-shadow: 0 6px 14px -3px rgba(37,99,235,.4) !important; }
body.p2b-co-shell #place_order { width: 100%; font-size: 16px !important; }

/* Notices */
body.p2b-co-shell .woocommerce-info, body.p2b-co-shell .woocommerce-message, body.p2b-co-shell .woocommerce-error {
	border-radius: 12px; border-top-color: var(--co-accent) !important; background: var(--co-paper);
}
body.p2b-co-shell .woocommerce-info::before, body.p2b-co-shell .woocommerce-message::before { color: var(--co-accent) !important; }

/* Kill leaked theme floaters (back-to-top, sticky bars) inside the shell. */
body.p2b-co-shell .haru-back-to-top, body.p2b-co-shell .back-to-top, body.p2b-co-shell #wpadminbar + .haru-header { display: none !important; }

/* COD reassurance strip (behavioral v0.45.0) — reframes OTP/COD friction as a trust feature. */
.p2b-co-trust {
	text-align: center; font-size: 13px; font-weight: 700; color: #067647;
	background: #ECFDF3; border-bottom: 1px solid #D1FADF; padding: 9px 16px; line-height: 1.7;
}
