/**
 * Frontend Pricing Matrix Table Styles
 * Summit Route1 Print Sync
 */

.summit-r1-pricing-matrix-wrapper {
	margin: 20px 0 24px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e293b;
}

/* Hide WooCommerce standard numeric quantity input and default price amount on Route1 print products */
.single-product:has(.summit-r1-pricing-matrix-wrapper) #brxe-sppric,
.single-product:has(.summit-r1-pricing-matrix-wrapper) .summary > .price,
.single-product:has(.summit-r1-pricing-matrix-wrapper) .summary > p.price,
.single-product:has(.summit-r1-pricing-matrix-wrapper) .brxe-product-price {
	display: none !important;
}

.single-product:has(.summit-r1-pricing-matrix-wrapper) form.cart .quantity,
.single-product .summit-r1-pricing-matrix-wrapper ~ form.cart .quantity,
.single-product .brxe-product-add-to-cart:has(.summit-r1-pricing-matrix-wrapper) .quantity {
	display: none !important;
}


/* Exact Print Specification Badge (Clean Two-Line Layout) */
.summit-r1-variation-badge-bar {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid #16a34a;
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 20px;
	box-shadow: 0 1px 2px rgba(22, 163, 74, 0.06);
}

.summit-r1-badge-header {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 6px;
}

.summit-r1-badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #16a34a;
}

.summit-r1-badge-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #15803d;
}

.summit-r1-badge-specs {
	font-size: 15px;
	font-weight: 600;
	color: #166534;
	line-height: 1.5;
	padding-left: 25px;
}

@media (max-width: 640px) {
	.summit-r1-badge-specs {
		padding-left: 0;
		font-size: 14px;
	}
}

/* Attribute Selectors & Dropdowns */
.summit-r1-attributes-section {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
}

.summit-r1-attributes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px 16px;
}

.summit-r1-attribute-group {
	display: flex;
	flex-direction: column;
}

.summit-r1-attr-label {
	display: flex;
	align-items: center;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #334155;
}

.summit-r1-attr-label strong {
	font-weight: 600;
	color: #0f172a;
}

.summit-r1-selected-pill-val {
	color: #2563eb;
	margin-left: 4px;
	font-weight: 500;
}

.summit-r1-select-wrap {
	position: relative;
	width: 100%;
}

.summit-r1-attr-select {
	width: 100%;
	height: 42px;
	padding: 8px 36px 8px 12px;
	font-size: 13.5px;
	font-weight: 500;
	color: #1e293b;
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	outline: none;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.summit-r1-attr-select:hover {
	border-color: #94a3b8;
	background-color: #fafbfc;
}

.summit-r1-attr-select:focus {
	border-color: #2563eb;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.summit-r1-select-arrow {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	width: 14px;
	height: 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	transition: transform 0.15s ease;
}

/* Custom Dimensions Row (Width, Height, Unit) - Full Width */
.summit-r1-custom-dimensions-wrap {
	width: 100%;
	box-sizing: border-box;
	margin-top: 16px;
	padding: 14px 16px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.summit-r1-dim-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f1f5f9;
}

.summit-r1-dim-title {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}

.summit-r1-dim-inputs-row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

.summit-r1-dim-field-group {
	display: flex;
	flex-direction: column;
	flex: 1 1 140px;
	min-width: 110px;
}

.summit-r1-dim-sublabel {
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 5px;
}

.summit-r1-dim-field-box {
	position: relative;
	width: 100%;
}

.summit-r1-dim-times {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	font-size: 18px;
	font-weight: 600;
	color: #94a3b8;
	user-select: none;
	margin-bottom: 2px;
}

.summit-r1-dim-field-group-unit {
	flex: 0 0 96px;
	min-width: 84px;
}

.summit-r1-dim-unit-box {
	position: relative;
	width: 100%;
}

.summit-r1-custom-dim-input {
	width: 100%;
	height: 38px;
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-moz-appearance: textfield;
}

.summit-r1-custom-dim-input::-webkit-outer-spin-button,
.summit-r1-custom-dim-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.summit-r1-custom-dim-input:hover {
	border-color: #94a3b8;
}

.summit-r1-custom-dim-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.summit-r1-custom-dim-input.has-error {
	border-color: #ef4444;
	background-color: #fef2f2;
	color: #991b1b;
}

.summit-r1-custom-dim-unit {
	width: 100%;
	height: 38px;
	padding: 6px 26px 6px 12px;
	font-size: 13.5px;
	font-weight: 600;
	color: #1e293b;
	background-color: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.summit-r1-custom-dim-unit:hover {
	border-color: #94a3b8;
	background-color: #f1f5f9;
}

.summit-r1-custom-dim-unit:focus {
	border-color: #2563eb;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.summit-r1-unit-arrow {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	width: 12px;
	height: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

.summit-r1-dim-hint {
	font-size: 12px;
	color: #64748b;
	line-height: 1.3;
}

.summit-r1-dim-hint .dim-hint-text {
	display: inline-block;
}

/* Fallback pill buttons */
.summit-r1-pills-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.summit-r1-pill-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
	transition: all 0.15s ease-in-out;
	outline: none;
}

.summit-r1-pill-btn:hover {
	border-color: #94a3b8;
	background: #f1f5f9;
}

.summit-r1-pill-btn.is-active {
	background: #1e3a8a;
	border-color: #1e3a8a;
	color: #ffffff;
	box-shadow: 0 1px 3px rgba(30, 58, 138, 0.25);
}

/* Pricing Matrix Table */
.summit-r1-table-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.summit-r1-hint-text {
	font-size: 12px;
	color: #64748b;
}

.summit-r1-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.03);
	background: #ffffff;
	max-height: 480px;
}

