/**
 * Estilos para el calculador de asfalto (Frontend).
 *
 * @package ITP_Asphalt_Calculator
 */

/* Contenedor principal */
.itp-calculator-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
}

.itp-calculator-container {
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.itp-calculator-title {
	margin-top: 0;
	margin-bottom: 25px;
	color: #23282d;
	font-size: 28px;
	font-weight: 600;
	border-bottom: 3px solid #0073aa;
	padding-bottom: 15px;
}

/* Formulario */
.itp-calculator-form {
	margin-bottom: 30px;
}

.itp-form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 25px;
}

.itp-form-field {
	display: flex;
	flex-direction: column;
}

.itp-form-field label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #23282d;
	font-size: 14px;
}

.itp-form-field .required {
	color: #dc3232;
	margin-left: 2px;
}

.itp-form-field input[type="number"] {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.2s;
}

.itp-form-field input[type="number"]:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Acciones del formulario */
.itp-form-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.itp-btn-calculate,
.itp-btn-reset,
.itp-btn-download-pdf,
.itp-btn-save {
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.2s;
}

.itp-btn-calculate {
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
}

.itp-btn-calculate:hover {
	background: #005177;
}

/* Resultados */
.itp-results {
	background: #f9f9f9;
	border: 2px solid #0073aa;
	border-radius: 8px;
	padding: 25px;
	margin-top: 30px;
}

.itp-results h3 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #0073aa;
	font-size: 22px;
}

.itp-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 15px;
	margin-bottom: 25px;
}

.itp-result-item {
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 15px;
	text-align: center;
	transition: transform 0.2s, box-shadow 0.2s;
}

.itp-result-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.itp-result-item.itp-result-highlight {
	background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
	color: white;
	border: none;
	grid-column: 1 / -1;
}

.itp-result-highlight .itp-result-label,
.itp-result-highlight .itp-result-value,
.itp-result-highlight .itp-result-unit {
	color: white;
}

.itp-result-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 8px;
	font-weight: 600;
}

.itp-result-value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #23282d;
	margin-bottom: 5px;
}

.itp-result-highlight .itp-result-value {
	font-size: 36px;
}

.itp-result-unit {
	display: block;
	font-size: 14px;
	color: #888;
	font-weight: 500;
}

/* Acciones de resultados */
.itp-results-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

/* Historial */
.itp-history-section {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 2px solid #e0e0e0;
}

.itp-history-section h3 {
	color: #23282d;
	font-size: 20px;
	margin-bottom: 20px;
}

.itp-history-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.itp-history-table th {
	background: #f1f1f1;
	padding: 12px;
	text-align: left;
	font-weight: 600;
	border-bottom: 2px solid #ddd;
}

.itp-history-table td {
	padding: 12px;
	border-bottom: 1px solid #e0e0e0;
}

.itp-delete-calculation {
	background: #dc3232;
	color: white;
	border: none;
	padding: 5px 12px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
}

.itp-delete-calculation:hover {
	background: #a00;
}

/* Notificaciones */
.itp-notice {
	padding: 12px 20px;
	margin-bottom: 20px;
	border-radius: 4px;
	font-size: 14px;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.itp-notice-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.itp-notice-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.itp-notice-info {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* Loading */
.itp-loading {
	text-align: center;
	color: #666;
	font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
	.itp-calculator-container {
		padding: 20px;
	}

	.itp-form-row {
		grid-template-columns: 1fr;
	}

	.itp-results-grid {
		grid-template-columns: 1fr;
	}

	.itp-result-highlight {
		grid-column: 1;
	}

	.itp-calculator-title {
		font-size: 22px;
	}

	.itp-result-value {
		font-size: 24px;
	}

	.itp-result-highlight .itp-result-value {
		font-size: 30px;
	}
}

@media (max-width: 480px) {
	.itp-calculator-wrapper {
		padding: 10px;
	}

	.itp-calculator-container {
		padding: 15px;
	}

	.itp-form-actions,
	.itp-results-actions {
		flex-direction: column;
	}

	.itp-form-actions button,
	.itp-results-actions button {
		width: 100%;
	}
}
