/**
 * Frontend Layout & Aesthetics Stylesheet - WooCommerce Mock Test Product Table Pro
 *
 * @package WCMTPro
 */

:root {
	--wcmt-primary: #3b82f6;
	--wcmt-primary-hover: #2563eb;
	--wcmt-bg: transparent;
	--wcmt-text: #1e293b;
	--wcmt-text-muted: #64748b;
	--wcmt-border: #d1d5db;
	--wcmt-success: #10b981;
	--wcmt-success-bg: #ecfdf5;
	--wcmt-danger: #ef4444;
	
	/* Soft Harmonious Month Themes (Light background, dark text compatibility) */
	--wcmt-january-bg: hsla(205, 100%, 96%, 0.85);
	--wcmt-february-bg: hsla(125, 80%, 96%, 0.85);
	--wcmt-march-bg: hsla(48, 100%, 95%, 0.85);
	--wcmt-april-bg: hsla(25, 95%, 96%, 0.85);
	--wcmt-may-bg: hsla(270, 75%, 97%, 0.85);
	--wcmt-june-bg: hsla(340, 85%, 97%, 0.85);
	--wcmt-july-bg: #fff099; /* Light yellow background as per reference image */
	--wcmt-august-bg: hsla(160, 75%, 96%, 0.85);
	--wcmt-september-bg: hsla(85, 75%, 95%, 0.85);
	--wcmt-october-bg: hsla(38, 95%, 95%, 0.85);
	--wcmt-november-bg: hsla(230, 75%, 97%, 0.85);
	--wcmt-december-bg: hsla(355, 85%, 96%, 0.85);
}

/* 100% Transparent Outer Card Container - No forced dark background */
.wcmt-table-container,
.wcmt-table-container.glassmorphic {
	position: relative;
	background: transparent !important;
	border: none;
	border-radius: 12px;
	box-shadow: none;
	padding: 0;
	margin: 16px 0;
	box-sizing: border-box;
	overflow: visible;
}

/* Ensure dark mode preference NEVER forces a dark background on table elements */
@media (prefers-color-scheme: dark) {
	.wcmt-table-container,
	.wcmt-table-container.glassmorphic,
	.wcmt-table-wrapper,
	.wcmt-frontend-table {
		background: transparent !important;
		color: #1e293b !important;
	}
	.wcmt-filter-select, 
	.wcmt-live-search-input {
		background-color: #ffffff !important;
		color: #1e293b !important;
		border-color: #cbd5e1 !important;
	}
}

/* Toolbar Controls */
.wcmt-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.wcmt-toolbar-search {
	position: relative;
	flex: 1;
	min-width: 220px;
}
.wcmt-toolbar-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #64748b;
}
.wcmt-live-search-input {
	width: 100%;
	padding: 8px 12px 8px 36px !important;
	border-radius: 6px;
	border: 1px solid var(--wcmt-border);
	font-size: 13px;
	background-color: #ffffff;
	color: #1e293b;
	box-sizing: border-box;
	outline: none;
	transition: all 0.2s ease;
}
.wcmt-live-search-input:focus {
	border-color: var(--wcmt-primary);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.wcmt-toolbar-filters {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.wcmt-filter-select {
	padding: 8px 12px;
	border-radius: 6px;
	border: 1px solid var(--wcmt-border);
	font-size: 13px;
	background-color: #ffffff;
	color: #1e293b;
	outline: none;
	cursor: pointer;
}
.wcmt-filter-select:focus {
	border-color: var(--wcmt-primary);
}

/* Action Checkout Bar styling */
.wcmt-action-bar {
	display: none;
	margin-bottom: 16px;
	width: 100%;
}
.wcmt-align-left { justify-content: flex-start; }
.wcmt-align-center { justify-content: center; }
.wcmt-align-right { justify-content: flex-end; }

/* Premium Checkout button */
.wcmt-btn-premium-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 700;
	border-radius: 24px;
	border: none;
	cursor: pointer;
	color: white;
	background: #001062 !important;
	box-shadow: 0 4px 12px rgba(0, 16, 98, 0.25);
	transition: all 0.2s ease;
	outline: none;
}
.wcmt-btn-premium-action:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 16, 98, 0.35);
}
.wcmt-btn-premium-action:disabled {
	background: #cbd5e1 !important;
	color: #94a3b8;
	cursor: not-allowed;
	box-shadow: none;
}
.wcmt-selected-count-badge {
	background-color: white;
	color: #001062;
	font-size: 11px;
	font-weight: 800;
	padding: 2px 7px;
	border-radius: 20px;
	min-width: 10px;
	text-align: center;
}

/* Table Outer Wrapper */
.wcmt-table-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--wcmt-border);
	border-radius: 6px;
	background: transparent !important;
	box-sizing: border-box;
}