.summit-r1-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	text-align: center;
	margin: 0 !important;
}

.summit-r1-table thead th {
	position: sticky;
	top: 0;
	z-index: 10;
	background: #f1f5f9;
	color: #0f172a;
	padding: 12px 10px;
	font-size: 13px;
	font-weight: 600;
	border-bottom: 2px solid #cbd5e1;
}

.summit-r1-col-qty {
	width: 100px;
	min-width: 80px;
	text-align: center;
	background: #e2e8f0 !important;
}

.summit-r1-col-turnaround {
	min-width: 125px;
}

.turnaround-title {
	font-weight: 600;
	line-height: 1.3;
}

.turnaround-delivery-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-top: 5px;
	padding: 3px 8px;
	background: #e0f2fe;
	color: #0369a1;
	border: 1px solid #bae6fd;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.turnaround-delivery-badge .delivery-icon {
	display: inline-flex;
	align-items: center;
	color: #0284c7;
}

.turnaround-delivery-badge .delivery-icon svg {
	width: 12px;
	height: 12px;
}

.summit-r1-table tbody tr {
	transition: background-color 0.15s ease;
}

.summit-r1-table tbody tr:nth-child(even) {
	background-color: #f8fafc;
}

.summit-r1-table tbody tr:hover {
	background-color: #f1f5f9;
}

.summit-r1-cell-qty {
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
	border-right: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
}

.summit-r1-cell-price-wrap {
	padding: 6px 8px;
	border-bottom: 1px solid #e2e8f0;
	border-right: 1px solid #f1f5f9;
}

/* Price Select Button */
.summit-r1-price-btn {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 6px;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	cursor: pointer;
	transition: all 0.15s ease;
	outline: none;
}

.summit-r1-price-btn:hover {
	border-color: #2563eb;
	background: #eff6ff;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(37, 99, 235, 0.12);
}

.summit-r1-price-btn .price-value {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.summit-r1-price-btn .select-badge {
	font-size: 10px;
	text-transform: uppercase;
	color: #64748b;
	margin-top: 2px;
	letter-spacing: 0.5px;
}

/* Selected Cell Highlight */
.summit-r1-price-btn.is-selected {
	background: #2563eb;
	border-color: #1d4ed8;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.summit-r1-price-btn.is-selected .price-value {
	color: #ffffff;
}

.summit-r1-price-btn.is-selected .select-badge {
	color: #dbeafe;
	font-weight: 600;
}

.price-na {
	color: #94a3b8;
	font-size: 13px;
}

/* Selection Summary Card */
.summit-r1-summary-card {
	background: #f8fafc;
	border: 2px solid #2563eb;
	border-radius: 8px;
	padding: 16px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 16px;
	flex-wrap: wrap;
	gap: 12px;
}

.summit-r1-summary-main {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	min-width: 260px;
}

.summit-r1-summary-details .summary-line {
	font-size: 15px;
	color: #0f172a;
}

.summit-r1-summary-details .summary-subline {
	font-size: 13px;
	color: #64748b;
	margin-top: 2px;
}

/* Delivery Estimate & Live Cutoff Countdown Card */
.summit-r1-delivery-estimate-card {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	padding: 8px 12px;
	box-shadow: 0 1px 2px rgba(22, 101, 52, 0.05);
}

.summit-r1-delivery-estimate-card .delivery-card-icon {
	color: #16a34a;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.summit-r1-delivery-estimate-card .delivery-card-content {
	font-size: 13px;
	line-height: 1.4;
}

.summit-r1-delivery-estimate-card .delivery-date-row {
	color: #166534;
}

.summit-r1-delivery-estimate-card .delivery-label {
	color: #15803d;
	margin-right: 4px;
}

.summit-r1-delivery-estimate-card .delivery-date-val {
	font-weight: 700;
	color: #14532d;
}

.summit-r1-delivery-estimate-card .delivery-cutoff-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	font-size: 12px;
	color: #374151;
}

.summit-r1-delivery-estimate-card .cutoff-pill {
	background: #dcfce7;
	color: #166534;
	padding: 1px 6px;
	border-radius: 4px;
	font-weight: 600;
	border: 1px solid #86efac;
}

.summit-r1-delivery-estimate-card .cutoff-passed {
	color: #b45309;
	font-weight: 600;
}

.summit-r1-summary-action {
	text-align: right;
}

.summit-r1-total-price .total-label {
	font-size: 13px;
	color: #64748b;
	margin-right: 6px;
}

.summit-r1-total-price .total-amount {
	font-size: 22px;
	font-weight: 800;
	color: #1e3a8a;
}

/* Responsive */
@media (max-width: 640px) {
	.summit-r1-summary-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.summit-r1-summary-action {
		text-align: left;
		width: 100%;
		border-top: 1px solid #e2e8f0;
		padding-top: 10px;
	}
}

/* Live Variation Updating State */
.summit-r1-table.is-loading {
	opacity: 0.4;
	pointer-events: none;
	filter: blur(0.5px);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.summit-r1-updating-banner {
	display: none;
	padding: 8px 14px;
	margin-bottom: 10px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	align-items: center;
	gap: 8px;
}

.summit-r1-updating-banner.is-active {
	display: flex;
}

.summit-r1-updating-banner .dashicons.spin {
	animation: summit-r1-spin 1s linear infinite;
}

@keyframes summit-r1-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
