/* =========================================================
   INITIAL IMPRESSIONS - DANSIE CART OVERRIDES
   Full replacement for initial-impressions-dansie.css
   Safe CSS-only modernization for legacy Dansie cart markup

   IMPORTANT:
   Personal Variable 40 in vars.dat must be set to 1
   Personal Variable 41 in vars.dat must be set to 98%
   ========================================================= */


/* =========================================================
   COLOR / STYLE VARIABLES
   Change these first for easy site-wide updates
   ========================================================= */

:root {
	--cart-bg: transparent;
	--cart-surface: #ffffff;
	--cart-surface-soft: #f6f4fb;

	--cart-text: #59577b;
	--cart-text-soft: #7a7898;
	--cart-heading: #59577b;

	--cart-border: #d5d3ec;
	--cart-border-strong: #bebadf;

	--cart-accent: #6d6a96;
	--cart-accent-soft: #eceaf8;
	--cart-accent-hover: #59577b;
	--cart-accent-active: #464464;

	--cart-table-header: #ffffb9;

	--cart-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	--cart-radius: 10px;

	--cart-max-width: 980px;
	--cart-font: Verdana, Arial, sans-serif;

	--cart-header-max-width: 424px;
	--cart-header-margin-top: 20px;
	--cart-header-margin-bottom: 12px;
}


/* =========================================================
   GLOBAL RESET / BASE
   ========================================================= */

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 16px 10px 32px;
	color: var(--cart-text);
	font-family: var(--cart-font);
	font-size: 18px;
	line-height: 1.45;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
	border: 0;
}

table {
	border-collapse: collapse;
}

td {
	color: var(--cart-text);
	font-family: var(--cart-font);
	font-size: 17px;
	line-height: 1.35;
	vertical-align: top;
}

font,
b,
strong,
i {
	font-family: var(--cart-font);
	color: inherit;
}

a:link,
a:visited,
a:active,
a:hover {
	color: var(--cart-text);
	font-family: var(--cart-font);
	text-decoration: underline;
}

a:hover {
	color: var(--cart-accent);
}


/* =========================================================
   TOP SITE HEADER / ADDRESS BLOCK
   ========================================================= */

body > center > div:first-of-type {
	width: 100% !important;
	height: auto !important;
	min-height: 150px;
	text-align: center;
	font-family: var(--cart-font);
	line-height: 1.5;
	padding: 12px 10px 18px;
	box-sizing: border-box;
	color: var(--cart-text);
}

body > center > div:first-of-type img {
	display: block;
	margin: 20px auto 12px;
	max-width: 100%;
	height: auto;
}

body > center > div:first-of-type a {
	word-break: break-word;
}


/* =========================================================
   FULL CART OUTER WRAPPER
   ========================================================= */

body > center > table[style*="border: 1px solid #D5D3EC"] {
	width: min(98%, var(--cart-max-width)) !important;
	margin: 0 auto 20px !important;
	background: rgba(255,255,255,0.94);
	border: 1px solid var(--cart-border) !important;
	border-radius: 14px !important;
	box-shadow: var(--cart-shadow);
}

body > center > table[style*="border: 1px solid #D5D3EC"] > tbody > tr > td {
	padding: 0 0 16px;
	background: transparent;
}


/* =========================================================
   CART HEADER / LOGO
   ========================================================= */

body > center > div:first-of-type img,
body > center > img:first-of-type,
body > center img[src*="logo"],
body > center img[src*="header"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-top: var(--cart-header-margin-top);
	margin-bottom: var(--cart-header-margin-bottom);
	max-width: var(--cart-header-max-width);
	width: 100%;
	height: auto;
}


/* =========================================================
   MAIN WRAPPER TABLES
   ========================================================= */

body > center > table[width="98%"],
body > center table[width="98%"],
center table[width="98%"] {
	width: min(98%, var(--cart-max-width));
	margin: 0 auto 20px;
	background: transparent;
}


/* =========================================================
   CART TABLE
   ========================================================= */

