/**
 * Cart Page Style
 */

/* Accessory PR Popup */
.wcct-accessory-popup {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	max-width: 540px;
	width: calc(100% - 48px);
	transform: translateY(150%);
	transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
	visibility: hidden;
}

.wcct-accessory-popup.is-active {
	transform: translateY(0);
	visibility: visible;
}

@media (min-width: 768px) {
	.wcct-accessory-popup {
		transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.3s ease;
	}
	body.is-back-to-top-visible .wcct-accessory-popup {
		bottom: 100px;
	}
}

.wcct-popup-container {
	position: relative;
	background: #fff;
	border: 8px solid #009944;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	overflow: visible;
	padding: 20px;
}

.wcct-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 32px;
	height: 32px;
	background: transparent;
	border: 2px solid #333;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: opacity 0.3s;
}

.wcct-popup-close:hover {
	opacity: 0.7;
}

.wcct-popup-headline {
	font-size: 18px;
	font-weight: 500;
	color: #333;
	margin-bottom: 12px;
	padding-right: 40px;
}

.wcct-popup-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 15px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #004d40;
	color: #004d40;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
}

.wcct-popup-title-icon::before {
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	content: "\f07a";
	font-size: 18px;
	color: #004d40;
}

.wcct-popup-flex {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	border: 1px solid #e0e0e0;
	padding: 12px;
	background-color: #ffffff;
}

.wcct-popup-image {
	flex: 0 0 160px;
	line-height: 0;
	overflow: hidden;
}

.wcct-popup-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

.wcct-popup-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}

.wcct-popup-desc {
	font-size: 14px;
	color: #333;
	line-height: 1.6;
	text-align: left;
	margin: 0 0 10px 0 !important;
}

.wcct-popup-action {
	text-align: right;
	margin: 0;
}

.wcct-popup-btn {
	display: inline-block;
	background: #1b5e20;
	color: #fff !important;
	text-decoration: none !important;
	padding: 8px 25px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.3s;
}

.wcct-popup-btn:hover {
	background: #123e16;
}

@media (max-width: 767px) {
	.wcct-accessory-popup {
		bottom: 0;
		width: 100%;
		right: 0;
	}
	
	.wcct-popup-container {
		border-width: 6px;
		padding: 15px;
		border-radius: 0;
	}

	.wcct-popup-flex {
		gap: 15px;
	}

	.wcct-popup-image {
		flex: 0 0 auto;
		width: 120px;
	}

	.wcct-popup-headline {
		font-size: 16px;
	}

	.wcct-popup-title {
		font-size: 16px;
	}

	.wcct-popup-desc {
		font-size: 13px;
	}
}

/* Tabbed Custom Order Fields */
#wcct-tabbed-custom-order {
	margin-top: 30px;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wcct-tabs-nav ul {
	display: flex;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #f8f9fa;
	border-bottom: 1px solid #ddd;
	flex-wrap: wrap;
}

.wcct-tab-item {
	flex: 1;
	min-width: 100px;
	text-align: center;
	border-right: 1px solid #ddd;
	transition: background 0.2s;
}

.wcct-tab-item:last-child {
	border-right: none;
}

.wcct-tab-item a {
	display: block;
	padding: 15px 5px;
	text-decoration: none !important;
	color: #666;
	font-weight: bold;
	transition: all 0.2s;
	font-size: 13px;
}

.wcct-tab-item:not(.is-active):hover {
	background: #eee;
}

.wcct-tab-item.is-active {
	background: #fff;
	position: relative;
}

.wcct-tab-item.is-active a {
	color: #009944;
}

.wcct-tab-item.is-active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: #009944;
	z-index: 1;
}

.wcct-tabs-content {
	padding: 25px;
	border-bottom: 1px solid #eee;
}

.wcct-tab-desc {
	font-size: 14px;
	line-height: 1.7;
	color: #444;
	margin-bottom: 15px;
}

.wcct-guidance {
	background: #fff9ea;
	padding: 12px 18px;
	border-left: 4px solid #f9a825;
	margin: 15px 0;
	font-size: 14px;
	color: #856404;
	font-weight: 500;
}

.wcct-fax-download {
	margin: 20px 0 10px;
}