/* Responsive Table Core Structure */
.wcmt-frontend-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 13px;
	text-align: left;
	background: transparent !important;
	table-layout: auto;
	margin: 0;
}

/* Header Cells */
.wcmt-frontend-table th {
	position: sticky;
	top: 0;
	z-index: 10;
	padding: 10px 12px;
	background-color: #ffffff;
	font-weight: 700;
	font-size: 13px;
	color: #374151;
	border-right: 1px solid var(--wcmt-border);
	border-bottom: 2px solid var(--wcmt-border);
	text-align: center;
	vertical-align: middle;
	line-height: 1.3;
	box-sizing: border-box;
}
.wcmt-frontend-table th:last-child {
	border-right: none;
}

/* Sort indicators */
.wcmt-frontend-table th.sortable {
	cursor: pointer;
	user-select: none;
}
.wcmt-frontend-table th.sortable:hover {
	background-color: #f3f4f6;
}
.sort-indicator {
	font-size: 13px;
	width: 13px;
	height: 13px;
	vertical-align: middle;
	display: inline-block;
	opacity: 0.4;
	margin-left: 3px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.wcmt-frontend-table th.sortable:hover .sort-indicator {
	opacity: 0.8;
}
.wcmt-frontend-table th.sorted-asc .sort-indicator {
	opacity: 1;
	transform: rotate(180deg);
	color: var(--wcmt-primary);
}
.wcmt-frontend-table th.sorted-desc .sort-indicator {
	opacity: 1;
	transform: rotate(0deg);
	color: var(--wcmt-primary);
}

/* Row & Body Cell Styling */
.wcmt-row {
	transition: background-color 0.15s ease;
}
.wcmt-row td {
	padding: 12px;
	border-right: 1px solid var(--wcmt-border);
	border-bottom: 1px solid var(--wcmt-border);
	vertical-align: middle;
	color: #374151;
	box-sizing: border-box;
}
.wcmt-row td:last-child {
	border-right: none;
}
.wcmt-row:last-child td {
	border-bottom: none;
}

/* Month Highlights */
.wcmt-month-january { background-color: var(--wcmt-january-bg); }
.wcmt-month-february { background-color: var(--wcmt-february-bg); }
.wcmt-month-march { background-color: var(--wcmt-march-bg); }
.wcmt-month-april { background-color: var(--wcmt-april-bg); }
.wcmt-month-may { background-color: var(--wcmt-may-bg); }
.wcmt-month-june { background-color: var(--wcmt-june-bg); }
.wcmt-month-july { background-color: var(--wcmt-july-bg); }
.wcmt-month-august { background-color: var(--wcmt-august-bg); }
.wcmt-month-september { background-color: var(--wcmt-september-bg); }
.wcmt-month-october { background-color: var(--wcmt-october-bg); }
.wcmt-month-november { background-color: var(--wcmt-november-bg); }
.wcmt-month-december { background-color: var(--wcmt-december-bg); }

/* Column Specific Definitions */
.wcmt-col-sl {
	width: 12%;
	text-align: center !important;
	font-weight: 600;
	color: #4b5563;
	font-size: 14px;
}
.wcmt-col-sl .wcmt-sl-text {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: #4b5563;
}
.wcmt-col-sl .wcmt-sl-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	color: #374151;
}

.wcmt-col-date {
	width: 38%;
	text-align: left;
}
.wcmt-product-link {
	display: inline-block;
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	color: #4338ca;
	line-height: 1.45;
	transition: color 0.15s ease;
}
.wcmt-product-link:hover {
	color: #1d4ed8;
	text-decoration: underline;
}
.wcmt-product-test-date {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	display: block;
	margin-top: 2px;
}

.wcmt-col-location {
	width: 25%;
	text-align: center;
	color: #4b5563;
	font-size: 14px;
}
.wcmt-desc-content {
	font-size: 14px;
	font-weight: 500;
	color: #4b5563;
	line-height: 1.4;
}

.wcmt-col-checkout {
	width: 25%;
	text-align: center;
}

/* Pricing Cell & Compact Price Pill Tag */
.wcmt-pricing-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: nowrap;
}
.wcmt-product-price {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #9ca3af;
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 12px;
	font-weight: 600;
	color: #111827;
	background: #ffffff;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.wcmt-custom-price-label {
	font-size: 12px;
	font-weight: 600;
	color: #111827;
}

