/* CSS Document */
/* Disable horizontal scrolling inside cart */
#cart .table-wrapper,
#cart .table-responsive {
    width: 100%;
    margin: 0;
    overflow-x: visible !important;
    -webkit-overflow-scrolling: touch;
}
.carrier-info {
	font-size:0.8em;
	margin-top:5px;
	line-height:1em
	}
.shipping-options-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 8px 0;
	font-weight: normal;
}
.shipping-option-card {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.shipping-option-card:hover {
	border-color: #999;
}
.shipping-option-card.selected {
	border-color: #8bc34a24;
	background: #4caf501c;
}
.shipping-option-card input[type="radio"] {
	flex: 0 0 auto;
	margin: 0;
}
.shipping-option-main {
	flex: 1 1 auto;
	font-size: 0.9em;
	line-height: 1.3em;
	text-transform: none;
}
.shipping-option-card .badge {
	flex: 0 0 auto;
}
#carrierOverlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carrierOverlayBox {
    background: #fff;
    padding: 35px;
    border-radius: 14px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}

#carrierOverlayText {
    margin-top: 20px;
}

.cart-icon {
    position: relative;
}

.notification-count {
    display: inline-block;
    background: #28a745;
    color: #fff !important;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 4px;
    margin-left: -7px;
    vertical-align: super;
}
.cart-mobile-icon {
    position: relative;
}

.cart-count-mobile {
    position: absolute;
    top: 2px;
    right: 22%;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 0 4px;
}
#mobileBottomBar {
    display: none;
}

@media screen and (max-width: 736px) {

    body {
        padding-bottom: 70px;
    }

    #mobileBottomBar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 58px;
        background: #111;
        z-index: 99;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
    }

    #mobileBottomBar a {
        flex: 1;
        color: #fff;
        text-align: center;
        font-size: 0.75em;
        padding-top: 15px;
        text-decoration: none;
        border: 0;
    }

    #mobileBottomBar i {
        display: block;
        font-size: 1.35em;
        margin-bottom: 2px;
    }

    #mobileBottomBar span {
        display: block;
        line-height: 1.2em;
    }
}

@media screen and (min-width: 737px) {
    #mobileBottomBar {
        display: none !important;
    }
}


.wrapper > .innercart {
	margin: 0 auto;
	width: 100%;
}

/* Large desktop */
@media screen and (min-width: 981px) {
	.wrapper > .innercart {
		width: 100%;
	}
}

/* Tablet */
@media screen and (max-width: 980px) {
	.wrapper > .innercart {
		width: 95%;
		max-width: 95%;
	}
}

/* Mobile */
@media screen and (max-width: 736px) {
	.wrapper > .innercart {
		width: 95%;
		max-width: 95%;
	}
}

/* =========================
   Two-column checkout grid
   Left = cart items (order summary) + Send to Phone, sticky.
   Right = delivery address, shipping options, payment - stacked.
========================= */

/*
.wrapper's sitewide padding-top (4em) clears the fixed 3.5em #header plus a
0.5em buffer - that buffer read as a blank white gap above the checkout
grid's colored columns. #header's height is fixed at 3.5em (main.css), so
that's the minimum needed to clear it without hiding content underneath.
*/
#cart.wrapper {
	padding-top: 3.5em;
}

.checkout-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

.checkout-grid-left,
.checkout-grid-right {
	min-width: 0;
}

.checkout-grid-left {
	background: #f5f5f5;
}

.checkout-grid-right {
	background: #fff;
}

/*
Each block (cart items table, address form, shipping options, payment,
send-to-phone) needs to read as its own distinct card against the column
backgrounds above (.checkout-grid-left's gray, .checkout-grid-right's
white), the way Edison's Delivery Methods / Shipping Address / Order
Summary blocks do - instead of everything sitting flush inside one
continuous box. table.checkout already has this look (white bg, radius,
shadow) since it needs the same treatment regardless of column;
.checkout-card gives the same look to the non-table blocks (payment,
address recovery, send-to-phone).
*/
.checkout-card {
	background: #fff;

	padding: 1rem;
}

