/**
 * Cart Quote - Flatsome Child (SMT)
 * --------------------------------
 * Style cho form "Quote Request" ở trang giỏ hàng.
 */

.smt-cart-quote {
	margin-top: 26px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.smt-cart-quote__title {
	margin: 0 0 14px;
	padding: 0 0 10px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--primary-color, #1e73be);
	border-bottom: 1px solid #ececec;
	position: relative;
}

.smt-cart-quote__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 36px;
	height: 2px;
	background: var(--primary-color, #1e73be);
	border-radius: 2px;
}

.smt-cart-quote__items-title {
	font-size: 12.5px;
	font-weight: 700;
	color: #7a7a7a;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin: 0 0 8px;
}

.smt-cart-quote__item-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: grid;
	gap: 10px;
}

.smt-cart-quote__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid #ececec;
	border-radius: 12px;
	background: #fafbfc;
}

.smt-cart-quote__item-name {
	font-weight: 700;
	color: #222;
	text-decoration: none;
}

.smt-cart-quote__item-name:hover {
	color: var(--primary-color, #1e73be);
}

.smt-cart-quote__item-sku {
	grid-column: 1 / -1;
	color: #7a7a7a;
	font-size: 12px;
}

.smt-cart-quote__item-qty {
	white-space: nowrap;
	color: #222;
	font-size: 13px;
}

.smt-cart-quote-btn.checkout-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* Quote submit loading */
.smt-quote__submit.is-loading {
	position: relative;
	opacity: 0.85;
	pointer-events: none;
}

.smt-quote__submit.is-loading::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border: 2px solid rgba(255, 255, 255, 0.55);
	border-top-color: #fff;
	border-radius: 50%;
	animation: smtSpin 0.75s linear infinite;
}

@keyframes smtSpin {
	to { transform: rotate(360deg); }
}

/* =========================================================================
 * Modal (Quote Request) – dùng chung cart + product card
 * ========================================================================= */

.smt-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

.smt-modal.is-open {
	display: block;
}

body.smt-modal-open {
	overflow: hidden;
}

.smt-quote-modal.smt-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
}

.smt-quote-modal .smt-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
	z-index: 0;
}

.smt-quote-modal .smt-modal__panel {
	position: relative;
	width: min(640px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	margin: 0;
	display: flex;
	flex-direction: column;
	background: transparent;
	border-radius: 14px;
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
	overflow: visible;
	padding: 0;
	animation: smtModalIn 180ms ease-out;
	z-index: 1;
}

.smt-quote-modal .smt-modal__content {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 24px);
	overflow: hidden;
	background: #fff;
	border-radius: 14px;
}

.smt-quote-modal .smt-modal__scroll {
	flex: 1 1 auto;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	padding: 16px 16px 20px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

.smt-quote-modal .smt-modal__scroll::-webkit-scrollbar {
	width: 8px;
}

.smt-quote-modal .smt-modal__scroll::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.18);
	border-radius: 8px;
}

.smt-quote-modal .smt-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

.smt-quote-modal .smt-modal__close:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.smt-quote-modal .smt-cart-quote--modal {
	margin-top: 0;
	box-shadow: none;
	border-color: transparent;
	padding: 0;
}

.smt-quote-modal .smt-cart-quote__title {
	margin: 0 0 10px;
	padding: 0 0 8px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #1e73be;
	border-bottom: 1px solid #ececec;
	position: relative;
}

.smt-quote-modal .smt-cart-quote__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 40px;
	height: 2px;
	background: #1e73be;
	border-radius: 2px;
}

.smt-quote-modal .smt-quote-msg {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.45;
}

.smt-quote-modal .smt-quote-msg--ok {
	background: #e7f6ec;
	color: #1a7a3c;
	border: 1px solid #b7e3c5;
}

.smt-quote-modal .smt-quote-msg--err {
	background: #fdecec;
	color: #c0392b;
	border: 1px solid #f3c2c2;
}

/* Danh sách SP (cart) */
.smt-quote-modal .smt-cart-quote__items {
	margin-bottom: 10px;
}

.smt-quote-modal .smt-cart-quote__items-title {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #7a7a7a;
	margin: 0 0 6px;
}

.smt-quote-modal .smt-cart-quote__item-list {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: grid;
	gap: 6px;
	max-height: 130px;
	overflow-y: auto;
}

.smt-quote-modal .smt-cart-quote__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 10px;
	align-items: center;
	padding: 7px 10px;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fafbfc;
	box-shadow: none;
}

