@import 'sidebar.css';

h2 {
	color: var(--tone-1-dark);
	margin-bottom: 20px;
	border-bottom: 2px solid var(--tone-1);
	padding-bottom: 10px;
	font-weight: 700;
	text-align: center;
}

/* Sistema de 3 Tonos - Paleta Simplificada */
:root {
	/* TONO 1: Azul principal (para acciones, links, highlights) */
	--color-azul: #2563eb;

	/* TONO 2: Verde (para éxitos, confirmaciones) */
	--color-verde: #10b981;

	/* TONO 3: Grises (para textos, fondos, bordes) */
	--gris-oscuro: #1e293b;
	/* Textos principales */
	--gris-medio: #64748b;
	/* Textos secundarios */
	--gris-claro: #e2e8f0;
	/* Bordes, fondos sutiles */
	--gris-fondo: #f8fafc;
	/* Fondo general */

	/* Utilidades derivadas (no son tonos nuevos, solo referencias semánticas) */
	--blanco: #ffffff;
	--negro: #000000;

	/* Variables legacy (mapeo a los 3 tonos) */
	--tone-1: var(--color-azul);
	--tone-1-dark: var(--color-azul);
	--tone-1-light: var(--color-azul);
	--tone-2: var(--color-verde);
	--tone-2-light: var(--color-verde);
	--muted: var(--gris-medio);
	--surface: var(--blanco);
	--bg: var(--gris-fondo);
	--text-main: var(--gris-oscuro);
	--text-secondary: var(--gris-medio);
	--border-light: var(--gris-claro);
	--border-medium: var(--gris-claro);
	--input-border: var(--gris-claro);
	--input-focus: var(--color-azul);
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	--card-shadow: var(--shadow-md);
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--bg);
	padding: 0;
	margin: 0;
	color: var(--text-main);
	font-size: 15px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.container {
	max-width: 100%;
	margin: auto;
	background: var(--surface);
	padding: 28px;
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-light);
}

h3,
h4 {
	color: var(--text-main);
	margin-top: 8px;
	margin-bottom: 16px;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.01em;
}

h5 {
	color: var(--tone-1);
	margin-top: 16px;
	margin-bottom: 12px;
	font-weight: 600;
	font-size: 17px;
	letter-spacing: -0.005em;
}

.tab-buttons {
	display: flex;
	margin-bottom: 0;
	border-bottom: 2px solid #bdc3c7;
	flex-wrap: wrap;
}

.tab-button {
	padding: 12px 18px;
	cursor: pointer;
	background-color: #eef3f7;
	border: 1px solid #d6dde3;
	border-bottom: none;
	margin-right: 10px;
	margin-bottom: 10px;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
	font-weight: 600;
	color: var(--tone-1-dark);
	white-space: nowrap;
	transition: all 0.3s ease;
}

.tab-button:hover:not(.active) {
	background-color: #e6eef6;
}

.tab-button.active {
	background-color: var(--surface);
	border-color: #d6dde3;
	border-bottom: 2px solid var(--surface);
	color: var(--tone-1);
	box-shadow: 0 -2px 8px rgba(11, 95, 165, 0.12);
}

.tab-content {
	display: none;
	padding: 20px;
	border: 1px solid #bdc3c7;
	border-top: none;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	background: white;
	position: relative;
}

.tab-content.active {
	display: block;
}

label {
	font-weight: 500;
	display: block;
	margin-top: 16px;
	margin-bottom: 6px;
	color: var(--text-secondary);
	font-size: 14px;
	letter-spacing: 0.01em;
}

.input-group-with-reset {
	display: flex;
	align-items: center;
	gap: 5px;
}

#resetCapacityBtn {
	margin: 0;
	padding: 5px 8px;
	font-size: 1.2em;
	line-height: 1;
	background: #ecf0f1;
	color: #2c3e50;
	border: 1px solid #bdc3c7;
	box-shadow: none;
	flex-shrink: 0;
}

#resetCapacityBtn:hover {
	background: #d6dbdf;
	transform: none;
}

