/**
 * Smart Landing Checkout Stylesheet
 */

.smart-checkout-wrapper {
	max-width: 520px;
	margin: 0 auto;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 24px 20px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Hind Siliguri", "Noto Sans Bengali", sans-serif;
	box-sizing: border-box;
}

.smart-checkout-wrapper * {
	box-sizing: border-box;
}

/* Header */
.smart-checkout-header {
	text-align: center;
	margin-bottom: 20px;
}

.smart-checkout-title {
	font-size: 22px;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 6px 0;
	line-height: 1.3;
}

.smart-checkout-subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.4;
}

/* Form Fields & Tooltips */
.smart-checkout-form-fields {
	margin-bottom: 20px;
}

.smart-field-group {
	margin-bottom: 14px;
}

.smart-field-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 6px;
}

.smart-field-input-wrap {
	position: relative;
}

.smart-field-input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	font-size: 14px;
	color: #0f172a;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.smart-field-input {
	height: auto;
	padding: 10px 14px;
	resize: vertical;
}

.smart-field-input:focus {
	border-color: #64748b;
	box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.15);
}

/* Floating Tooltips */
.smart-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 12px;
	background: #1e293b;
	color: #ffffff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	z-index: 20;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.smart-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 16px;
	border-width: 5px;
	border-style: solid;
	border-color: #1e293b transparent transparent transparent;
}

.smart-field-input-wrap:focus-within .smart-tooltip,
.smart-field-input-wrap.has-tooltip-active .smart-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Product Cards Grid */
.smart-products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px 12px;
	margin-bottom: 24px;
}

.smart-products-grid.smart-products-grid-single,
.smart-products-grid:has(> .smart-product-card:only-child) {
	grid-template-columns: 1fr;
}

@media (max-width: 480px) {
	.smart-products-grid {
		grid-template-columns: 1fr;
	}
}

.smart-product-card {
	position: relative;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	transition: all 0.2s ease;
}

.smart-product-card:hover {
	border-color: #cbd5e1;
}

.smart-product-card.is-selected {
	background-color: #c4d6b0;
	border-color: #8fa775;
}

/* Badge Checkmark */
.smart-product-badge {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	background: #222222;
	color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.6);
	transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	z-index: 3;
}

.smart-product-card.is-selected .smart-product-badge {
	opacity: 1;
	transform: scale(1);
}

/* Product Thumb & Info */
.smart-product-thumb {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f5f9;
}

.smart-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.smart-product-info {
	flex-grow: 1;
	min-width: 0;
	word-break: break-word;
}

.smart-product-title {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 4px 0;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: break-word;
	line-height: 1.35;
}

.smart-product-prices {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 6px;
}

.smart-regular-price {
	color: #94a3b8;
	font-size: 12px;
	font-weight: 400;
	text-decoration: line-through;
}

.smart-sale-price {
	color: #0f172a;
}

/* Quantity Control pill attached to bottom-right of card (Theme Override Protected) */
.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap {
	position: absolute !important;
	right: 8px !important;
	bottom: -10px !important;
	background: #ffffff !important;
	border: 1.5px solid #111111 !important;
	border-radius: 20px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 2px 4px !important;
	z-index: 10 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
	height: 24px !important;
	width: auto !important;
	max-width: 80px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
}

.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap button.smart-qty-btn {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	width: 20px !important;
	min-width: 20px !important;
	max-width: 20px !important;
	height: 20px !important;
	min-height: 20px !important;
	max-height: 20px !important;
	line-height: 20px !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #111111 !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	user-select: none !important;
	transition: color 0.15s ease !important;
	border-radius: 50% !important;
}

.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap button.smart-qty-btn:hover {
	color: #64748b !important;
	background: rgba(0, 0, 0, 0.06) !important;
}

.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap input.smart-qty-input {
	width: 24px !important;
	min-width: 24px !important;
	max-width: 24px !important;
	height: 20px !important;
	min-height: 20px !important;
	max-height: 20px !important;
	border: none !important;
	background: transparent !important;
	background-color: transparent !important;
	text-align: center !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	color: #111111 !important;
	outline: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 20px !important;
	-webkit-appearance: none !important;
	-moz-appearance: textfield !important;
	appearance: none !important;
}

.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap input.smart-qty-input::-webkit-outer-spin-button,
.smart-checkout-wrapper .smart-product-card .smart-product-qty-wrap input.smart-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

/* Delivery Section */
.smart-delivery-section {
	margin-bottom: 16px;
}

