/**
 * UK Salary Calculator Frontend Styles
 * Mobile-first, clean design
 */

.uk-salary-calculator-wrapper {
	width: 95%;
	max-width: 100%;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.uk-salary-calculator-wrapper {
		width: 95%;
		max-width: 1200px;
	}
}

@media (min-width: 1400px) {
	.uk-salary-calculator-wrapper {
		width: 95%;
		max-width: 1400px;
	}
}

.uk-salary-calculator-form {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	width: 100%;
	box-sizing: border-box;
}

.uk-calc-inline-fields {
	display: flex;
	gap: 2%;
	width: 100%;
}

.uk-calc-section {
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #f0f0f0;
}

.uk-calc-section:last-child {
	border-bottom: none;
}

.uk-calc-section h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.uk-calc-field {
	margin-bottom: 20px;
}

.uk-calc-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #555;
	font-size: 14px;
}

.uk-calc-required {
	color: #d32f2f;
	margin-left: 3px;
}

.uk-calc-tooltip {
	cursor: help;
	margin-left: 5px;
	font-size: 14px;
}

.uk-calc-field input[type="number"],
.uk-calc-field input[type="text"],
.uk-calc-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.uk-calc-field input:focus,
.uk-calc-field select:focus {
	outline: none;
	border-color: #1976d2;
	box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.uk-calc-actions {
	margin-top: 30px;
	text-align: center;
}

.uk-calc-button {
	background: #1976d2;
	color: #fff;
	border: none;
	padding: 14px 40px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.uk-calc-button:hover:not(:disabled) {
	background: #1565c0;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.uk-calc-button:active:not(:disabled) {
	transform: translateY(0);
}

.uk-calc-button:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
}

/* Results */
.uk-calc-results {
	margin-top: 30px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.uk-calc-loading {
	text-align: center;
	padding: 40px;
	color: #666;
}

.uk-calc-results-header h3 {
	margin: 0 0 25px 0;
	font-size: 24px;
	color: #1976d2;
	font-weight: 600;
}

.uk-calc-main-results {
	margin-bottom: 30px;
}

.uk-calc-result-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #f0f0f0;
}

.uk-calc-result-item:last-child {
	border-bottom: none;
}

.uk-calc-result-item.uk-calc-gross {
	border-bottom: 2px solid #e0e0e0;
	padding-bottom: 20px;
	margin-bottom: 10px;
}

.uk-calc-result-item.uk-calc-net-pay {
	border-top: 2px solid #1976d2;
	border-bottom: 2px solid #1976d2;
	padding: 20px 0;
	margin-top: 20px;
	background: #f5f9ff;
	padding-left: 15px;
	padding-right: 15px;
	margin-left: -15px;
	margin-right: -15px;
}

.uk-calc-result-item.uk-calc-total-deductions {
	font-weight: 600;
	border-top: 1px solid #ddd;
	margin-top: 10px;
	padding-top: 20px;
}

.uk-calc-label {
	font-size: 15px;
	color: #555;
}

.uk-calc-value {
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.uk-calc-net-pay .uk-calc-label {
	font-size: 18px;
	font-weight: 600;
	color: #1976d2;
}

.uk-calc-net-pay .uk-calc-value {
	font-size: 24px;
	color: #1976d2;
}

.uk-calc-deductions {
	margin: 20px 0;
}

.uk-calc-deductions h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #666;
	font-weight: 500;
}

.uk-calc-breakdown {
	margin-top: 30px;
	padding-top: 25px;
	border-top: 2px solid #e0e0e0;
}

.uk-calc-breakdown h4 {
	margin: 0 0 20px 0;
	font-size: 18px;
	color: #333;
}

.uk-calc-breakdown-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
}

.uk-calc-breakdown-item {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 6px;
	text-align: center;
}