input:not([type="text"]):not([type="radio"]),
input[type="number"],
select {
	width: 100%;
	padding: 11px 12px;
	margin-top: 6px;
	border: 1px solid var(--input-border);
	border-radius: 8px;
	box-sizing: border-box;
	background-color: var(--surface);
	transition: all 0.15s ease-out;
	font-size: 14px;
	color: var(--text-main);
}

input:disabled,
input[readonly] {
	background-color: #f3f4f6;
	color: var(--muted);
	cursor: not-allowed;
	opacity: 0.6;
}

input[type="text"] {
	width: 100%;
	padding: 11px 12px;
	margin-top: 6px;
	border: 1px solid var(--input-border);
	border-radius: 8px;
	box-sizing: border-box;
	background-color: var(--surface);
	font-size: 14px;
	color: var(--text-main);
	transition: all 0.15s ease-out;
}

input:focus,
select:focus {
	border-color: var(--input-focus);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
	outline: none;
	background-color: var(--surface);
}

button {
	margin-top: 20px;
	padding: 10px 20px;
	background: var(--tone-1);
	color: var(--surface);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.15s ease-out;
	margin-right: 10px;
	box-shadow: var(--shadow-sm);
	letter-spacing: 0.01em;
}

button:hover {
	background: var(--tone-1-dark);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

button:active {
	transform: translateY(0) scale(0.98);
	box-shadow: var(--shadow-sm);
}

.delete-btn {
	background: #e74c3c;
	color: white;
	border: none;
	padding: 5px 8px;
	font-size: 0.8em;
	font-weight: bold;
	cursor: pointer;
	border-radius: 4px;
	opacity: 0.85;
	transition: opacity 0.2s, background 0.2s;
}

.delete-btn:hover {
	opacity: 1.0;
	background: #c0392b;
}

.table-v-idae,
.table-vi {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
	font-size: 14px;
	border: 1px solid var(--border-medium);
	border-radius: 8px;
	overflow: hidden;
}

.table-v-idae th,
.table-v-idae td,
.table-vi th,
.table-vi td {
	border: 1px solid var(--border-light);
	padding: 12px;
	text-align: left;
	vertical-align: middle;
}

.table-v-idae th,
.table-vi th {
	background-color: #f3f4f6;
	color: var(--text-main);
	font-weight: 600;
	font-size: 13px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.header-row th {
	background-color: #5d6d7e;
	font-size: 1.1em;
}

.table-v-idae tbody tr:nth-child(even),
.table-vi tbody tr:nth-child(even) {
	background-color: #f9fafb;
}

.table-v-idae tbody tr:hover,
.table-vi tbody tr:hover {
	background-color: #eff6ff;
	transition: background-color 0.15s ease-out;
}

.subheader-row th {
	background-color: #7f8c8d;
	font-weight: normal;
}

.input-cell {
	background-color: #fcfcfc;
}

.linked-cell {
	background-color: #e8f4fc;
	font-weight: 600;
	color: #2980b9;
}

.calculated {
	background-color: #ecf0f1;
	font-weight: 600;
	text-align: center;
}

.calculated-value-final {
	font-size: 1.2em;
	color: var(--tone-2);
	background-color: #f0fbf9;
	font-weight: 700;
	text-align: center;
}

.comment-cell {
	font-size: 0.85em;
	color: #7f8c8d;
	font-style: italic;
}

.formula-cell {
	font-family: 'Times New Roman', serif;
	text-align: center;
	font-style: italic;
	background: #fdfefe;
	font-size: 0.9em;
	color: #5d6d7e;
}

.pr-breakdown {
	background: #f8f9fa;
	border: 1px solid #bdc3c7;
	border-radius: 8px;
	padding: 15px;
	margin-top: 15px;
}

.pr-breakdown summary {
	font-weight: 700;
	color: var(--tone-1);
	cursor: pointer;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
}

.pr-breakdown summary::before {
	content: "▶";
	margin-right: 8px;
	transition: transform 0.3s;
	font-size: 0.8em;
}

.pr-breakdown[open] summary::before {
	transform: rotate(90deg);
}

.pr-breakdown-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.pr-breakdown-table th,
.pr-breakdown-table td {
	border: 1px solid #e0e0e0;
	padding: 8px;
	text-align: left;
}

.pr-breakdown-table th {
	background-color: #ecf0f1;
	font-weight: 600;
	text-align: center;
}

.pr-breakdown-table .pr-component {
	background-color: #fff;
}

.pr-breakdown-table .pr-total {
	background-color: #e8f6f3;
	font-weight: bold;
	color: #27ae60;
}

#tablaIV-tabla {
	border-collapse: collapse;
	width: 100%;
	margin-bottom: 20px;
	border: 1px solid #bdc3c7;
	border-radius: 8px;
	overflow: hidden;
}

#tablaIV-tabla th,
#tablaIV-tabla td {
	border: 1px solid #e0e0e0;
	padding: 12px;
	text-align: center;
}