/* Selection Checkbox */
.wcmt-checkbox-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.wcmt-checkbox-container {
	position: relative;
	display: inline-block;
	width: 18px;
	height: 18px;
	cursor: pointer;
}
.wcmt-checkbox-container input {
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}
.wcmt-custom-checkmark {
	position: absolute;
	top: 0;
	left: 0;
	width: 18px;
	height: 18px;
	background-color: #ffffff;
	border: 1px solid #9ca3af;
	border-radius: 3px;
	transition: all 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.wcmt-checkbox-container:hover input ~ .wcmt-custom-checkmark {
	border-color: var(--wcmt-primary);
}
.wcmt-checkbox-container input:checked ~ .wcmt-custom-checkmark {
	background-color: var(--wcmt-primary);
	border-color: var(--wcmt-primary);
}
.wcmt-svg-tick {
	width: 12px;
	height: 12px;
	color: white;
	stroke-dasharray: 20;
	stroke-dashoffset: 20;
	transition: stroke-dashoffset 0.15s ease;
}
.wcmt-checkbox-container input:checked ~ .wcmt-custom-checkmark .wcmt-svg-tick {
	stroke-dashoffset: 0;
}

/* Pagination Row styling */
.wcmt-pagination-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}
.wcmt-pagination-btn {
	padding: 6px 14px;
	border-radius: 6px;
	border: 1px solid var(--wcmt-border);
	background: #ffffff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}
.wcmt-pagination-btn:hover:not(:disabled) {
	border-color: var(--wcmt-primary);
	color: var(--wcmt-primary);
}
.wcmt-pagination-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.wcmt-page-info {
	font-size: 12px;
	color: #64748b;
}

/* Toast & Spinner Overlays */
.wcmt-table-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}
.wcmt-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e2e8f0;
	border-top: 3px solid var(--wcmt-primary);
	border-radius: 50%;
	animation: wcmt-spin 0.8s linear infinite;
}
@keyframes wcmt-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Mobile & Small Device Responsive Table Formatting (< 768px)
   ========================================================================== */
@media screen and (max-width: 767px) {
	/* MAINTAIN TRUE HTML TABLE STRUCTURE ON MOBILE */
	.wcmt-frontend-table {
		display: table !important;
		width: 100% !important;
		table-layout: auto !important;
	}
	.wcmt-frontend-table thead {
		display: table-header-group !important;
	}
	.wcmt-frontend-table tbody {
		display: table-row-group !important;
	}
	.wcmt-frontend-table tr {
		display: table-row !important;
	}
	.wcmt-frontend-table th,
	.wcmt-frontend-table td {
		display: table-cell !important;
	}

	/* Compact Padding & Font Sizing for Mobile Screens */
	.wcmt-frontend-table th {
		padding: 8px 6px !important;
		font-size: 11px !important;
		line-height: 1.25 !important;
	}
	.wcmt-row td {
		padding: 8px 6px !important;
		font-size: 12px !important;
	}

	/* Mobile Column Proportions */
	.wcmt-col-sl {
		width: 12% !important;
		font-size: 12px !important;
		padding-left: 4px !important;
		padding-right: 4px !important;
	}
	.wcmt-col-sl .wcmt-sl-text {
		font-size: 12px !important;
	}
	.wcmt-col-date {
		width: 36% !important;
	}
	.wcmt-product-link {
		font-size: 12px !important;
		line-height: 1.35 !important;
	}
	.wcmt-col-location {
		width: 26% !important;
		font-size: 12px !important;
	}
	.wcmt-desc-content {
		font-size: 12px !important;
	}
	.wcmt-col-checkout {
		width: 26% !important;
		padding-left: 4px !important;
		padding-right: 4px !important;
	}

	/* Compact Price Box & Checkbox on Mobile */
	.wcmt-pricing-cell {
		gap: 5px !important;
		justify-content: center !important;
	}
	.wcmt-product-price {
		padding: 2px 5px !important;
		font-size: 11px !important;
	}
	.wcmt-checkbox-container,
	.wcmt-custom-checkmark {
		width: 16px !important;
		height: 16px !important;
	}
	.wcmt-svg-tick {
		width: 10px !important;
		height: 10px !important;
	}

	/* Mobile Toolbar Adjustments */
	.wcmt-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.wcmt-toolbar-search {
		width: 100%;
		min-width: 100%;
	}
	.wcmt-toolbar-filters {
		width: 100%;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}
	.wcmt-filter-select {
		width: 100%;
		font-size: 12px;
		padding: 6px 8px;
	}
}

/* Extra Small Screens (< 420px) */
@media screen and (max-width: 419px) {
	.wcmt-frontend-table th {
		padding: 6px 4px !important;
		font-size: 10px !important;
	}
	.wcmt-row td {
		padding: 6px 4px !important;
		font-size: 11px !important;
	}
	.wcmt-product-link {
		font-size: 11px !important;
	}
	.wcmt-product-price {
		font-size: 10px !important;
		padding: 2px 4px !important;
	}
}