.smart-section-title {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.smart-delivery-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (max-width: 480px) {
	.smart-delivery-options {
		grid-template-columns: 1fr;
	}
}

.smart-delivery-option {
	position: relative;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	cursor: pointer;
	user-select: none;
	transition: all 0.2s ease;
	display: block;
}

.smart-delivery-option input[type="radio"] {
	display: none;
}

.smart-delivery-option.is-selected {
	background-color: #c4d6b0;
	border-color: #8fa775;
}

/* Notice Banners */
.smart-notice-banners {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.smart-banner {
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	line-height: 1.4;
	transition: all 0.3s ease;
}

.smart-banner-free-shipping.banner-pending {
	background-color: #fef08a;
	border: 1px solid #fde047;
	color: #854d0e;
}

.smart-banner-free-shipping.banner-success {
	background-color: #c4d6b0;
	border: 1px solid #8fa775;
	color: #1c3d10;
}

.smart-banner-tiered-discount.banner-pending {
	background-color: #e0f2fe;
	border: 1px solid #bae6fd;
	color: #0369a1;
}

.smart-banner-tiered-discount.banner-success {
	background-color: #bbf7d0;
	border: 1px solid #86efac;
	color: #14532d;
}

/* Order Summary Box */
.smart-summary-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
}

.smart-summary-title {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 10px 0;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 8px;
}

.smart-summary-items-list {
	margin-bottom: 10px;
}

.smart-summary-item-line {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: #475569;
	margin-bottom: 4px;
}

.smart-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 4px 0;
	font-size: 13px;
	color: #334155;
}

.smart-summary-val {
	font-weight: 700;
	color: #0f172a;
}

.smart-row-discount .smart-summary-val {
	color: #dc2626;
}

.smart-row-total {
	border-top: 1px dashed #cbd5e1;
	margin-top: 8px;
	padding-top: 10px;
	font-size: 16px;
	font-weight: 800;
}

.smart-row-total .smart-summary-label,
.smart-row-total .smart-summary-val {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}

/* Error Message */
.smart-checkout-error-msg {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 14px;
	text-align: center;
}

/* Order Action & Button (100% Full Width Theme Protected) */
.smart-checkout-wrapper .smart-checkout-action {
	width: 100% !important;
	display: block !important;
	text-align: center !important;
	margin-top: 16px !important;
}

.smart-checkout-wrapper .smart-checkout-action button.smart-checkout-btn {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 100% !important;
	height: 50px !important;
	background-color: #8fa775;
	color: #ffffff;
	border: none !important;
	border-radius: 10px !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	transition: background-color 0.2s ease, transform 0.1s ease !important;
	box-shadow: 0 4px 12px rgba(143, 167, 117, 0.3) !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 16px !important;
}

.smart-checkout-wrapper .smart-checkout-action button.smart-checkout-btn:hover {
	background-color: #7b9462;
}

.smart-checkout-wrapper .smart-checkout-action button.smart-checkout-btn:active {
	transform: scale(0.99);
}

.smart-checkout-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Spinner */
.smart-btn-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: smart-spin 0.8s linear infinite;
}

@keyframes smart-spin {
	to {
		transform: rotate(360deg);
	}
}

.smart-checkout-subnote {
	font-size: 12px;
	color: #64748b;
	margin: 8px 0 0 0;
}

/* ==================== THANK YOU WIDGET STYLES ==================== */
.smart-thankyou-wrapper {
	max-width: 620px;
	margin: 0 auto;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 32px 24px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Hind Siliguri", "Noto Sans Bengali", sans-serif;
	box-sizing: border-box;
}

.smart-thankyou-wrapper * {
	box-sizing: border-box;
}

.smart-thankyou-header {
	text-align: center;
	margin-bottom: 24px;
}

.smart-thankyou-badge {
	width: 64px;
	height: 64px;
	background-color: #22c55e;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px auto;
	box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.smart-thankyou-title {
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 8px 0;
	line-height: 1.3;
}

.smart-thankyou-subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.4;
}

.smart-thankyou-meta-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 24px;
}

@media (max-width: 480px) {
	.smart-thankyou-meta-grid {
		grid-template-columns: 1fr;
	}
}

.smart-meta-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px;
	text-align: center;
}

.smart-meta-label {
	display: block;
	font-size: 12px;
	color: #64748b;
	margin-bottom: 4px;
}

.smart-meta-val {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.smart-thankyou-info-box,
.smart-thankyou-table-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 20px;
	text-align: left;
}

.smart-info-box-title {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 12px 0;
	border-bottom: 1px dashed #cbd5e1;
	padding-bottom: 8px;
}

.smart-thankyou-info-box p {
	font-size: 14px;
	color: #334155;
	margin: 0 0 6px 0;
	line-height: 1.4;
}

.smart-thankyou-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	color: #334155;
}

.smart-thankyou-table td {
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
}

.smart-thankyou-table tr:last-child td {
	border-bottom: none;
}

.text-right {
	text-align: right;
}

.smart-thankyou-action {
	text-align: center;
	margin-top: 24px;
}

.smart-thankyou-btn {
	display: inline-block;
	background-color: #22c55e;
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 14px 32px;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	transition: background-color 0.2s ease, transform 0.1s ease;
	box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.smart-thankyou-btn:hover {
	background-color: #16a34a;
}