#tablaIV-tabla select.tablaIV-tipo {
	width: 100%;
	padding: 5px;
}

#tablaIV-tabla th {
	background-color: #ecf0f1;
	color: #2c3e50;
}

#tablaIV-simple-total {
	background-color: #d4efdf;
	color: #1d8348;
	font-weight: bold;
	font-size: 1.2em;
}

#tablaIV-tabla tfoot th {
	text-align: right;
	font-size: 1.1em;
	background-color: #d6eaf8;
	color: #2980b9;
}

#battery-validator-module,
#pv-details-module {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: #333;
	max-width: 1200px;
	margin: 25px auto;
	padding: 20px;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	background-color: #fdfdfd;
}

#battery-validator-module h2,
#battery-validator-module h3,
#battery-validator-module h4,
#pv-details-module h3 {
	color: #0056b3;
	border-bottom: 2px solid #007bff;
	padding-bottom: 8px;
	margin-bottom: 20px;
}

#battery-validator-module .grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 25px;
}

#pv-details-module .grid-container-pv {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px 25px;
	align-items: end;
}

#pv-details-module .full-width-selector {
	grid-column: 1 / -1;
}

#battery-validator-module .input-group,
#battery-validator-module .select-group {
	margin-bottom: 15px;
}

#battery-validator-module label,
#pv-details-module label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #495057;
}

#battery-validator-module input[type="number"],
#battery-validator-module select {
	width: 100%;
	padding: 10px;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	box-sizing: border-box;
	font-size: 1em;
}

#battery-validator-module input[readonly] {
	background-color: #e9ecef;
	font-weight: bold;
	color: #0056b3;
}

#error-container {
	padding: 15px;
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #721c24;
	border-radius: 5px;
	margin-top: 20px;
	display: none;
}

#error-container.suggestion {
	background-color: #e7f3ff;
	color: #004085;
	border-color: #b8daff;
}

#error-container.suggestion h4 {
	color: #004085;
}

#error-container.suggestion button {
	margin-top: 10px;
	background-color: #007bff;
}

#error-container.suggestion button:hover {
	background-color: #0056b3;
}

.error-suggestions {
	font-size: 0.9em;
	margin-top: 10px;
	padding-left: 20px;
	color: #5a2d2d;
}

#battery-validator-module .comentario-tecnico {
	font-style: italic;
	color: #0056b3;
	background-color: #e7f3ff;
	padding: 10px;
	border-radius: 5px;
	border-left: 4px solid #007bff;
	margin-top: 10px;
}

#battery-config-selector-module {
	margin-top: 25px;
	padding: 15px;
	border: 1px solid #007bff;
	border-radius: 8px;
	background-color: #f8f9fa;
}

.config-box-display {
	border: 2px solid #e1e6ea;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
	background-color: #fff;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	position: relative;
}

.config-box-display:hover {
	border-color: var(--tone-1);
	box-shadow: 0 6px 18px rgba(11, 95, 165, 0.06);
}

.config-box-display.selected {
	border-color: var(--tone-2);
	background-color: #f3fbf9;
}

.config-box-display h4,
.config-box-display h5 {
	margin-top: 0;
	color: var(--tone-1);
}

.config-box-display p {
	margin: 5px 0;
	font-size: 1.0em;
}

