/**
 * Material 3 UI stylesheet for Tenders Manager
 * Conforming to M3 guidelines: rounded corners, pastel status containers, flat outlines, and pill buttons.
 */

.tm-tenders-wrapper {
	width: 100%;
	margin: 24px 0;
	font-family: 'Quicksand', 'Roboto', sans-serif;
	box-sizing: border-box;
}

.tm-tenders-wrapper * {
	box-sizing: border-box;
}

/* Desktop Table View Container */
.tm-table-container {
	width: 100%;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px; /* Material 3 Container Border Radius */
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	margin-bottom: 24px;
}

.tm-tenders-table {
	width: 100%;
	border-collapse: collapse;
	border: none;
}

.tm-tenders-table th {
	background-color: #004a17; /* Default theme dark green, styleable in Elementor */
	color: #ffffff;
	text-align: left;
	padding: 16px 24px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.15px;
}

.tm-tenders-table td {
	padding: 18px 24px;
	border-bottom: 1px solid #f1f5f9;
	color: #1e293b;
	font-size: 14px;
	vertical-align: middle;
}

.tm-tenders-table tr:last-child td {
	border-bottom: none;
}

/* Material 3 Capsule/Pill Badges */
.tm-status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 16px;
	border-radius: 100px; /* Fully rounded capsule */
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tm-status-badge.open {
	background-color: #e8f5e9;
	color: #1b5e20;
}

.tm-status-badge.evaluation {
	background-color: #fff3e0;
	color: #e65100;
}

.tm-status-badge.closed {
	background-color: #ffebee;
	color: #c62828;
}

/* Material 3 Fully Rounded Buttons */
.tm-btn-download {
	display: inline-flex;
	align-items: center;
	background-color: #004a17; /* Default fallback */
	color: #ffffff !important;
	padding: 10px 24px;
	border-radius: 100px; /* Fully rounded pill button */
	text-decoration: none !important;
	font-weight: 600;
	font-size: 13px;
	transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	cursor: pointer;
}

.tm-btn-download:hover {
	background-color: #157347;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
	transform: translateY(-1px);
}

.tm-btn-download:active {
	transform: translateY(0);
}

.tm-btn-download i {
	margin-right: 8px;
	font-size: 14px;
}

/* No Tenders Fallback Alert */
.tm-no-tenders {
	padding: 24px;
	background-color: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 16px;
	color: #64748b;
	text-align: center;
	font-size: 15px;
	font-weight: 500;
	margin: 20px 0;
}

/* Responsive Cards View for Mobile (conforming to M3 layouts) */
.tm-tenders-mobile-list {
	display: none;
}

@media (max-width: 768px) {
	.tm-table-container {
		display: none;
	}
	
	.tm-tenders-mobile-list {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	
	.tm-tender-card {
		background-color: #ffffff;
		border: 1px solid #e2e8f0;
		border-left: 6px solid #004a17; /* Accent highlight */
		border-radius: 16px; /* Material 3 Card border radius */
		padding: 24px;
		transition: transform 0.2s ease, box-shadow 0.2s ease;
		box-shadow: 0 1px 3px rgba(0,0,0,0.02);
	}
	
	.tm-tender-card:hover {
		transform: translateY(-2px);
		box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	}
	
	.tm-card-row {
		margin-bottom: 12px;
	}
	
	.tm-card-row:last-child {
		margin-bottom: 0;
	}
	
	.tm-card-label {
		font-weight: 700;
		font-size: 11px;
		color: #94a3b8;
		display: block;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		margin-bottom: 2px;
	}
	
	.tm-card-value {
		font-size: 14px;
		color: #1e293b;
		font-weight: 500;
	}
	
	.tm-card-value.title {
		font-size: 18px;
		font-weight: 700;
		color: #004a17;
		line-height: 1.4;
		margin-bottom: 4px;
		display: block;
	}
}
