/* tools/battery/battery.css */
:root {
    --primary-color: #059669;
    --bg-color: #f0fdf4;
}

/* Scoped container to avoid conflicting with main site if possible, 
   though page is standalone enough. */
.battery-calculator-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* max-width: 480px; Removed for full width */
    margin: 0 auto;
    /* Center horizontally */
}

.battery-calculator-container h2 {
    color: #064e3b;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2.6rem;
    font-weight: 800;
}

.battery-calculator-container .form-group {
    margin-bottom: 1.2rem;
}

.battery-calculator-container label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.battery-calculator-container input,
.battery-calculator-container select {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border 0.2s;
}

.battery-calculator-container input:focus,
.battery-calculator-container select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.battery-calculator-container .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Custom button style to match requested look, differing from bootstrap default */
.btn-battery-calc {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-battery-calc:hover {
    background-color: #047857;
    color: white;
}

#result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.highlight {
    font-size: 1.8rem;
    font-weight: 800;
    color: #059669;
    margin: 0.5rem 0;
}

.info-text {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Battery Diagram Styles */
.battery-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    overflow-x: auto;
}

.diagram-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
}

.series-string {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
}

.series-string:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.battery-cell {
    width: 30px;
    height: 45px;
    background: linear-gradient(to bottom, #e2e8f0 10%, #fff 10%, #fff 90%, #e2e8f0 90%);
    border: 2px solid #64748b;
    border-radius: 3px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.battery-cell::before {
    content: '+';
    font-size: 10px;
    color: #ef4444;
    position: absolute;
    top: -2px;
}

.battery-cell::after {
    content: '-';
    font-size: 12px;
    color: #3b82f6;
    position: absolute;
    bottom: -1px;
}

.connection-line {
    width: 10px;
    height: 2px;
    background: #94a3b8;
}

.parallel-connector {
    width: 2px;
    background: #94a3b8;
    height: 100%;
    position: absolute;
}

/* Explanation Box */
.explanation-box {
    background-color: #f9fafb;
    /* border-left: 4px solid var(--primary-color); Removed as per user request */
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.explanation-box h5 {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.explanation-box strong {
    color: #111827;
}

.explanation-box ul {
    padding-left: 0;
}

.explanation-box li {
    line-height: 1.5;
}