.config-box-display .tech-details {
	font-size: 0.9em;
	color: #555;
	margin-top: 10px;
	border-top: 1px solid #eee;
	padding-top: 10px;
}

.config-box-display .tech-details p em {
	color: #0056b3;
}

.optimal-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: var(--tone-2);
	color: var(--surface);
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: bold;
}

.recommended-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: var(--tone-1);
	color: var(--surface);
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: bold;
}

.optimal-legend {
	font-size: 0.9em;
	background-color: #f3fbff;
	padding: 10px;
	border-radius: 5px;
	border-left: 4px solid var(--tone-1);
	margin: 0 0 15px 0;
}

.detail-box {
	background-color: #e7f3ff;
	border-left: 5px solid #0056b3;
	padding: 15px;
	margin-bottom: 10px;
	border-radius: 4px;
}

.detail-box p {
	margin: 5px 0;
}

.detail-box strong {
	color: #0056b3;
}

#high-current-alert {
	display: none;
	padding: 15px;
	margin-top: 15px;
	border-radius: 8px;
	background-color: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
}

#high-current-alert strong {
	font-size: 1.1em;
}

#high-current-alert button {
	float: right;
	margin-top: 0;
	padding: 5px 10px;
	background-color: #856404;
	color: white;
}

.order-summary-box {
	background-color: #fdfdfd;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 25px;
	max-width: 800px;
	margin: 20px auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.order-summary-box h4 {
	color: #0056b3;
	border-bottom: 2px solid #007bff;
	padding-bottom: 8px;
	margin-top: 25px;
	margin-bottom: 15px;
	font-size: 1.3em;
}

.order-summary-box h4:first-child {
	margin-top: 0;
}

.order-summary-box h5 {
	color: #34495e;
	font-size: 1.1em;
	margin-bottom: 10px;
	padding-bottom: 5px;
	border-bottom: 1px solid #ecf0f1;
}

.order-summary-box p {
	margin: 8px 0 8px 15px;
	font-size: 1.05em;
	display: flex;
	justify-content: space-between;
}

.order-summary-box p strong {
	color: #495057;
}

.order-summary-box p span {
	font-weight: bold;
	color: #2c3e50;
	text-align: right;
}

.order-summary-box .highlight {
	font-size: 1.2em;
	color: #c7254e;
	background-color: #f9f2f4;
	padding: 5px 8px;
	border-radius: 4px;
}

#design-analysis-box {
	margin-top: 30px;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
}

#design-analysis-box h4 {
	margin-top: 0;
	color: #0056b3;
	border-bottom: 2px solid #007bff;
	padding-bottom: 8px;
}

#analysis-points-list {
	list-style-type: none;
	padding-left: 0;
	margin-top: 15px;
}

#analysis-points-list li {
	display: flex;
	align-items: flex-start;
	margin-bottom: 12px;
	padding: 10px;
	border-radius: 5px;
	border: 1px solid transparent;
}

#analysis-points-list li::before {
	font-size: 1.4em;
	margin-right: 12px;
}

#analysis-points-list li.analysis-ok {
	background-color: #d4edda;
	border-color: #c3e6cb;
	color: #155724;
}

#analysis-points-list li.analysis-ok::before {
	content: '✅';
}

#analysis-points-list li.analysis-warn {
	background-color: #fff3cd;
	border-color: #ffeeba;
	color: #856404;
}

#analysis-points-list li.analysis-warn::before {
	content: '⚠️';
}

#analysis-points-list li.analysis-fail {
	background-color: #f8d7da;
	border-color: #f5c6cb;
	color: #721c24;
}

#analysis-points-list li.analysis-fail::before {
	content: '❌';
}

#analysis-points-list li strong {
	display: block;
	margin-bottom: 3px;
}

#analysis-points-list li span {
	font-size: 0.9em;
}


#final-summary-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 25px;
}

.summary-card {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
}

.summary-card-title {
	font-weight: 700;
	font-size: 1.2em;
	color: #0056b3;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid #007bff;
	display: flex;
	align-items: center;
}

.summary-card-title span {
	margin-right: 10px;
}

.summary-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #ecf0f1;
	font-size: 0.95em;
}