center table[border="2"] {
	width: min(98%, var(--cart-max-width)) !important;
	margin: 0 auto 18px !important;
	background: var(--cart-surface);
	border: 1px solid var(--cart-border-strong);
	box-shadow: var(--cart-shadow);
}

center table[border="2"] td {
	padding: 14px 12px;
	border: 1px solid var(--cart-border);
	font-size: 17px;
	background: var(--cart-surface);
}

center table[border="2"] tr:first-child td {
	background: var(--cart-table-header);
	color: var(--cart-heading);
	font-size: 18px;
	font-weight: 700;
	text-align: center;
}

center table[border="2"] tr:first-child i {
	font-style: normal;
	font-weight: 700;
}

center table[border="2"] td[align="right"] {
	white-space: nowrap;
}

center table[border="2"] b {
	font-size: 18px;
	color: var(--cart-heading);
	line-height: 1.35;
}

center table[border="2"] br + br {
	display: none;
}


/* =========================================================
   FORMS
   ========================================================= */

form {
	margin: 0;
}


/* =========================================================
   INPUTS / SELECTS / TEXTAREA
   ========================================================= */

input,
select,
textarea,
button {
	font-family: var(--cart-font);
	font-size: 17px !important;
	color: var(--cart-text);
	box-sizing: border-box;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
	width: auto;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--cart-border-strong);
	border-radius: 8px;
	background: #fff;
	color: var(--cart-text);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
	outline: none;
	vertical-align: middle;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	border-color: var(--cart-accent);
	box-shadow: 0 0 0 3px rgba(200, 92, 142, 0.14);
}

textarea {
	width: min(100%, 420px);
	min-height: 110px;
	line-height: 1.45;
	resize: vertical;
}

select {
	min-height: 44px;
	background: #fff;
}


/* =========================================================
   DO NOT LET LEGACY SIZE ATTRIBUTES MAKE THINGS TINY
   ========================================================= */

input[name="quantity"] {
	width: 68px;
	min-width: 68px;
	text-align: center;
	padding: 8px 8px;
	font-size: 17px !important;
}

input[name="coupon"] {
	width: 180px;
}

input[name="zip"],
input[name="zip2"] {
	width: 120px;
}

input[name="state"],
input[name="state2"] {
	width: 160px;
}

input[name="city"],
input[name="city2"],
input[name="country"],
input[name="country2"],
input[name="phone"],
input[name="phone2"],
input[name="email"],
input[name="email2"] {
	width: min(100%, 320px);
}

input[name="name"],
input[name="name2"],
input[name="address"],
input[name="address2"] {
	width: min(100%, 430px);
}


/* =========================================================
   SUBMIT / BUTTON STYLING
   ========================================================= */

