/*
Theme Name: CODpress
Theme URI: getcodpress.com
Author: CODpress
Author URI: getcodpress.com
Description: 
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: CODpress-cod
*/

.page__cntn {
	max-width: none;
	margin: 0;
	width: 100%;
}

.page__title,
.page__desc,
.page__desc .cntx {
	text-align: right;
}

html[dir="ltr"],
html[dir="ltr"] body {
	direction: ltr;
	text-align: left;
}

html[dir="ltr"] .page__title,
html[dir="ltr"] .page__desc,
html[dir="ltr"] .page__desc .cntx {
	text-align: left;
}

.woocommerce-message,
.woocommerce-info {
	display: none !important;
}

body:not(.woocommerce-checkout) .woocommerce-notices-wrapper,
body:not(.woocommerce-checkout) .woocommerce-error {
	display: none !important;
}

body.woocommerce-checkout .woocommerce-notices-wrapper,
body.woocommerce-checkout .woocommerce-NoticeGroup,
body.woocommerce-checkout .woocommerce-error {
	display: none !important;
}

a.added_to_cart.wc-forward {
	display: none !important;
}

.woocommerce .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
}

.woocommerce .woocommerce-MyAccount-navigation li {
	margin-bottom: 10px;
}

.woocommerce .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 12px 15px;
	border: 1px solid #e8e8e8;
	border-radius: 3px;
	background: #fff;
}

.woocommerce .woocommerce-MyAccount-navigation .is-active a {
	border-color: var(--bs-base_color);
}

.al-account-nav {
	width: 280px;
}

.al-account-content {
	min-width: 0;
}

@media (max-width: 768px) {
	.al-account-nav {
		width: 100%;
		margin-bottom: 15px;
	}
}

.al-login-grid {
	margin-top: -25px;
	margin-right: -25px;
}

.al-login-grid > * {
	padding-top: 25px;
	padding-right: 25px;
	box-sizing: border-box;
	width: 50%;
}

@media (max-width: 768px) {
	.al-login-grid {
		margin-top: -15px;
		margin-right: -10px;
	}

	.al-login-grid > * {
		padding-top: 15px;
		padding-right: 10px;
		width: 100%;
	}
}

.al-404 {
	padding: 40px 0;
}

.al-404__inner {
	text-align: center;
}

.al-404__img {
	display: block;
	max-width: 520px;
	width: 100%;
	height: auto;
	margin: 0 auto 18px;
}

.al-404__text {
	margin: 0 0 16px;
	color: #757575;
	font-size: 16px;
	line-height: 1.6;
}

/* =============================================================
   Stock Status (below prices, theme-compatible plain text)
   NO badge / NO box — just a natural phrase line with icons
   ============================================================= */

.al-stock-row {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 6px 0 14px;
	font-size: 14px;
	line-height: 1.5;
	will-change: transform, opacity;
	transform-origin: right center;
}
html[dir="ltr"] .al-stock-row { transform-origin: left center; }

/* The small colored dot (status indicator) */
.al-stock-row .al-stock-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 1px;
	position: relative;
}

/* The icon next to it */
.al-stock-row .al-stock-ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	opacity: 0.92;
}
.al-stock-row .al-stock-ic svg { display: block; }

/* The main label ("متوفر في المخزون (33)") */
.al-stock-row .al-stock-label {
	display: inline;
	font-weight: 500;
	letter-spacing: 0.2px;
	position: relative;
}

/* Underline that grows from right (natural, not AI-like) */
.al-stock-row .al-stock-label::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: -2px;
	height: 1.5px;
	width: 0;
	transition: width 550ms cubic-bezier(0.22, 1, 0.36, 1);
	opacity: 0.8;
}

