/**
 * Default styling for WhatsApp link / order form / add-to-cart area
 * on a product's normal WooCommerce page. Only ever loaded there —
 * never on an uploaded landing page (see
 * StandardProductIntegration::maybe_enqueue_styles()).
 *
 * Every rule is intentionally soft on color choices (currentColor /
 * neutral defaults) so it sits reasonably inside most themes without
 * fighting them, while still giving the fields, buttons, and price
 * breakdown a clean, professional structure out of the box.
 */

/* ---------- WhatsApp link ---------- */

.wclpb-whatsapp-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.85em 1.5em;
	background: #25d366;
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
	transition: background 0.15s ease, transform 0.15s ease;
}

.wclpb-whatsapp-link::before {
	content: "\1F4AC";
	font-size: 1.1em;
	line-height: 1;
}

.wclpb-whatsapp-link:hover,
.wclpb-whatsapp-link:focus {
	background: #1ebe57;
	color: #fff;
	transform: translateY(-1px);
}

/* ---------- Standard add-to-cart (WooCommerce's own form, restyled) ---------- */

.wclpb-add-to-cart {
	margin: 1em 0;
}

.wclpb-add-to-cart .quantity {
	display: inline-block;
	margin-right: 0.75em;
	vertical-align: middle;
}

.wclpb-add-to-cart .quantity .qty {
	width: 4.5em;
	padding: 0.7em 0.6em;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	font-size: 1rem;
	text-align: center;
}

.wclpb-add-to-cart button.single_add_to_cart_button {
	padding: 0.85em 1.75em;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 6px;
	border: none;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.wclpb-add-to-cart button.single_add_to_cart_button:hover,
.wclpb-add-to-cart button.single_add_to_cart_button:focus {
	background: #000;
	transform: translateY(-1px);
}

/* ---------- Direct-checkout order form ---------- */

.wclpb-order-form {
	max-width: 420px;
	margin: 1em 0;
	padding: 1.5em;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	background: #fafafa;
}

.wclpb-order-form .wclpb-field {
	margin: 0 0 1.1em;
}

.wclpb-order-form .wclpb-field label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 600;
	font-size: 0.9rem;
}

.wclpb-order-form .wclpb-field input,
.wclpb-order-form .wclpb-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75em 0.9em;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	font-size: 1rem;
	background: #fff;
}

.wclpb-order-form .wclpb-field input:focus,
.wclpb-order-form .wclpb-field select:focus {
	outline: none;
	border-color: #1d2327;
	box-shadow: 0 0 0 3px rgba(29, 35, 39, 0.1);
}

/* Price breakdown */

.wclpb-price-breakdown {
	margin: 1.2em 0;
	padding: 1em 1.1em;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
}

.wclpb-line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0.5em 0;
	font-size: 0.95rem;
}

.wclpb-line-subtotal,
.wclpb-line-delivery {
	color: #555;
}

.wclpb-line-total {
	margin-top: 0.7em;
	padding-top: 0.7em;
	border-top: 1px dashed #d6d6d6;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1d2327;
}

.wclpb-line-label {
	white-space: nowrap;
}

.wclpb-line-value {
	text-align: right;
}

/* Submit button */

.wclpb-order-form .wclpb-submit-order {
	width: 100%;
	padding: 1em;
	font-size: 1.05rem;
	font-weight: 700;
	border: none;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.wclpb-order-form .wclpb-submit-order:hover,
.wclpb-order-form .wclpb-submit-order:focus {
	background: #000;
	transform: translateY(-1px);
}

/* ---------- Cart page delivery city row ---------- */

.wclpb-cart-delivery-row th {
	vertical-align: top;
	padding-top: 1em;
}

.wclpb-cart-delivery-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
}

.wclpb-cart-delivery-form select {
	padding: 0.6em 0.8em;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	font-size: 0.95rem;
}

.wclpb-cart-delivery-form button.button {
	padding: 0.6em 1.2em;
	border-radius: 6px;
	font-weight: 600;
}

/* ---------- Post-purchase offers (Thank You page) ---------- */