.smt-quote-modal .smt-cart-quote__item-name {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
}

.smt-quote-modal .smt-cart-quote__item-name:hover {
	color: #1e73be;
}

.smt-quote-modal .smt-cart-quote__item-sku {
	grid-column: 1 / -1;
	color: #7a7a7a;
	font-size: 11px;
}

.smt-quote-modal .smt-cart-quote__item-qty {
	white-space: nowrap;
	color: #555;
	font-size: 12px;
}

.smt-quote-modal .smt-cart-quote__item-qty strong {
	color: #1e73be;
}

/* Form fields */
.smt-quote-modal .smt-quote__field {
	margin: 0 0 10px;
}

.smt-quote-modal .smt-quote__field label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: #555;
}

.smt-quote-modal .smt-quote__field label span {
	color: #e7402b;
}

.smt-quote-modal .smt-quote__field input,
.smt-quote-modal .smt-quote__field textarea {
	width: 100%;
	margin-top: 4px;
	padding: 8px 10px;
	border: 1px solid #e3e7ee;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: #222;
	background: #fff;
	box-sizing: border-box;
}

.smt-quote-modal .smt-quote__field input:focus,
.smt-quote-modal .smt-quote__field textarea:focus {
	border-color: #1e73be;
	box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.12);
	outline: none;
}

.smt-quote-modal .smt-quote__field textarea {
	min-height: 56px;
	max-height: 80px;
	resize: vertical;
}

.smt-quote-modal .smt-quote__submit.button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 10px 16px;
	border: 0 !important;
	border-radius: 8px !important;
	background: #1e73be !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
}

.smt-quote-modal .smt-quote__submit.button:hover {
	background: #1862a3 !important;
	filter: none;
}

/* 2 cột form từ 520px */
@media (min-width: 520px) {
	.smt-quote-modal .smt-cart-quote__form {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px 12px;
		align-items: start;
	}

	.smt-quote-modal .smt-cart-quote__form .smt-quote__field {
		margin: 0;
	}

	.smt-quote-modal .smt-cart-quote__form .smt-quote__field--message,
	.smt-quote-modal .smt-cart-quote__form .smt-quote__submit {
		grid-column: 1 / -1;
	}

	.smt-quote-modal .smt-pcard-quote__form .smt-quote-intro {
		grid-column: 1 / -1;
	}
}

/* Product card modal – product + qty cùng hàng, tên SP chiếm hết chỗ trống */
.smt-quote-modal .smt-quote-intro {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px 12px;
	margin-bottom: 10px;
}

.smt-quote-modal .smt-quote-intro .smt-quote-product {
	flex: 1 1 200px;
	min-width: 0;
	margin: 0;
}

.smt-quote-modal .smt-quote-intro .smt-quote-product__value {
	word-break: break-word;
}

.smt-quote-modal .smt-quote-intro .smt-quote__field--qty {
	flex: 0 0 88px;
	width: 88px;
	margin: 0;
}

/* Khối product (single / sidebar) */
.smt-quote-modal .smt-quote-product {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: 0 0 10px;
	padding: 8px 10px;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fafbfc;
}

.smt-quote-modal .smt-quote-intro .smt-quote-product {
	display: block;
}

.smt-quote-modal .smt-quote-product__label {
	margin: 0;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #7a7a7a;
}

.smt-quote-modal .smt-quote-product__value {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: #222;
}

.smt-quote-modal .smt-quote-product__link {
	color: inherit;
	text-decoration: none;
}

.smt-quote-modal .smt-quote-product__link:hover {
	color: #1e73be;
}

.smt-quote-modal .smt-quote-product__sku {
	display: inline;
	margin: 0 0 0 6px;
	font-size: 11px;
	font-weight: 500;
	color: #7a7a7a;
}

@media (max-width: 519px) {
	.smt-quote-modal .smt-modal__panel {
		width: calc(100vw - 16px);
	}

	.smt-quote-modal .smt-modal__scroll {
		padding: 14px 12px 18px;
	}
}

@keyframes smtModalIn {
	from { transform: translateY(8px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* =========================================================================
 * Hide "Update cart" button (auto-update is enabled)
 * Keep in DOM for JS-triggered updates.
 * ========================================================================= */

.woocommerce-cart-form button[name="update_cart"] {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.smt-cart-order-notice {
	margin-bottom: 1.25em;
}

