/**
 * Woop My Account Styles
 */

.woop-timesheet-summary {
	margin-bottom: 20px;
}

.woop-metric {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.woop-timesheet-filters {
	background-color: #f7f7f7;
	border: 1px solid #e5e5e5;
}

@media screen and (max-width: 768px) {
	.woop-timesheet-summary {
		flex-direction: column;
		gap: 10px;
	}

	.woop-metric {
		width: 100%;
		box-sizing: border-box;
	}
}

/* =============================================================================
   PRINT STYLES
============================================================================= */
@media print {

	/* 
       Instead of hiding everything and showing only content (which can fail if parents are hidden),
       we specifically hide common theme elements.
    */
	.woocommerce-MyAccount-navigation,
	.woop-ts-period-nav,
	.woocommerce-MyAccount-content a[href^="javascript:window.print"],
	#masthead,
	#colophon,
	.site-header,
	.site-footer,
	.footer,
	.header,
	.sidebar,
	.widget-area,
	#secondary,
	.elementor-location-header,
	.elementor-location-footer,
	#wpadminbar {
		display: none !important;
	}

	/* Ensure main content is visible and full width */
	.woocommerce-MyAccount-content {
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
	}

	/* Table styling for print */
	table.shop_table {
		border-collapse: collapse !important;
		width: 100% !important;
		border: 1px solid #000 !important;
		font-size: 9pt !important;
		margin-bottom: 20px !important;
	}

	table.shop_table th,
	table.shop_table td {
		border: 1px solid #999 !important;
		padding: 4px 6px !important;
		color: #000 !important;
	}

	table.shop_table thead th {
		background-color: #eee !important;
		font-weight: bold !important;
	}

	/* Remove background colors from rows */
	table.shop_table tbody tr:nth-child(odd) td,
	table.shop_table tbody tr:nth-child(even) td {
		background-color: transparent !important;
	}

	/* Totals styling */
	.woop-timesheet-summary {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 10px !important;
		margin-bottom: 20px !important;
		page-break-inside: avoid;
	}

	.woop-metric {
		box-shadow: none !important;
		border: 1px solid #ccc !important;
		background: #fff !important;
		padding: 8px 12px !important;
		min-width: 150px;
	}

	/* Adjust heading */
	h3 {
		margin-top: 0;
		margin-bottom: 15px;
		font-size: 16pt;
		color: #000 !important;
	}

	@page {
		margin: 1.5cm;
	}
}