/*Temporary, for iframe options*/
#accountbtnslist i {
	opacity: .75;
	font-size: 14px;
	position: absolute;
	text-indent: 3px;
}

#splitmain {
	display: flex;
	width: 100%; max-width: 1200px;
	margin: auto; padding-top: 10px;
}
#splitmain > div {
	width: 100%;
	margin: 0 10px;
}
#accountbtnslist {
	display: flex; flex-direction: column;
	margin: 50px 10px;
	width: 320px;
	border-radius: 10px;
	overflow: hidden;
	/*box-shadow: 2px 2px 10px #999B, 0 0 10px 5px var(--BGlighter);*/
	box-shadow: 0 0 0 1px var(--mainblue), 5px 5px 10px 2px #0002;
	position: sticky; top: 125px;
	z-index: 3;
	align-self: flex-start;
}

#accountbtnslist > div {
	padding: 7px 5px 8px;
	background-color: var(--mainblue);
	color: #fefffff9;
	font-weight: 500;
	position: relative;
}
#accountbtnslist > a {
	padding: 10px;
	line-height: 16px;
	color: var(--mainblue);
	background-color: #fefffff9;
	border-bottom: solid 1px #0002;
}
#accountbtnslist > a:hover, #accountbtnslist > a:focus-visible {
	box-shadow: 0 0 0 500px #9994 inset;
}
#accountbtnslist > a:active { box-shadow: 0 0 0 500px #9997 inset; }
#accountbtnslist > a:last-of-type { border-bottom: unset; }
#accountbtnslist .cartopt {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}
#cartnum, #memonum {
	background-color: var(--mainblue);
	color: white;
	font-weight: 600;
	border-radius: 3px;
	padding: 4px 6px;
	margin: -4px;
	pointer-events: none;
	box-shadow: 0 1px 3px #0006;
}
#memonum {
	display: none;
	background-color: #ec3c3c;
}

#accountbtnslist > div:has(> a:hover), #accountbtnslist > div:focus-within {
	text-decoration: underline;
	text-decoration-color: var(--headercolor1);
	background-color: var(--headertextcolorhover);
}

#accountbtnslist > #chosenside {
	box-shadow: 0 0 0 500px #9993 inset;
	color: #111;
}

h1, h2, h3 { color: var(--color3); }

#splitmain h1 {
	text-align: left;
	-webkit-text-stroke: 0.25px var(--color3);
}
#splitmain h1 + p { margin-top: -15px; }
#splitmain h2 {
	text-align: left;
	margin-bottom: 5px;
	font-weight: 200;
	font-size: 26px;
	opacity: 0.9;
}

#accountbtnslist > div > a {
	display: none;
	text-align: right;
	position: absolute; left: 0; top: -4px;
	padding: 5px 10px;
	width: calc(100% - 20px);
	color: inherit;
	font-size: 26px;
}

/* Common page items */

body { background: var(--BGlighter2); }

.outer { display: flex; gap: 20px; }
.acclist {
	flex-grow: 1;
	background: #fefffff9;
	padding: 5px 5px 12px;
	min-width: 40%;
	border-radius: 5px 5px 8px 8px;
	margin-bottom: 20px;
	/*overflow: hidden;*/
	color: black;
	box-shadow: 0 0 0 1px var(--mainblue), 5px 5px 10px 2px #0002;
}
#splitmain > div:not(:has(> :nth-child(3))) > .acclist { width: fit-content; }
.acclist > div:has(h3) {
	display: flex;
	justify-content: space-between;
	background: var(--mainblue);
	margin: -5px; padding: 5px;
	/*padding: 4px;
	border: solid 1px var(--mainblue);*/
	border-radius: 2px 2px 0 0;
}
.acclist > div > h3 { margin: 0; font-weight: 400; color: white; }
.acclist p.separator { margin: 17px 0 13px; }
.acclist p { margin: 12px 0 -7px; font-size: 15px; font-weight: 400; max-width: 100%; }
.acclist span, .acclist input, .acclist select, .acclist button { font-weight: 400; }