.summary-item:last-child {
	border-bottom: none;
}

.summary-item .label {
	color: #495057;
}

.summary-item .value {
	font-weight: bold;
	color: #2c3e50;
}

.summary-item .value.highlight {
	color: #d9534f;
	font-size: 1.1em;
}

.summary-item .value.ok {
	color: #5cb85c;
}

.summary-item .value.warn {
	color: #f0ad4e;
}

.component-selection-box {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
	margin-top: 25px;
}

.component-selection-box h4 {
	margin-top: 0;
	color: #0056b3;
	border-bottom: 2px solid #007bff;
	padding-bottom: 8px;
}

.generator-question {
	background-color: #e7f3ff;
	border-left: 5px solid #0056b3;
	padding: 15px;
	margin-bottom: 10px;
	border-radius: 4px;
}

.generator-question label {
	margin: 0 15px 0 5px;
	font-weight: normal;
}

.tech-explanation {
	font-size: 0.9em;
	color: #004085;
	margin-top: 10px;
}

.dc-load-notice {
	font-size: 0.9em;
	background-color: #e7f3ff;
	color: #004085;
	padding: 8px 12px;
	border-radius: 5px;
	border-left: 4px solid #007bff;
	margin-bottom: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.dc-load-notice-close {
	cursor: pointer;
	font-weight: bold;
	font-family: monospace;
	padding: 2px 6px;
	border-radius: 4px;
}

.dc-load-notice-close:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

.recommendation-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.recommendation-card {
	border: 2px solid #bdc3c7;
	border-radius: 8px;
	padding: 15px;
	background: #fff;
	transition: all 0.2s ease-in-out;
}

.recommendation-card h5 {
	margin-top: 0;
	color: #34495e;
	font-size: 1.1em;
}

.recommendation-card .why {
	font-size: 0.9em;
	background-color: #ecf0f1;
	padding: 10px;
	border-radius: 5px;
	border-left: 3px solid #3498db;
	margin: 10px 0;
}

.recommendation-card .why ul {
	list-style-position: inside;
	padding-left: 5px;
	margin: 0;
}

.recommendation-card ul {
	list-style-type: none;
	padding-left: 0;
	font-size: 0.95em;
}

.recommendation-card ul li {
	margin-bottom: 5px;
}

.recommendation-card button {
	width: 100%;
	margin-top: 15px;
	padding: 10px;
}

.recommendation-card.selected {
	border-color: #27ae60;
	box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.recommendation-card.selected button {
	background-color: #27ae60;
	cursor: default;
}

.gen-badge {
	font-size: 0.8em;
	padding: 3px 8px;
	border-radius: 4px;
	margin-top: 8px;
	text-align: center;
	font-weight: bold;
	display: inline-block;
	margin-right: 5px;
}

.gen-badge.yes {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.gen-badge.no {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.string-viability {
	margin-top: 10px;
	padding: 10px;
	border-radius: 5px;
	font-size: 0.9em;
	border: 1px solid;
}

.viability-ok {
	background-color: #d4edda;
	color: #155724;
	border-color: #c3e6cb;
}

.viability-warn {
	background-color: #fff3cd;
	color: #856404;
	border-color: #ffeeba;
}

.viability-fail {
	background-color: #f8d7da;
	color: #721c24;
	border-color: #f5c6cb;
}

.protections-cabling-output-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-top: 15px;
}

.protection-card {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
}

.protection-card h5 {
	margin-top: 0;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ecf0f1;
	color: #34495e;
	font-size: 1.15em;
	display: flex;
	align-items: center;
}

.protection-card h5 span {
	margin-right: 10px;
}

.protection-item {
	margin-bottom: 12px;
	font-size: 0.95em;
}

.protection-item strong {
	display: block;
	color: #0056b3;
	margin-bottom: 3px;
}

.protection-item .value {
	font-weight: bold;
	background-color: #ecf0f1;
	padding: 3px 6px;
	border-radius: 4px;
	display: inline-block;
}

.protection-item .comment {
	font-style: italic;
	font-size: 0.9em;
	color: #7f8c8d;
	margin-top: 5px;
}

.recipe-box {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 15px;
	margin-top: 25px;
}

.recipe-box summary {
	font-weight: 700;
	color: #0056b3;
	cursor: pointer;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	font-size: 1.1em;
}

.recipe-box summary::before {
	content: "▶";
	margin-right: 8px;
	transition: transform 0.3s;
}

.recipe-box[open] summary::before {
	transform: rotate(90deg);
}

.recipe-box p {
	margin: 10px 0;
}

.recipe-box ul {
	padding-left: 20px;
}

.recipe-box li {
	margin-bottom: 5px;
}

.recipe-box .formula {
	font-family: monospace;
	background-color: #e9ecef;
	padding: 8px;
	border-radius: 4px;
	margin-top: 10px;
	font-size: 0.95em;
	color: #495057;
	word-wrap: break-word;
}

.recipe-box .formula .value {
	color: #c7254e;
	font-weight: bold;
}

#voltage-recommendation-box {
	display: none;
	margin-top: 20px;
	padding: 15px;
	border-radius: 8px;
	border-left: 5px solid #17a2b8;
	background-color: #e7f3ff;
}

#voltage-recommendation-box h5 {
	margin-top: 0;
	color: #0056b3;
	font-size: 1.2em;
	display: flex;
	align-items: center;
}

#voltage-recommendation-box h5 span {
	margin-right: 10px;
	font-size: 1.5em;
}