.checkout-cart-summary,
.checkout-grid-right {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/*
Send to Phone lives outside .checkout-grid (moved to the bottom of
cart/index.php, like #customerPanel/#cartPanel) and is pinned to the
viewport at every breakpoint - only its width changes (48% desktop, to
line up with the left column, vs 100% mobile - see the media queries
below). flex-direction:column-reverse visually flips the toggle-then-
content DOM order so content sits above the toggle: since the box is
anchored via bottom:0, growing the (reversed-first) content's max-height
pushes the box's top edge upward, i.e. the panel slides up from behind
the bar instead of pushing the bar off the bottom of the screen.
*/
.checkout-send-to-phone {
	position: fixed;
	left: 0;
	bottom: 0;
	z-index: 99;
	display: flex;
	flex-direction: column-reverse;
	padding: 0;
	overflow: hidden;
	/* border-radius: 14px 14px 0 0; */
	box-shadow: 0 -2px 10px rgba(0,0,0,0.12);
	/* padding-top: 1em; */
	background: #2196f3;
	/* opacity: 0.3; */
}

.checkout-send-to-phone-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	flex: 0 0 auto;
	background: #2196F3;
	color: #fff;
	border: 0;
	cursor: pointer;
	padding: 1rem;
	font-size: 1em;
	font-weight: 600;
	text-align: left;
}

.checkout-send-to-phone-toggle i {
	transition: transform 0.25s ease;
}

.checkout-send-to-phone.open .checkout-send-to-phone-toggle i {
	transform: rotate(180deg);
}

.checkout-send-to-phone-content {
	max-height: 0;
	overflow-y: auto;
	opacity: 0;
	transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
	padding: 0 1rem;
}

.checkout-send-to-phone.open .checkout-send-to-phone-content {
	max-height: min(70vh, 600px);
	opacity: 1;
	padding: 0 1rem 1rem;
}

@media screen and (max-width: 980px) {
	.checkout-send-to-phone {
		right: 0;
		width: 100%;
	}
}

/*
table.checkout defaults to table-layout:auto, so a long product name or
fixed-width cell can force the table wider than its grid column. #cart
.table-wrapper (the outer #quotable card) already forces overflow-x:visible,
so without this the overflow doesn't scroll or clip - it renders past the
column edge, over .checkout-grid-right. Scoping overflow-x:auto to a wrapper
around just the table keeps any overflow contained (scrollable) to that
table instead of bleeding into the other column.
*/
.checkout-table-contain {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/*
main.css makes select/input[type=text] display:block; width:100% sitewide,
so #countryCode and #clientnumber (cart/helpers/sms-text.php's non-popup
form) stack on their own rows by default. Making #smsform a wrapping flex
row puts them side by side, with the submit button forced onto its own
line below via flex-basis:100%. min-width:0 is needed because flex items
default to min-width:auto, which for a <select> resolves to its min-content
width (~376px here, from its longest option text) and overrides
flex-shrink:0/flex-basis entirely unless cleared.
*/
#smsform {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
	margin-top: 2em;
}

#smsform #countryCode {
	width: auto;
	min-width: 0;
	flex: 0 0 160px;
}

#smsform #clientnumber {
	width: auto;
	min-width: 0;
	flex: 1 1 180px;
}

#smsform input[type="submit"] {
	flex-basis: 100%;
}

.checkout-cart-heading {
	text-align: left;
	margin-bottom: 10px;
	padding: 1em 2em 0em;
}

.checkout-cart-heading h2 {
	margin-bottom: 0.3em;
}

@media screen and (min-width: 981px) {
	.checkout-grid {
		grid-template-columns: minmax(20px, 50%) 1fr;
		gap: 40px;
		align-items: start;
	}

	.checkout-grid-left {
		position: sticky;
		top: calc(3.5em + 20px);
		height: 100%;
		padding-bottom: 3em;
	}

	/*
	Send to Phone now lives outside .checkout-grid entirely (moved to the
	bottom of cart/index.php, like #customerPanel/#cartPanel), pinned to the
	viewport rather than a grid column - so its width has to be set
	explicitly here to line up with the left column instead of inheriting
	it structurally. 50% matches .checkout-grid's minmax(20px, 50%) track.
	*/
	.checkout-send-to-phone {
		width: 50%;
	}
}

/*
Below the two-column breakpoint the left column's own box is unwrapped
(display:contents), so .checkout-cart-summary becomes a direct item of
.checkout-grid instead of staying nested one level down inside a box that
would otherwise force it into the left column's track.
*/
@media screen and (max-width: 980px) {
	.checkout-grid-left {
		display: contents;
	}
}

/* =========================
   Clean Shopify-like Checkout
========================= */

table.checkout {
	width: calc(100% - 4em);
	margin: 0 auto;
	border-collapse: separate;
}


/* Header */

table.checkout thead {
	background: #fafafa;
}