.uk-calc-breakdown-label {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.uk-calc-breakdown-value {
	display: block;
	font-size: 20px;
	font-weight: 600;
	color: #1976d2;
}

/* Chart */
.uk-calc-chart {
	margin-top: 30px;
	padding-top: 25px;
	border-top: 2px solid #e0e0e0;
}

.uk-calc-chart h4 {
	margin: 0 0 15px 0;
	font-size: 18px;
	color: #333;
}

.uk-calc-chart-bar {
	display: flex;
	height: 50px;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.uk-calc-chart-segment {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: width 0.3s ease;
}

.uk-calc-chart-net {
	background: #4caf50;
	color: #fff;
}

.uk-calc-chart-deductions {
	background: #f44336;
	color: #fff;
}

.uk-calc-chart-label {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	padding: 0 8px;
}

.uk-calc-info {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.uk-calc-info p {
	margin: 0;
	color: #666;
	font-size: 13px;
	line-height: 1.6;
}

.uk-calc-error {
	background: #ffebee;
	border: 1px solid #ef5350;
	border-radius: 4px;
	padding: 15px;
	color: #c62828;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.uk-salary-calculator-wrapper {
		padding: 15px;
	}
	
	.uk-salary-calculator-form,
	.uk-calc-results {
		padding: 20px;
	}
	
	.uk-calc-breakdown-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.uk-calc-button {
		width: 100%;
		padding: 16px;
	}
	
	.uk-calc-result-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	.uk-calc-value {
		font-size: 20px;
	}
	
	.uk-calc-net-pay .uk-calc-value {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.uk-calc-breakdown-grid {
		grid-template-columns: 1fr;
	}
	
	.uk-calc-section h3 {
		font-size: 16px;
	}
}

/* Advanced Features Styles */

/* Results Header with Actions */
.uk-calc-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
	gap: 15px;
}

.uk-calc-results-header h3 {
	margin: 0;
	font-size: 24px;
	color: #1976d2;
}

.uk-calc-actions-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.uk-calc-action-btn {
	background: #fff;
	border: 1px solid #ddd;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s;
}

.uk-calc-action-btn:hover {
	background: #f5f5f5;
	border-color: #1976d2;
	color: #1976d2;
}

.uk-calc-action-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Summary Cards */
.uk-calc-summary-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.uk-calc-summary-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 12px;
	padding: 25px;
	color: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.uk-calc-summary-card.uk-calc-card-gross {
	background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.uk-calc-summary-card.uk-calc-card-deductions {
	background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.uk-calc-summary-card.uk-calc-card-net {
	background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.uk-calc-card-label {
	font-size: 14px;
	opacity: 0.9;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.uk-calc-card-value {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 5px;
}

.uk-calc-card-sub {
	font-size: 12px;
	opacity: 0.8;
}

/* Detailed Breakdown Table */
.uk-calc-detailed-breakdown {
	margin: 30px 0;
	overflow-x: auto;
	width: 100%;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

.uk-calc-detailed-breakdown h4 {
	margin: 0 0 20px 0;
	font-size: 20px;
	color: #333;
}

.uk-calc-breakdown-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.uk-calc-breakdown-table thead {
	background: #f5f5f5;
}

.uk-calc-breakdown-table th {
	padding: 12px;
	text-align: left;
	font-weight: 600;
	color: #333;
	border-bottom: 2px solid #ddd;
}

.uk-calc-breakdown-table td {
	padding: 12px;
	border-bottom: 1px solid #eee;
}

.uk-calc-breakdown-table tbody tr:hover {
	background: #f9f9f9;
}

.uk-calc-breakdown-table .uk-calc-row-gross {
	background: #e3f2fd;
}

.uk-calc-breakdown-table .uk-calc-row-separator {
	background: #f5f5f5;
	font-weight: 600;
}

.uk-calc-breakdown-table .uk-calc-row-total {
	background: #fff3e0;
	font-weight: 600;
}

.uk-calc-breakdown-table .uk-calc-row-net {
	background: #e8f5e9;
	font-weight: 600;
	font-size: 16px;
}

/* Charts Section */
.uk-calc-charts-section {
	margin: 40px 0;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.uk-calc-charts-section h4 {
	margin: 0 0 25px 0;
	font-size: 20px;
	color: #333;
}

.uk-calc-charts-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

.uk-calc-chart-wrapper {
	background: #fff;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 300px;
	box-sizing: border-box;
	overflow: hidden;
}

.uk-calc-chart-wrapper canvas {
	max-width: 100% !important;
	max-height: 100% !important;
	width: 100% !important;
	height: auto !important;
}

/* Notifications */
.uk-calc-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 15px 20px;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	opacity: 0;
	transform: translateX(400px);
	transition: all 0.3s ease;
	max-width: 400px;
	font-size: 14px;
}

.uk-calc-notification-show {
	opacity: 1;
	transform: translateX(0);
}

.uk-calc-notification-success {
	background: #4caf50;
	color: #fff;
}

.uk-calc-notification-error {
	background: #f44336;
	color: #fff;
}

.uk-calc-notification-info {
	background: #2196f3;
	color: #fff;
}

/* Responsive adjustments for new features */
@media (max-width: 768px) {
	.uk-calc-results-header {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.uk-calc-actions-bar {
		width: 100%;
	}
	
	.uk-calc-action-btn {
		flex: 1;
		justify-content: center;
	}
	
	.uk-calc-summary-cards {
		grid-template-columns: 1fr;
	}
	
	.uk-calc-breakdown-table {
		font-size: 14px;
	}
	
	.uk-calc-breakdown-table th,
	.uk-calc-breakdown-table td {
		padding: 8px;
	}
	
	.uk-calc-charts-container {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.uk-calc-chart-wrapper {
		height: 250px;
		padding: 10px;
		max-width: 100%;
		overflow: hidden;
	}
	
	.uk-calc-charts-section {
		padding: 15px;
		margin: 20px 0;
	}
	
	.uk-calc-notification {
		right: 10px;
		left: 10px;
		max-width: none;
		transform: translateY(-100px);
	}
	
	.uk-calc-notification-show {
		transform: translateY(0);
	}
}

@media (max-width: 480px) {
	.uk-salary-calculator-form {
		padding: 20px 15px;
	}
	
	.uk-calc-card-value {
		font-size: 24px;
	}
	
	.uk-calc-breakdown-table {
		font-size: 12px;
	}
	
	.uk-calc-breakdown-table th,
	.uk-calc-breakdown-table td {
		padding: 6px 4px;
	}
	
	.uk-calc-inline-fields {
		flex-direction: column;
		gap: 10px;
	}
	
	.uk-calc-inline-fields input {
		width: 100% !important;
		margin-right: 0 !important;
	}
}