#voltage-recommendation-box p {
	margin: 5px 0 0 0;
	color: #34495e;
}

.status-ok {
	color: #27ae60;
	font-weight: bold;
}

.status-warn {
	color: #f0ad4e;
	font-weight: bold;
}

.status-fail {
	color: #c0392b;
	font-weight: bold;
}

#viability-table td {
	text-align: center;
}

#daily-summary-table {
	width: 100%;
	margin-top: 25px;
	border-collapse: collapse;
}

#daily-summary-table th,
#daily-summary-table td {
	padding: 12px;
	border: 1px solid #dee2e6;
	text-align: left;
}

#daily-summary-table th {
	background-color: #ecf0f1;
	font-weight: 600;
}

#daily-summary-table td {
	background-color: #fff;
	font-weight: bold;
}

#daily-summary-table .label-col {
	width: 60%;
}

.period-buttons {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	justify-content: center;
}

.period-button {
	padding: 8px 16px;
	font-size: 0.9em;
	background-color: #ecf0f1;
	color: #2c3e50;
	border: 1px solid #bdc3c7;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.period-button:hover {
	background-color: #d6dbdf;
}

.period-button.active {
	background-color: #3498db;
	color: white;
	border-color: #3498db;
}

#hsp-inputs {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 20px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
}

#hsp-inputs div {
	display: flex;
	flex-direction: column;
}

#hsp-inputs label {
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 0.9em;
}

#hsp-inputs input {
	width: 100%;
	padding: 8px;
	margin-top: 0;
}

#seasonal-load-recommendation {
	display: none;
	margin-top: 20px;
	background-color: #e7f3ff;
	border-left: 5px solid #0056b3;
	padding: 15px;
	border-radius: 4px;
}

#seasonal-load-recommendation h5 {
	margin-top: 0;
	color: #0056b3;
}

#autonomy-summary-text {
	font-weight: bold;
	text-align: center;
	margin-bottom: 10px;
	background-color: #f8f9fa;
	padding: 10px;
	border-radius: 5px;
}

/* ========================================
   COMPONENT COMPATIBILITY ALERTS
   ======================================== */

#compatibilityAlerts {
	display: none;
	margin: 20px 0;
}

.compatibility-alert {
	display: flex;
	align-items: flex-start;
	padding: 16px;
	margin-bottom: 12px;
	border-radius: 8px;
	border-left: 4px solid;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-5px);
		max-height: 0;
	}

	to {
		opacity: 1;
		transform: translateY(0);
		max-height: 500px;
	}
}

.compatibility-alert.error {
	background-color: #ffebee;
	border-left-color: #d32f2f;
}

.compatibility-alert.warning {
	background-color: #fff3e0;
	border-left-color: #f57c00;
}