input[type="submit"],
input[type="button"],
button {
	display: inline-block;
	padding: 10px 14px;
	border: 1px solid var(--cart-border-strong);
	border-radius: 8px;
	background: linear-gradient(to bottom, #ffffff, #efeff2);
	color: var(--cart-heading);
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	margin-bottom: 10px;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
	border-color: #a8aab3;
	background: linear-gradient(to bottom, #ffffff, #e8e8ed);
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	vertical-align: middle;
	margin-left: 6px;
}


/* =========================================================
   IMAGE BUTTONS
   ========================================================= */

input[type="image"] {
	border: 0;
	padding: 0;
	background: transparent;
	vertical-align: middle;
	max-width: 100%;
	height: auto;
}


/* =========================================================
   CART ACTION AREA
   ========================================================= */

body > center > table[width="98%"][border="0"],
center table[width="98%"][border="0"] {
	width: min(98%, var(--cart-max-width)) !important;
	margin: 0 auto 18px !important;
	background: transparent;
}

body > center > table[width="98%"][border="0"] > tbody > tr > td,
center table[width="98%"][border="0"] > tbody > tr > td {
	padding: 10px 12px;
	font-size: 17px;
}



/* =========================================================
   BILLING ADDRESS HEADING / GENERAL CENTER TEXT
   ========================================================= */

center {
	text-align: center;
}

center > font[size="+1"],
body > center > font[size="+1"] {
	display: block;
	margin: 0 auto 10px;
	color: var(--cart-heading);
	font-size: 32px !important;
	font-weight: 700;
	line-height: 1.2;
}

body > center > font:not([size="+1"]),
center > font:not([size="+1"]) {
	font-size: 18px !important;
	line-height: 1.45;
	color: var(--cart-text);
}


/* =========================================================
   COMMENTS / SPECIAL INSTRUCTIONS AREA
   ========================================================= */

form[name="form1"] > center table,
form[name="form1"] table[border="0"]:not([width="98%"]) {
	margin: 12px auto 0 !important;
	border-collapse: collapse;
}

form[name="form1"] > center table td,
form[name="form1"] table[border="0"]:not([width="98%"]) td {
	padding: 8px 12px 0;
	text-align: center !important;
	font-size: 17px;
	line-height: 1.5;
}


/* =========================================================
   COMMENTS AREA
   ========================================================= */

form[name="form1"] textarea[name="comments"] {
	display: block;
	margin: 12px auto 0;
	width: min(100%, 640px);
	max-width: 640px;
	min-height: 140px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
	clear: both;
	width: min(100%, 760px);
	margin: 26px auto 0;
	padding: 0 12px;
	background: transparent;
	color: var(--cart-text-soft);
	font-family: var(--cart-font);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.copyright {
	color: var(--cart-text-soft);
	font-family: var(--cart-font);
	font-size: 14px;
}


/* =========================================================
   DANSIE CREDIT LINK
   ========================================================= */

body > center:last-of-type table {
	margin-top: 10px;
}

body > center:last-of-type td,
body > center:last-of-type a,
body > center:last-of-type font {
	font-size: 13px !important;
	color: var(--cart-text-soft) !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
	body {
		font-size: 19px;
		line-height: 1.55;
	}

	td {
		font-size: 18px;
	}

	input,
	select,
	textarea,
	button {
		font-size: 16px !important;
	}

	center > font[size="+1"],
	body > center > font[size="+1"] {
		font-size: 26px !important;
	}

	body > center > font:not([size="+1"]),
	center > font:not([size="+1"]) {
		font-size: 18px !important;
	}

	input[type="text"],
	input[type="email"],
	input[type="password"],
	input[type="tel"],
	input[type="number"],
	select,
	textarea {
		padding: 10px 10px;
		border-radius: 7px;
	}

	form[name="form1"] > table[width="98%"] td:first-child {
		width: 38%;
		font-size: 15px;
		white-space: normal;
		padding-right: 10px;
	}

	input[name="name"],
	input[name="name2"],
	input[name="address"],
	input[name="address2"],
	input[name="city"],
	input[name="city2"],
	input[name="state"],
	input[name="state2"],
	input[name="country"],
	input[name="country2"],
	input[name="phone"],
	input[name="phone2"],
	input[name="email"],
	input[name="email2"] {
		width: 100%;
		max-width: 100%;
	}

	input[name="zip"],
	input[name="zip2"] {
		width: 120px;
		max-width: 100%;
	}

	form[name="form1"] > center table td,
	form[name="form1"] table[border="0"]:not([width="98%"]) td {
		padding-left: 8px;
		padding-right: 8px;
		font-size: 16px;
	}

	textarea[name="comments"] {
		width: 100%;
		max-width: 100%;
	}
}


/* =========================================================
   EXTRA SMALL SCREENS
   ========================================================= */

@media (max-width: 520px) {
	body {
		font-size: 17px;
	}

	center table[border="2"],
	body > center > table[width="98%"][border="0"],
	form[name="form1"] > table[width="98%"] {
		width: 100% !important;
	}

	center table[border="2"] td,
	form[name="form1"] > table[width="98%"] td {
		padding: 8px 6px;
		font-size: 15px;
	}

	form[name="form1"] > table[width="98%"] td:first-child {
		width: 40%;
		font-size: 14px;
	}

	center > font[size="+1"],
	body > center > font[size="+1"] {
		font-size: 21px !important;
	}
}


/* =========================================================
   START MOBILE STACKED CART TABLE
   ========================================================= */

@media only screen and (max-width: 767px) {
	table[border="1"] {
		width: 96% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		border: 0 !important;
		outline: 0 !important;
	}

	table[border="1"] > tbody > tr:first-child,
	table[border="1"] > tr:first-child {
		display: none !important;
	}

	table[border="1"] > tbody > tr,
	table[border="1"] > tr {
		display: block !important;
		width: 100% !important;
		margin: 0 0 18px 0 !important;
		border: 1px solid #d8d8dd !important;
		border-radius: 10px !important;
		background: #ffffff !important;
		box-shadow: 0 3px 10px rgba(0,0,0,0.06) !important;
		overflow: hidden !important;
	}

	table[border="1"] > tbody > tr:last-child,
	table[border="1"] > tr:last-child {
		display: table-row !important;
		margin: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
	}

	table[border="1"] > tbody > tr > td,
	table[border="1"] > tr > td {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box !important;
		text-align: left !important;
		padding: 12px !important;
		border-left: 0 !important;
		border-right: 0 !important;
		border-top: 0 !important;
		border-bottom: 1px solid #eeeeee !important;
		white-space: normal !important;
	}

	table[border="1"] > tbody > tr > td:last-child,
	table[border="1"] > tr > td:last-child {
		border-bottom: 0 !important;
	}

	table[border="1"] > tbody > tr:last-child > td,
	table[border="1"] > tr:last-child > td {
		display: table-cell !important;
		width: auto !important;
		text-align: right !important;
		border-bottom: 1px solid #d8d8dd !important;
		padding: 14px 12px !important;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(1)::before,
	table[border="1"] > tr:not(:last-child) > td:nth-child(1)::before {
		content: "Item";
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b6b6b;
		margin-bottom: 4px;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(2)::before,
	table[border="1"] > tr:not(:last-child) > td:nth-child(2)::before {
		content: "Description";
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b6b6b;
		margin-bottom: 4px;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(3)::before,
	table[border="1"] > tr:not(:last-child) > td:nth-child(3)::before {
		content: "Quantity";
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b6b6b;
		margin-bottom: 6px;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(4)::before,
	table[border="1"] > tr:not(:last-child) > td:nth-child(4)::before {
		content: "Each";
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b6b6b;
		margin-bottom: 4px;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(5)::before,
	table[border="1"] > tr:not(:last-child) > td:nth-child(5)::before {
		content: "Total";
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b6b6b;
		margin-bottom: 4px;
	}

	table[border="1"] form {
		display: flex !important;
		align-items: center;
		gap: 10px;
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	table[border="1"] input[name="quantity"] {
		width: 80px !important;
	}

	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(4),
	table[border="1"] > tbody > tr:not(:last-child) > td:nth-child(5),
	table[border="1"] > tr:not(:last-child) > td:nth-child(4),
	table[border="1"] > tr:not(:last-child) > td:nth-child(5) {
		font-weight: 700;
		color: #2f2f2f;
	}
}

/* =========================================================
   MOBILE: STACK THE ACTION AREA UNDER THE CART
   First cart page only
   ========================================================= */

@media only screen and (max-width: 700px) {

	center > table[width="98%"][border="0"] > tbody > tr > td,
	center > table[width="98%"][border="0"] > tr > td {
		display: block !important;
		width: 100% !important;
		text-align: left !important;
		padding: 12px 10px !important;
		box-sizing: border-box !important;
	}

	center > table[width="98%"][border="0"] > tbody > tr > td[align="center"],
	center > table[width="98%"][border="0"] > tr > td[align="center"] {
		text-align: left !important;
	}

	center > table[width="98%"][border="0"] form {
		margin-bottom: 18px;
	}

	center > table[width="98%"][border="0"] input[type="text"],
	center > table[width="98%"][border="0"] select {
		width: 100%;
		max-width: 100%;
	}

	center > table[width="98%"][border="0"] input[type="submit"],
	center > table[width="98%"][border="0"] button {
		width: auto;
		max-width: 100%;
	}
}


/* =========================================================
   MOBILE HELPERS
   ========================================================= */

@media (max-width: 700px) {
	.cart-more {
		display: block;
	}
}

@media (min-width: 701px) {
	.cart-more {
		display: none;
	}
}

/* =========================================================
   PRIMARY CHECKOUT BUTTON
   Language-safe: targets the real checkout submit by name
   ========================================================= */

input[type="submit"][name="total"] {
	background: var(--cart-accent);
	color: var(--cart-surface);
	border: 1px solid var(--cart-accent-hover);
	border-radius: 8px;
	padding: 12px 18px;
	font-size: 18px !important;
	font-weight: 700;
	box-shadow: var(--cart-shadow);
	transition: all 0.2s ease;
}

input[type="submit"][name="total"]:hover {
	background: var(--cart-accent-hover);
	border-color: var(--cart-accent-active);
	box-shadow: 0 5px 14px rgba(0,0,0,0.18);
	transform: translateY(-1px);
}

input[type="submit"][name="total"]:active {
	background: var(--cart-accent-active);
	transform: translateY(0);
	box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* =========================================================
   ADDRESS / BILLING FORM LAYOUT (STABLE VERSION)
   ========================================================= */

form[name="form1"] > table[width="98%"] {

	width: min(98%,760px) !important;
	margin: 0 auto 16px !important;

	background: var(--cart-surface);
	border: 1px solid var(--cart-border);
	box-shadow: var(--cart-shadow);

	table-layout: auto;
}

form[name="form1"] > table[width="98%"] td {

	padding: 9px 10px;
	vertical-align: middle;
}

form[name="form1"] > table[width="98%"] td:first-child {

	width: 170px;
	min-width: 170px;

	text-align: right;
	font-weight: 700;

	white-space: nowrap;
	padding-right: 14px;
}

form[name="form1"] > table[width="98%"] td:last-child {

	text-align: left;
	width: auto;
}

form[name="form1"] > table[width="98%"] input,
form[name="form1"] > table[width="98%"] select {

	width: min(100%,430px);
	margin: 0;
}

form[name="form1"] > table[width="98%"] input[name="zip"],
form[name="form1"] > table[width="98%"] input[name="zip2"] {

	width: 120px;
}

form[name="form1"] > center table td {

	text-align: center;
}


/* =========================================================
   KEEP ADDRESS FORM TABLES AS REAL TABLES ON MOBILE
   ========================================================= */

/* @media only screen and (max-width: 700px) {// blocked as it was making wonky skinny forms

	form[name="form1"] > table[width="98%"] td {
		display: table-cell !important;
		width: auto !important;
	}

} */

/* =========================================================
   MOBILE: STACK ADDRESS FORM LABELS ABOVE INPUTS
   ========================================================= */

@media only screen and (max-width: 700px) {

	form[name="form1"] > table[width="98%"] {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 auto 14px !important;
	}

	form[name="form1"] > table[width="98%"] tr {
		display: block !important;
		margin: 0 0 10px 0 !important;
	}

	form[name="form1"] > table[width="98%"] td {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box !important;
		padding: 4px 8px !important;
		text-align: left !important;
	}

	form[name="form1"] > table[width="98%"] td:first-child {
		width: 100% !important;
		min-width: 0 !important;
		padding: 0 8px 4px !important;
		text-align: left !important;
		font-weight: 700 !important;
		white-space: normal !important;
	}

	form[name="form1"] > table[width="98%"] td:last-child {
		padding: 0 8px 8px !important;
	}

	form[name="form1"] > table[width="98%"] input,
	form[name="form1"] > table[width="98%"] select {
		width: 100% !important;
		max-width: 100% !important;
	}

	form[name="form1"] > table[width="98%"] input[name="zip"],
	form[name="form1"] > table[width="98%"] input[name="zip2"] {
		width: 140px !important;
		max-width: 100% !important;
	}
}