/* ---------- In Stock (Green) ---------- */
.al-stock-row.al-stock-in            { color: #15803d; }
.al-stock-row.al-stock-in .al-stock-dot {
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.al-stock-row.al-stock-in .al-stock-ic    { color: #16a34a; }
.al-stock-row.al-stock-in .al-stock-label::after { background: #22c55e; }

/* ---------- Out of Stock (Red) ---------- */
.al-stock-row.al-stock-out {
	color: #b91c1c;
}
.al-stock-row.al-stock-out .al-stock-dot {
	background: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.al-stock-row.al-stock-out .al-stock-ic    { color: #dc2626; }
.al-stock-row.al-stock-out .al-stock-label::after { background: #ef4444; }

/* ---------- Neutral / Choose options (Soft blue) ---------- */
.al-stock-row.al-stock-neutral { color: #1d4ed8; }
.al-stock-row.al-stock-neutral .al-stock-dot {
	background: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.al-stock-row.al-stock-neutral .al-stock-ic    { color: #2563eb; }
.al-stock-row.al-stock-neutral .al-stock-label::after { background: #3b82f6; }

/* ========================================
   ANIMATIONS — natural / subtle
   ======================================== */

/* Entrance: Fade + slight Y rise, 380ms */
@keyframes alStockRowIn {
	0% {
		opacity: 0;
		transform: translateY(4px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}
.al-stock-row.al-stock--animated {
	animation: alStockRowIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.al-stock-row.al-stock--animated .al-stock-label::after {
	animation-delay: 220ms;
	/* grow underline shortly after fade-in */
}

/* After load: reveal underline after short delay */
.al-stock-row.al-stock--animated .al-stock-label::after {
	width: 100%;
}

/* When status changes: soft text glow + dot breath */
@keyframes alStockLabelSoft {
	0%   { opacity: 0.35; filter: saturate(0.9); }
	50%  { opacity: 1;    filter: saturate(1.3); }
	100% { opacity: 1;    filter: saturate(1);   }
}
@keyframes alStockDotBreath {
	0%   { transform: scale(1);   }
	40%  { transform: scale(1.45);}
	100% { transform: scale(1);   }
}
.al-stock-row.is-changing .al-stock-label {
	animation: alStockLabelSoft 550ms ease-out 1;
}
.al-stock-row.is-changing .al-stock-dot {
	animation: alStockDotBreath 550ms cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

/* Hide legacy stock cards inside the form */
.product__form .variant__stock-card {
	display: none !important;
}

/* ============================================================
   CHECKOUT — Shipping section above Buy Now button (v1.0.6)
   ✅ UX UPDATED: Now blends WITHIN the form (no nested card)
   ✅ Visual harmony with the other quick-order fields
   ============================================================ */

.al-shipping-section {
	margin-top: 16px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	transition: opacity .2s ease;
}

.al-shipping-section.is-invalid {
	background: transparent;
	box-shadow: none;
}

.al-shipping-section.is-invalid .al-shipping-section__list {
	border: 1px solid rgba(234, 40, 22, 0.35);
	background: rgba(234, 40, 22, 0.03);
	border-radius: 10px;
	padding: 10px;
	margin: -10px;
}

.al-shipping-section.is-hidden {
	display: none !important;
}

/* ---- Section header: minimal, inline, matches field-label aesthetic ---- */

.al-shipping-section__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding: 0;
	border-bottom: none;
}

.al-shipping-section__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	color: var(--bs-base_color);
	background: transparent;
	flex-shrink: 0;
}

.al-shipping-section__icon svg {
	width: 19px;
	height: 19px;
	display: block;
	stroke-width: 2.2;
}

.al-shipping-section__title {
	font-size: 14.5px;
	font-weight: 800;
	color: #111827;
	letter-spacing: 0.1px;
	line-height: 1.2;
}

/* Required asterisk if needed */
.al-shipping-section__title::after {
	content: "";
	display: none;
}

html[dir="ltr"] .al-shipping-section__header {
	flex-direction: row;
}

/* ---- Shipping options grid ---- */

.al-shipping-section__list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 2px;
}

@media (max-width: 520px) {
	.al-shipping-section__list {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.al-ship-card__inner {
		grid-template-columns: 34px 1fr;
		column-gap: 9px;
		row-gap: 5px;
		padding: 10px 11px;
	}

	.al-ship-card__icon {
		width: 34px;
		height: 34px;
		border-radius: 9px;
	}

	.al-ship-card__icon svg {
		width: 18px;
		height: 18px;
	}

	.al-ship-card__body {
		padding-top: 1px;
		gap: 2px;
	}

	.al-ship-card__label {
		font-size: 14px;
		line-height: 1.22;
	}

	.al-ship-card__price {
		padding: 3px 9px;
	}

	.al-ship-card__amount {
		font-size: 13px;
	}
}

/* ---- Shipping card ---- */

.al-ship-card {
	position: relative;
	display: block;
	cursor: pointer;
	user-select: none;
	margin: 0;
	-webkit-tap-highlight-color: transparent;
}

.al-ship-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	inset: 0;
}

/* Keyboard focus ring (a11y + UX) */
.al-ship-card input[type="radio"]:focus-visible ~ .al-ship-card__inner {
	outline: 2px solid var(--bs-base_color);
	outline-offset: 2px;
}

/* =========================================================
   SHIPPING CARDS — FORM-HARMONIOUS COMPACT GRID
   ✅ Matches the visual language of other .product__ftin inputs
   ✅ No nested-card feeling, feels like just another form field group
   ========================================================= */

.al-ship-card__inner {
	display: grid;
	grid-template-columns: 36px 1fr;
	grid-template-rows: auto auto;
	column-gap: 10px;
	row-gap: 6px;
	align-items: start;
	padding: 11px 12px;
	border: 1.5px solid #e5e7eb;
	border-radius: 9px;
	background: #fff;
	transition: border-color .18s ease, background .18s ease,
		box-shadow .18s ease;
	position: relative;
}

.al-ship-card:hover .al-ship-card__inner {
	border-color: color-mix(in srgb, var(--bs-base_color) 40%, #d1d5db);
	background: #fcfcfd;
}

.al-ship-card.is-selected .al-ship-card__inner,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner {
	border-color: var(--bs-base_color);
	background: #fff;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-base_color) 12%, transparent);
}

.al-ship-card.is-disabled {
	opacity: .45;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---- Column 1: Icon (spans both rows) ---- */

.al-ship-card__icon {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 9px;
	flex-shrink: 0;
	transition: background .18s ease, color .18s ease;
}

.al-ship-card__icon svg {
	width: 19px;
	height: 19px;
	display: block;
}

.al-ship-card__icon.home {
	color: #0ea5e9;
	background: rgba(14, 165, 233, 0.09);
}

.al-ship-card__icon.office {
	color: #8b5cf6;
	background: rgba(139, 92, 246, 0.09);
}

.al-ship-card.is-selected .al-ship-card__icon.home,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner .al-ship-card__icon.home {
	color: #fff;
	background: var(--bs-base_color);
}

.al-ship-card.is-selected .al-ship-card__icon.office,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner .al-ship-card__icon.office {
	color: #fff;
	background: var(--bs-base_color);
}

/* ---- Column 2, Row 1: Label + hint ---- */

.al-ship-card__body {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 2px;
}

.al-ship-card__label {
	font-size: 14.5px;
	font-weight: 800;
	color: #111827;
	line-height: 1.25;
	word-break: break-word;
	hyphens: auto;
}

.al-ship-card__hint {
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	line-height: 1.3;
	opacity: .95;
}

/* ---- Column 2, Row 2: Price DIRECTLY below text (6px gap = NOT far) ---- */

.al-ship-card__price {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	justify-self: start;
	align-self: start;
	padding: 3px 10px;
	border-radius: 7px;
	background: #f4f5f7;
	border: 1px solid transparent;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.al-ship-card__amount {
	display: inline-block;
	font-size: 13.5px;
	font-weight: 800;
	color: #0f172a;
	white-space: nowrap;
	line-height: 1.2;
}

.al-ship-card.is-selected .al-ship-card__price,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner .al-ship-card__price {
	background: color-mix(in srgb, var(--bs-base_color) 12%, transparent);
	border-color: color-mix(in srgb, var(--bs-base_color) 22%, transparent);
}

.al-ship-card.is-selected .al-ship-card__amount,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner .al-ship-card__amount {
	color: var(--bs-base_color);
	font-weight: 900;
}

/* Subtle label color shift when selected */
.al-ship-card.is-selected .al-ship-card__label,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner .al-ship-card__label {
	color: var(--bs-base_color);
}

/* ---- Floating checkmark BADGE for selected card ---- */

.al-ship-card.is-selected .al-ship-card__inner::after,
.al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner::after {
	content: "";
	position: absolute;
	top: -6px;
	inset-inline-end: 10px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--bs-base_color);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
	background-size: 10px 10px;
	background-position: center;
	background-repeat: no-repeat;
}

html[dir="ltr"] .al-ship-card.is-selected .al-ship-card__inner::after,
html[dir="ltr"] .al-ship-card input[type="radio"]:checked ~ .al-ship-card__inner::after {
	right: auto;
	left: 10px;
}

/* Error state — inline error msg placement */

.al-shipping-section__error.text-danger {
	display: block;
	margin-top: 8px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	background: rgba(234, 40, 22, 0.06);
	border: 1px dashed rgba(234, 40, 22, 0.25);
	border-radius: 7px;
}

/* Submit button spacing after shipping section */

.product__form .al-shipping-section + .product__fmsb,
.product__form .al-shipping-section + #payment,
.product__form .al-shipping-section + * + .product__fmsb,
.product__form .al-shipping-section + * + #payment {
	margin-top: 16px;
}

.product__fmsb.al-checkout-submit {
	margin-top: 14px;
}