.wcct-btn-download {
	display: inline-block;
	background: #2196f3;
	color: #fff !important;
	padding: 12px 24px;
	text-decoration: none !important;
	border-radius: 6px;
	font-weight: 700;
	transition: background 0.2s;
	box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.wcct-btn-download:hover {
	background: #1976d2;
	box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

/* File Upload Section */
#wcct-file-upload-section {
	margin-bottom: 20px;
}

#wcct-file-upload-section .csod_body {
	padding: 15px !important;
	background: #fcfcfc;
	border: 1px dashed #ccc;
	border-radius: 6px;
	margin: 15px;
}

#wcct-naire-file {
	margin-bottom: 10px;
}

.wcct-uploading { color: #2196f3; }
.wcct-upload-success { color: #4caf50; font-weight: 700; }
.wcct-upload-error { color: #f44336; }

#wcct-current-file {
	margin-top: 10px;
	padding: 10px 15px;
	background: #e8f5e9;
	border: 1px solid #c8e6c9;
	color: #2e7d32;
	border-radius: 4px;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 8px;
}

#wcct-current-file::before {
	content: "\f15b";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
}

/* Standard Fields Visibility */
#wcct-standard-fields {
	transition: opacity 0.3s;
}

.wcct-hidden {
	display: none !important;
}

/* === SP Responsive Grid Layout === */
@media (max-width: 768px) {
	/* Navigation Grid */
	#wcct-tabbed-custom-order .wcct-tabs-nav ul {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 6px !important;
		padding: 10px !important;
		background: #f0f0f0 !important;
		list-style: none !important;
		border-bottom: none !important;
	}

	#wcct-tabbed-custom-order .wcct-tabs-nav ul li {
		flex: 1 1 calc(33.33% - 4px) !important;
		min-width: 0 !important;
		border: none !important;
		margin: 0 !important;
		background: transparent !important;
	}

	#wcct-tabbed-custom-order .wcct-tab-item a {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		text-align: center !important;
		padding: 12px 2px !important;
		font-size: 14px !important;
		border-radius: 8px !important;
		background: #fff !important;
		border: 1px solid #ddd !important;
		color: #555 !important;
		text-decoration: none !important;
		box-sizing: border-box !important;
		height: 100% !important;
		line-height: 1.3 !important;
		position: relative !important;
		overflow: hidden !important;
	}

	#wcct-tabbed-custom-order .wcct-tab-item.is-active a {
		background: #fff !important;
		color: #009944 !important;
		border-color: #009944 !important;
		font-weight: 600 !important;
	}

	#wcct-tabbed-custom-order .wcct-tab-item.is-active::after {
		content: '' !important;
		display: block !important;
		position: absolute !important;
		bottom: 0 !important;
		left: 8px !important;
		right: 8px !important;
		height: 3px !important;
		background: #009944 !important;
		z-index: 2 !important;
		border-radius: 3px 3px 0 0 !important;
	}

	/* Content Adjustments */
	#wcct-tabbed-custom-order .wcct-tabs-content {
		padding: 22px 20px !important;
		border-bottom: none !important;
	}

	#wcct-tabbed-custom-order .wcct-tab-desc {
		font-size: 14.5px !important;
		line-height: 1.8 !important;
		color: #333 !important;
		margin-bottom: 0 !important;
		font-weight: 400 !important;
	}

	#wcct-tabbed-custom-order .wcct-guidance {
		margin: 15px 0 !important;
		padding: 12px 15px !important;
		background: #fff9ea !important;
		border-left: 4px solid #f9a825 !important;
		font-size: 13.5px !important;
		line-height: 1.6 !important;
		color: #5d4037 !important;
	}

	#wcct-tabbed-custom-order .wcct-btn-download {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box !important;
		text-align: center !important;
		background: #2196f3 !important;
		padding: 14px 20px !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		margin-top: 18px !important;
		border-radius: 8px !important;
		box-shadow: 0 2px 4px rgba(229, 57, 53, 0.2) !important;
		transition: transform 0.1s !important;
	}
	
	#wcct-tabbed-custom-order .wcct-btn-download:active {
		transform: scale(0.98) !important;
	}

	/* Unified Custom Order Fields Styling Sp-only */
	.csod_block {
		margin: 0 !important;
		padding: 0 !important;
		border: none !important;
		margin-bottom: 0 !important;
	}

	.csod_title {
		padding: 24px 15px 12px 15px !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		line-height: 1.4 !important;
		background: #fdfdfd !important;
		border-top: 1px solid #eee !important;
		border-bottom: 1px solid #eee !important;
		color: #333 !important;
	}

	.csod_body {
		padding: 15px 15px 25px 15px !important;
		font-size: 14px !important;
		line-height: 1.6 !important;
		background: #fff !important;
	}

	/* Target div, ul, li inside csod_body specifically for left alignment */
	.csod_body div,
	.csod_body ul,
	.csod_body li {
		padding-left: 0 !important;
		margin-left: 0 !important;
		text-align: left !important;
	}

	.csod_body ul {
		list-style: none !important;
	}

	.csod_body p {
		margin-bottom: 12px !important;
	}

	/* Postal Code and Phone Inputs Alignment Sp-only */
	#zip1_inp, #zip2_inp {
		width: 80px !important;
		display: inline-block !important;
		margin: 5px 2px !important;
	}

	#tel_inp, #fax_inp {
		width: 120px !important;
		display: inline-block !important;
		margin: 5px 2px !important;
	}

	/* Responsive Images and Tables for Custom Fields */
	.wcct-tabs-content .csod_body img,
	#wcct-standard-fields .csod_body img {
		max-width: 100% !important;
		height: auto !important;
		display: block !important;
	}

	/* Override hardcoded inline max-width: 500px */
	.wcct-tabs-content .csod_body div[style*="max-width: 500px"],
	#wcct-standard-fields .csod_body div[style*="max-width: 500px"],
	.wcct-tabs-content .csod_body div[style*="max-width: 350px"],
	#wcct-standard-fields .csod_body div[style*="max-width: 350px"] {
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.wcct-tabs-content .customer_form,
	#wcct-standard-fields .customer_form {
		width: 100% !important;
		table-layout: fixed !important;
	}

	.wcct-tabs-content .customer_form.no_wrap,
	#wcct-standard-fields .customer_form.no_wrap {
		white-space: normal !important;
	}

	.wcct-tabs-content .customer_form td,
	#wcct-standard-fields .customer_form td {
		word-break: break-all !important;
	}

	/* Cart Navigation Buttons Sp-only */
	.send {
		text-align: center !important;
		margin: 30px 0 !important;
		padding: 20px 10px !important;
		border-top: 1px solid #ddd !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		font-size: 0 !important; /* Remove unwanted &nbsp; space */
	}

	.continue_shopping_button {
		background: #fff !important;
		border: 1px solid #999 !important;
		color: #333 !important;
		padding: 15px 30px !important;
		font-size: 18px !important;
		border-radius: 6px !important;
		width: 100% !important;
		max-width: 320px !important;
		box-sizing: border-box !important;
		text-shadow: none !important;
		font-weight: 500 !important;
	}

	.to_customerinfo_button {
		background: #f15a24 !important;
		border: 1px solid #f15a24 !important;
		color: #fff !important;
		padding: 15px 30px !important;
		font-size: 19px !important;
		font-weight: 700 !important;
		border-radius: 6px !important;
		width: 100% !important;
		max-width: 320px !important;
		box-sizing: border-box !important;
		box-shadow: 0 4px 0 #c24018 !important;
		transition: all 0.1s !important;
	}

	.to_customerinfo_button:active {
		transform: translateY(2px) !important;
		box-shadow: 0 2px 0 #c24018 !important;
	}
}