table.checkout thead th {
	padding: 1em 1.25em;

	font-size: 0.78em;
	font-weight: 600;

	text-transform: uppercase;
	letter-spacing: 0.05em;

	color: #6b7280;

	border: 0;
	text-align: left;
}

/* Rows */

table.checkout tbody tr {
	background: #fff;

	transition:
		background 0.2s ease,
		transform 0.2s ease;
}

/* Soft row separation */

table.checkout tbody tr + tr td {
	box-shadow: inset 0 1px 0 rgba(0,0,0,0.04);
}

table.checkout tbody tr:hover {
	background: #fafafa;
}
@media screen and (max-width: 736px) {
.table-wrapper table.checkout {
		width: 100%;
		font-size: 1.4em;
	}
}
/* Cells */

table.checkout tbody tr td {
	padding: 1.15em 1.25em;

	border: 0;

	vertical-align: middle;

	font-size: 0.95em;
	line-height: 1.45em;

	color: #222;
}

/*
The image column pushed Product into the nth-child(2) slot, so main.css's
".table-wrapper td:nth-child(2)" (meant for a leading price/qty column)
now lands on the product name instead - its `white-space:nowrap` and
`width:1%` fight the fixed table-layout below, forcing the name to overflow
instead of wrapping into whatever space the image/qty/price columns leave
it. Reset both so the name wraps and just takes the remaining width.
*/
table.checkout tbody tr td:nth-child(2),
table.checkout thead th:nth-child(2) {
	white-space: normal;
	overflow-wrap: break-word;
	width: auto;
}

/* Remove zebra */

table.checkout tbody tr:nth-child(2n + 1) {
	background: #fff;
}

/* Product image */

table.checkout tbody tr td img {
	border-radius: 10px;

	padding: 0.15em;

	max-width: 72px;
	height: auto;
}

/* Totals/Footer */

table.checkout tfoot {
	background: #fafafa;
}

table.checkout tfoot td {
	padding: 1.1em 1.25em;

	font-size: 0.95em;

	border: 0;

	color: #333;
}

/* Total line */

table.checkout tfoot tr:last-child td {
	font-size: 1.08em;
	font-weight: 700;
	color: #111;
}

/* Buttons */

table.checkout .button,
table.checkout button,
table.checkout input[type="submit"] {

	background: #111827;
	color: #fff !important;

	border: 0;
	border-radius: 12px;

	padding: 0.95em 1.5em;

	font-size: 0.95em;
	font-weight: 600;

	transition: all 0.2s ease;

	box-shadow:
		0 1px 2px rgba(0,0,0,0.06),
		0 4px 12px rgba(0,0,0,0.08);
}

table.checkout .button:hover,
table.checkout button:hover,
table.checkout input[type="submit"]:hover {

	background: #000;

	transform: translateY(-1px);

	box-shadow:
		0 2px 6px rgba(0,0,0,0.08),
		0 10px 24px rgba(0,0,0,0.12);
}

/* Inputs */

table.checkout input[type="text"],
table.checkout input[type="email"],
table.checkout input[type="tel"],
table.checkout select {

	width: 100%;

	border: 0;

	background: #f5f5f5;

	border-radius: 10px;

	padding: 0.9em 1em;

	font-size: 0.95em;

	transition:
		background 0.2s ease,
		box-shadow 0.2s ease;
}

table.checkout input:focus,
table.checkout select:focus {

	background: #fff;

	box-shadow:
		0 0 0 2px rgba(17,24,39,0.08),
		0 2px 8px rgba(0,0,0,0.05);

	outline: none;
}

/* Prices */

table.checkout .price,
table.checkout .amount {
	font-weight: 600;
	color: #111;
	white-space: nowrap;
}

/* Mobile */

@media screen and (max-width: 768px) {

	table.checkout tbody tr td,
	table.checkout tfoot td {
		padding: 0.9em;
		font-size: 0.82em;
	}

	table.checkout tbody tr td img {
		max-width: 56px;
	}

	table.checkout .button,
	table.checkout button,
	table.checkout input[type="submit"] {
		width: 100%;
	}
}

/* Extra Small */

@media screen and (max-width: 480px) {

	table.checkout {
		border-radius: 10px;
	}

	table.checkout tbody tr td,
	table.checkout tfoot td {
		font-size: 0.74em;
		line-height: 1.25em;
		padding: 0.75em;
	}

	table.checkout thead th {
		font-size: 0.64em;
		padding: 0.7em;
	}
}