.acclist input, .acclist select, .acclist button {
	margin: 5px 0 8px;
	background-color: #ffffffe9;
	border: solid 1px gray;
	color: black;
	border-radius: 5px;
	font-size: 15px;
	max-width: 100%;
	line-height: 1.25em;
}
.acclist input:hover:not(:disabled), .acclist input:focus,
.acclist select:hover:not(:disabled), .acclist select:focus,
.acclist button:hover:not(:disabled), .acclist button:focus { border-color: black; background-color: #FFFC; }

.acclist :disabled { border-color: transparent; background-color: #EEEB; opacity: .875; }
.flexiform { display: flex; flex-wrap: wrap; max-width: 650px; gap: 0 15px; }
.acclist p.separator:last-child { margin-bottom: -5px; }

.acclist #card[readonly] { min-width: 250px; }

.acctable, .totals {
	width: 100%;
	text-align: center;
	border-collapse: collapse;
	position: relative;
	color: black;
	background: #fefffff9;
	border-radius: 5px;
	box-shadow: 0 0 0 1px var(--mainblue), 5px 5px 10px 2px #0002;
}
.acctable thead { background: var(--mainblue); color: white; }
.acctable th, .acctable td {
	padding: 6px 0 7px;
	font-size: 13px;
	position: relative;
}
.acctable th:first-of-type, .acctable td:first-of-type { padding-left: 2px; }
.acctable th { text-wrap: nowrap; }
.acctable th:nth-child(even) { background: #9995; }
.acctable td:nth-child(even) { background: #f8fdfd66; }
.acctable tr:nth-of-type(even) { background: #9992; }
.acctable td:last-of-type { padding: 5px 0 6px; }
.acctable td:last-of-type > a[href]:nth-child(2) { margin-top: 3px; display: block; }
.acctable br { margin-bottom: 10px; }
.acctable a[href], .acclist a[href] { color: darkcyan; text-decoration: underline; }
.acctable div > a[href], .acclist div > a[href] { color: lightcyan; }
.acctable a[href]:focus-visible, .acclist a[href]:focus-visible { outline: revert; }

/*.acctable tr:first-of-type > th:first-of-type, .acctable tr:first-of-type { border-top-left-radius: 5px; }
.acctable tr:first-of-type > th:last-of-type, .acctable tr:first-of-type { border-top-right-radius: 5px; }
.acctable tr:last-of-type > td:last-of-type, .acctable tr:last-of-type { border-bottom-right-radius: 5px; }
.acctable tr:last-of-type > td:first-of-type, .acctable tr:last-of-type { border-bottom-left-radius: 5px; }*/

.acctable td[colspan="100%"] {
	text-align: center;
	margin: auto;
	min-width: 250px;
}
.acctable td[colspan="100%"] > h3 { color: var(--mainblue); }

.acctable td > a[href] { cursor: help; }
.acctable td > span:empty:after, .tablepopout span:empty:after { content: 'None'; opacity: .25; }

a.moreinfo[href] {
	width: 100%;
	background: white;
	position: relative;
	display: block;
	z-index: 2;
	/* RIGHT SIDE OPENER:
	border-radius: 20px 0 0 20px;
	box-shadow: 4px 0 0 white, -1px 0 5px #0006;
	*/
	border-radius: 0 20px 20px 0;
	box-shadow: -4px 0 0 white, 1px 0 5px #0006;
	padding: 1px 0 3px;
	margin: -1px 0 -3px;
	color: darkcyan;
}

.tablepopout {
	display: none;
	position: absolute;
	/*left: 100%;*/
	top: 50%; right: 100%;
	background: white;
	width: max-content;
	min-width: 140px;
	z-index: 1;
	padding: 3px 5px;
	text-align: left;
	box-shadow: 0 0 5px #0006;
	border-radius: 7px;
	transform: translateY(-50%);
	color: black;
	max-height: 350px;
	overflow: auto;
}
.moreinfo + .tablepopout, .tablepopout > .inlineheaders { display: initial; }
.tablepopout > .inlineheaders + span { float: right; margin-left: 3px; }

.inlineheaders { display: none; font-weight: 500; }

.tablepopout > .inlineheaders:first-of-type {
	color: var(--mainblue);
	position: sticky;
	top: 0px;
	background: #FFFD;
	width: 100%;
	display: inline-block;
}
.tablepopout a[href]:not(:first-child) { color: darkcyan; text-decoration: none; }

.tablepopout > .inlineheaders { font-weight: 600; }
.tablepopout > .inlineheaders:first-of-type > a[href] {
	float: right;
	padding: 0 6px 0 20px;
	margin: -3px -5px;
	text-decoration: none;
	color: #666;
	font-family: serif; font-size: 21px; font-weight: bold;
	height: 22px;
	text-underline-offset: -1px;
}
.tablepopout > .inlineheaders:first-of-type > a[href]:hover,
.tablepopout > .inlineheaders:first-of-type > a[href]:focus { text-decoration: underline 1px; }
.tablepopout > a[href]:hover, .tablepopout > a[href]:focus { text-underline-offset: 1px; }

.loadingtable:after, .loadingtable:before {
	content: "";
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	background: #0004 url(/static/img/icons/loading.svg) center / 25% no-repeat;
	border-radius: 5px;
}

.acctable td:has(.prodimgsholder > a:nth-child(2)) { max-width: 80px; }
.acctable td:has(.prodimgsholder > a:nth-child(3)) { max-width: 110px; }

.acctable.recentorders td:last-child > a { cursor: pointer; }

.totals {
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
	padding: 10px 20px;
}

.subs, .grands {
	width: 130px;
	display: inline-block;
	text-align: left;
	text-wrap: nowrap;
}

.subs {
	font-size: 14px;
	opacity: .85;
}

.grands { margin: 3px 0; }

.subs:nth-of-type(even), .grands:last-child { text-align: right; }


.prodimgsholder { display: none; }

.prodimgsholder:not(:empty) {
	gap: 1px 0;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 5px;
}
.prodimgsholder .BGprod {
	width: 1500%;
	height: 1500%;
	position: absolute;
}
.prodimgsholder .BGprod + img {
	width: 100%;
	height: 100%;
	object-fit: scale-down;
	position: relative;
}
.prodimgsholder > a {
	width: 70px;
	max-height: 70px;
	outline: solid 1px #555;
	border-radius: 1px;
	position: relative;
	overflow: hidden;
	cursor: help;
}
.prodimgsholder:has(a:nth-child(4)) > a { width: 50px; max-height: 50px; }
.prodimgsholder:has(a:nth-child(5)):not(:has(a:nth-child(7))) { max-width: 150px; margin: 5px auto 0; }
.prodimgsholder:has(a:nth-child(7)) > a { width: 45px; max-height: 45px; }
.prodimgsholder:has(a:nth-child(7)):not(:has(a:nth-child(9))) { max-width: 180px; margin: 5px auto 0; }

.prodimgsholder > a > span {
	color: gray;
	font-weight: bold;
	position: absolute;
	bottom: 0;
	right: 0;
	padding: 0 1px 0 3px;
	background: #FFF9;
	border-top-left-radius: 4px;
}

/*.prodimgsholder > a > span::first-letter { color: #666; }*/

#cozycompact {
	position: relative;
	display: none;
}
#cozycompact > div {
	position: absolute;
	top: -55px;
	right: 10px;
	border: solid 1px var(--mainblue);
	border-radius: 7px;
	overflow: hidden;
	display: flex;
}
#cozycompact label {
	display: inline-block;
	box-shadow: -1px 0 0 var(--mainblue);
	background: var(--mainblue);
	cursor: pointer;
}
#cozycompact input {
	appearance: none;
	position: absolute;
}
#cozycompact img {
	width: 34px;
	display: block;
	mix-blend-mode: screen;
}
#cozycompact input:checked + img {
	opacity: .75;
}
#cozycompact label:hover > img, #cozycompact label:focus-within > img {
	filter: contrast(0.35) brightness(1.5);
	mix-blend-mode: unset;
}