/* Multiple File Upload List Refined */
#wcct-file-list {
	padding: 5px;
	list-style: none;
	width: 100%;
	max-width: 600px;
}

#wcct-file-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	margin-bottom: 10px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	font-size: 14px;
	color: #333;
	transition: all 0.2s ease;
}

#wcct-file-list li:hover {
	background: #fff;
	border-color: #009944;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wcct-file-name-wrapper {
	display: flex;
	align-items: center;
	gap: 15px;
	flex: 1;
	min-width: 0;
	padding-left: 5px;
}

.wcct-file-name-wrapper i {
	color: #009944;
	font-size: 16px;
	padding-left: 5px;
	flex-shrink: 0;
	margin-right: 5px;
}

.wcct-file-name {
	font-weight: 500;
	word-break: break-all;
	line-height: 1.4;
}

.wcct-remove-file {
	background: #f44336;
	color: #fff;
	border: none;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
	cursor: pointer;
	transition: opacity 0.2s;
	margin-left: 15px;
	flex-shrink: 0;
}

.wcct-remove-file:hover {
	opacity: 0.8;
}

/* Pending state */
#wcct-file-list li.is-pending {
	border-style: dashed;
	background: #fdfdfd;
}

#wcct-file-list li.is-pending .wcct-file-name {
	color: #333;
}