.compatibility-alert.info {
	background-color: #e3f2fd;
	border-left-color: #1976d2;
}

.compatibility-alert.success {
	background-color: #e8f5e9;
	border-left-color: #388e3c;
}

.compatibility-alert .alert-icon {
	font-size: 24px;
	margin-right: 12px;
	flex-shrink: 0;
	line-height: 1;
}

.compatibility-alert .alert-content {
	flex: 1;
}

.compatibility-alert .alert-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.compatibility-alert .alert-header strong {
	color: #333;
	font-size: 15px;
}

.compatibility-alert .alert-code {
	font-size: 11px;
	background-color: rgba(0, 0, 0, 0.1);
	padding: 2px 8px;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	color: #666;
}

.compatibility-alert .alert-body {
	color: #555;
	font-size: 14px;
	line-height: 1.6;
}

.compatibility-alert .alert-body p {
	margin: 6px 0;
}

.compatibility-alert .alert-body strong {
	color: #333;
}

.compatibility-alert .alert-details {
	margin-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	padding-top: 8px;
}

.compatibility-alert .alert-details summary {
	cursor: pointer;
	font-size: 13px;
	color: #666;
	user-select: none;
	padding: 4px 0;
}

.compatibility-alert .alert-details summary:hover {
	color: #333;
}

.compatibility-alert .alert-details pre {
	background-color: rgba(0, 0, 0, 0.05);
	padding: 8px;
	border-radius: 4px;
	overflow-x: auto;
	font-size: 12px;
	margin: 8px 0 0 0;
	max-height: 200px;
	overflow-y: auto;
}

/* Recommendations List */
.recommendations-list {
	margin-top: 12px;
}

.recommendation-item {
	padding: 12px;
	background-color: rgba(255, 255, 255, 0.6);
	border-radius: 6px;
	margin-bottom: 8px;
}

.recommendation-item:last-child {
	margin-bottom: 0;
}

.recommendation-item strong {
	display: block;
	color: #1976d2;
	margin-bottom: 6px;
}

.recommendation-item p {
	margin: 6px 0;
	color: #555;
	font-size: 14px;
}

.recommendation-item ul {
	margin: 8px 0 0 20px;
	padding: 0;
}

.recommendation-item li {
	color: #555;
	font-size: 13px;
	margin: 4px 0;
}

/* Compatibility Badge */
.compatibility-badge {
	display: none;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-left: 12px;
	transition: all 0.3s ease;
}

.compatibility-badge:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

.compatibility-badge.compatible {
	background-color: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.compatibility-badge.incompatible {
	background-color: #ffebee;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

.compatibility-badge .badge-icon {
	font-size: 16px;
	line-height: 1;
}

.compatibility-badge .badge-text {
	font-weight: 600;
}

.compatibility-badge .badge-score {
	font-size: 11px;
	background-color: rgba(0, 0, 0, 0.1);
	padding: 2px 6px;
	border-radius: 10px;
	font-weight: 700;
}

/* Grid Connection Iframe Styling */
.grid-iframe {
	width: 100%;
	height: 85vh;
	/* Adjust to fit the content area */
	border: none;
	display: block;
}

/* --- Grid Connection Mode Layout Adjustments --- */
body.mode-gridConnected .main-header {
	display: none !important;
}

body.mode-gridConnected .content-area {
	padding: 0 !important;
	position: relative;
	height: 100vh;
	overflow: visible;
	/* Allow iframe to handle scrolling without parent clipping */
}

body.mode-gridConnected #tabGridCalculator,
body.mode-gridConnected #tabGridSummary,
body.mode-gridConnected #tabGridDimensioning {
	position: absolute !important;
	top: 0 !important;
	left: 260px !important;
	width: calc(100% - 260px) !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	z-index: 5;
	background: white;
	box-sizing: border-box;
	/* Prevent width overflow */
}

body.mode-gridConnected .container {
	max-width: 100% !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}


/* Force removal of all spacing for Grid Mode containers */
body.mode-gridConnected .tab-content {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

/* Ensure no other element interferes */
body.mode-gridConnected #modeReminderBadge {
	display: none !important;
}