#backcloser {
	height: 100%;
	box-shadow: 0 0 0 1000px black;
}

/* Combined responsive styles */

@media (max-width: 1000px) {
	#splitmain { flex-direction: column; width: 97%; }
	#splitmain > div {
		margin: 0 auto 35px;
		max-width: 100%;
		margin: auto;
		min-height: 500px;
	}
	#splitmain h1 {
		margin-top: 30px;
		text-align: center;
	}
	.acclist {
		margin: auto;
	}
	#accountbtnslist {
		width: fit-content; height: 30px;
		border-radius: 7px;
		margin: 20px auto -20px;
		transition: height 0.65s;
		align-self: center;
	}
	#accountbtnslist > div > a { display: block; }
	#accountbtnslist > a { visibility: hidden; padding: 0 10px; height: auto; line-height: 0; transition: padding .5s, height .5s, line-height .5s; }
	
	#accountbtnslist.mobilenavopen { height: 678px; max-height: 72dvh; overflow-y: auto; }
	#accountbtnslist.mobilenavopen > a { visibility: visible; height: auto; padding: 10px; line-height: 16px; }
}

@media (min-width: 801px) {
	table#productlisting:not(:has(tr:nth-child(8))) + #mirrorSOD { display: none; }
	
	#cozycompact { display: block; }
	
	#splitmain > div:not(:has(#cozycompact [value="Compact"]:checked)) .prodimgsholder:not(:empty) { display: flex; }
	#splitmain > div:not(:has(#cozycompact [value="Compact"]:checked)) .acctable.recentorders td:last-child > a { font-size: 31px; }
	
	.acctable tbody tr { position: relative; height: 50px; }
	
	#splitmain > div:has(#cozycompact [value="Compact"]:checked) .acctable tbody tr { height: unset; }
	
	.acctable th, .acctable td { max-width: 40px; }
	.recentorders th, .recentorders td { max-width: 50px; }

	.acctable.recentorders {
		width: calc(100% - 47px);
		margin-right: 47px !important;
	}

	.acctable.recentorders th:last-child {
		position: absolute;
		background: none;
		color: var(--colortext);
		margin-left: 11px;
	}

	.acctable.recentorders td:last-child:not(td:only-child) {
		position: absolute;
		width: 100%;
		height: 100%;
		padding: 0;
		display: flex;
		background: none;
		align-items: center;
	}

	.acctable.recentorders td:last-child > a {
		margin-left: 2px;
		width: 45px;
		height: 95%;
		align-content: center;
		text-decoration: none;
		font-size: 22px;
		font-weight: bold;
		color: white;
		background: #2c89d8;
		border-radius: 0 5px 5px 0;
		margin-top: 0 !important;
		box-shadow: -1px 0 0 #2c89d877;
	}
	.acctable.recentorders td:last-child > a:hover,
	.acctable.recentorders td:last-child > a:focus { filter: brightness(0.9); }
	
	.acctable.recentorders td:last-child > a > span { display: none; }
	
	.clamp {
		text-overflow: ellipsis;
		display: block;
		overflow: hidden;
	}
	
	.tablepopout:not(:has(~ .prodimgsholder img:nth-child(5), ~ .prodimgsholder:empty)) {
		min-height: 110px;
		/*top: 25%;*/
	}
}

@media (max-width: 800px) {
	.tablepopout {
		left: 0; top: 0;
		transform: translateX(79px);
	}
	.tablepopout > .inlineheaders { display: initial; }
	
	a.moreinfo[href] {
		border-radius: 10px 0 0 10px;
		box-shadow: 4px 0 0 white, -1px 0 5px #0006;
	}
	
	table#productlisting:not(:has(tr:nth-child(4))) + #mirrorSOD { display: none; }
}

@media (max-width: 700px) {
	#accountbtnslist { top: 85px; }
}