/* Battery estimator — aligned with GeneralConfig / packetDecoder spacing */

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    margin: 10px;
    margin-left: 192px;
    color: #000;
}

header {
    text-align: left;
    margin-bottom: 12px;
}

.logo {
    width: 170px;
    height: auto;
}

.title {
    font-size: 18px;
    margin: 4px 0;
}

.subtitle {
    font-size: 17px;
    margin: 0 0 6px 0;
    color: #333;
    max-width: 900px;
}

.subtitle-note {
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 14px 0;
    color: #333;
    max-width: 900px;
    font-style: italic;
}

.note {
    font-size: 13px;
    color: #555;
    max-width: 900px;
    margin-bottom: 16px;
}

.battery-form {
    max-width: 640px;
}

.battery-actions {
    margin: 16px 0 12px 0;
    max-width: 640px;
}

.calculate-button {
    padding: 8px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.calculate-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.battery-form fieldset {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.battery-form legend {
    font-weight: bold;
    padding: 0 6px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 100px 140px;
    gap: 8px 12px;
    align-items: center;
}

.form-grid label {
    font-weight: normal;
}

.label-with-help {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.battery-form .help-button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    padding: 0;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    width: 340px;
    max-width: 90%;
    text-align: left;
    font-size: 14px;
}

.form-grid input[type="number"],
.form-grid select {
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-grid .span-3 {
    grid-column: 1 / -1;
}

.outputs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 6px;
    max-width: 640px;
}

.outputs div {
    min-width: 120px;
}

.outputs .label {
    font-size: 12px;
    color: #555;
}

.outputs .value {
    font-size: 20px;
    font-weight: bold;
    font-family: Consolas, "Courier New", monospace;
}

.output-years-wrap {
    min-width: 200px;
    max-width: 360px;
}

.years-shelf-life-note {
    font-size: 12px;
    font-weight: normal;
    font-family: Arial, sans-serif;
    color: #444;
    margin: 8px 0 0 0;
    line-height: 1.35;
}

.error {
    color: #a00;
    margin-top: 8px;
    max-width: 640px;
}

.nav-header {
    margin-top: 28px;
    margin-bottom: 10px;
}

.nav-header a {
    font-size: 14px;
}