.wclpb-upsell-wrapper {
	margin: 2.5em 0;
}

.wclpb-upsell-notice {
	margin: 0 0 1.4em;
	padding: 0.9em 1.1em;
	border-radius: 8px;
	font-weight: 600;
}

.wclpb-upsell-notice-success {
	background: #e7f6ec;
	color: #14532d;
	border: 1px solid #b7e4c7;
}

.wclpb-upsell-notice-error {
	background: #fdecec;
	color: #7f1d1d;
	border: 1px solid #f5b5b5;
}

.wclpb-upsell-intro {
	margin-bottom: 1.4em;
	text-align: center;
}

.wclpb-upsell-heading {
	margin: 0 0 0.3em;
	font-size: 1.5rem;
	line-height: 1.25;
}

.wclpb-upsell-sub {
	margin: 0;
	color: #555;
	font-size: 0.95rem;
}

.wclpb-upsell-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.2em;
	justify-content: center;
}

.wclpb-upsell-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.55em;
	padding: 1.1em;
	border: 2px solid #e5e5e5;
	border-radius: 12px;
	background: #fff;
	text-align: center;
	transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.wclpb-upsell-card:hover {
	border-color: #1d2327;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.wclpb-upsell-badge {
	position: absolute;
	top: 0.7em;
	left: 0.7em;
	z-index: 1;
	padding: 0.25em 0.65em;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
}

.wclpb-upsell-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.wclpb-upsell-name {
	font-weight: 700;
	font-size: 1rem;
}

.wclpb-upsell-text {
	color: #555;
	font-size: 0.9rem;
}

.wclpb-upsell-price {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: 0.6em;
	font-size: 1.1rem;
}

.wclpb-upsell-price del {
	opacity: 0.55;
	font-size: 0.9em;
}

.wclpb-upsell-price ins {
	text-decoration: none;
	font-size: 1.35em;
	font-weight: 800;
	color: #d63638;
}

.wclpb-upsell-save {
	align-self: center;
	padding: 0.2em 0.7em;
	border-radius: 6px;
	background: #fff4e5;
	color: #92400e;
	font-size: 0.85rem;
	font-weight: 600;
}

.wclpb-upsell-timer {
	margin: 0;
	font-size: 0.9rem;
	color: #92400e;
}

.wclpb-upsell-countdown {
	font-variant-numeric: tabular-nums;
	font-size: 1.1em;
	color: #d63638;
}

.wclpb-upsell-cta-wrap {
	margin-top: auto;
	padding-top: 0.4em;
}

.wclpb-upsell-form {
	margin: 0;
}

.wclpb-upsell-cta {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.9em 1em;
	border: none;
	border-radius: 8px;
	background: #1d2327;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.wclpb-upsell-cta:hover,
.wclpb-upsell-cta:focus {
	background: #000;
	color: #fff;
	transform: translateY(-1px);
}

/* Offer whose countdown ran out: keep the card, drop the button. */
.wclpb-upsell-expired {
	opacity: 0.6;
}

.wclpb-upsell-expired .wclpb-upsell-cta-wrap {
	display: none;
}

/* ---------- Arabic (right-to-left) ---------- */

.wclpb-order-form[dir="rtl"],
.wclpb-cart-delivery-form[dir="rtl"],
.wclpb-upsell-wrapper[dir="rtl"] {
	text-align: right;
}

/* Phone numbers and quantities stay left-to-right digits, but sit on
   the right edge so they line up with the other fields. */
.wclpb-order-form[dir="rtl"] input[type="tel"],
.wclpb-order-form[dir="rtl"] input[type="number"] {
	direction: ltr;
	text-align: right;
}

/* Amounts keep reading naturally (digits then currency) at the far
   side of each price line. */
.wclpb-order-form[dir="rtl"] .wclpb-line-value {
	text-align: left;
	direction: ltr;
}

.wclpb-whatsapp-link[dir="rtl"] {
	flex-direction: row-reverse;
}

.wclpb-upsell-wrapper[dir="rtl"] .wclpb-upsell-badge {
	left: auto;
	right: 0.7em;
}
