/*
DEVICE TOOLS CSS - TABLE OF CONTENTS
1. Shared page and form components line 10 / updated: 2026-10-15
2. Homepage and review tool links  line 28 / updated: 2026-10-15
3. Comparison results             line 37 / updated: 2026-10-15
4. Battery results                line 67 / updated: 2026-10-15
5. Responsive layouts             line 78 / updated: 2026-10-15
*/

/* 1. Shared page and form components */
.device-tool-page { max-width: 1160px; padding: 38px 20px 64px; }
.device-tool-intro { max-width: 800px; margin-bottom: 26px; }
.device-tool-intro h1 { margin: 6px 0 12px; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.device-tool-intro > p { line-height: 1.7; }
.device-tool-eyebrow { color: var(--accent-color, #087ea4); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.device-tool-notice { color: var(--default-color, #495567); font-size: .9rem; padding: 12px 16px; background: var(--surface-color, #f5f8fa); border-left: 3px solid var(--accent-color, #087ea4); border-radius: 4px; }
.device-tool-panel { margin: 24px 0; padding: 22px; background: var(--surface-color, #fff); border: 1px solid rgba(128,128,128,.25); border-radius: 12px; }
.device-tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.device-tool-field { min-width: 0; }
.device-tool-field > label { display: block; font-weight: 700; margin-bottom: 8px; }
.device-tool-control { width: 100%; min-width: 0; padding: 11px 12px; color: var(--default-color, #243247); background: var(--background-color, #fff); border: 1px solid rgba(128,128,128,.4); border-radius: 7px; }
.device-tool-control--search { margin-bottom: 8px; }
.device-tool-control:focus { outline: 2px solid var(--accent-color, #087ea4); outline-offset: 2px; }
.device-tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.device-tool-errors { color: #b42318; padding-top: 8px; }
.device-tool-errors ul { margin: 0; padding-left: 18px; }

/* 2. Homepage and review tool links */
.home-device-tool { display: flex; gap: 20px; height: 100%; padding: 28px; border: 1px solid rgba(128,128,128,.25); border-radius: 12px; background: var(--surface-color, #fff); color: var(--default-color, #243247); }
.home-device-tool:hover { border-color: var(--accent-color, #087ea4); }
.home-device-tool:focus-visible { outline: 2px solid var(--accent-color, #087ea4); outline-offset: 3px; }
.home-device-tool > svg { flex-shrink: 0; }
.home-device-tool > div { min-width: 0; }
.home-device-tool h3 { font-size: 1.3rem; margin-bottom: 10px; }
.home-device-tool p { margin: 0; line-height: 1.65; }

/* 3. Comparison results */
.comparison-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.comparison-scroll { overflow-x: auto; }
.comparison-content { min-width: 580px; border: 1px solid rgba(128,128,128,.25); border-radius: 12px; overflow: hidden; background: var(--surface-color, #fff); }
.comparison-model-heading { padding: 24px; border-bottom: 1px solid rgba(128,128,128,.25); }
.comparison-model-heading + .comparison-model-heading, .comparison-cell + .comparison-cell { border-left: 1px solid rgba(128,128,128,.25); }
.comparison-model-heading h2 { font-size: 1.3rem; margin: 7px 0 10px; overflow-wrap: anywhere; }
.comparison-model-heading p { margin: 0; color: var(--default-color, #64748b); }
.comparison-cell { padding: 22px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.comparison-hero-image { width: 100%; height: 190px; object-fit: cover; }
.comparison-image-link { display: block; padding: 10px; background: #fff; border-radius: 8px; }
.comparison-image-link:focus-visible { outline: 3px solid var(--accent-color, #087ea4); outline-offset: 3px; }
.comparison-section > h2 { font-size: 1.2rem; margin: 0; padding: 18px 22px; background: var(--background-color, #f4f7fa); border-top: 1px solid rgba(128,128,128,.25); border-bottom: 1px solid rgba(128,128,128,.25); }
.comparison-group-title { font-size: .94rem; margin: 0; padding: 12px 22px; border-bottom: 1px solid rgba(128,128,128,.2); color: var(--default-color, #445267); }
.comparison-media-row { border-bottom: 1px solid rgba(128,128,128,.2); }
.comparison-media-item { margin: 0 0 18px; }
.comparison-media-item:last-child { margin-bottom: 0; }
.comparison-part-image { width: 100%; max-height: 380px; object-fit: contain; }
.comparison-media-item figcaption { padding: 10px 0 0; line-height: 1.65; }
.comparison-description summary { cursor: pointer; font-weight: 600; }
.comparison-description p { margin-top: 14px; line-height: 1.75; }
.comparison-empty { color: var(--default-color, #64748b); opacity: .75; font-size: .9rem; line-height: 1.6; }
.comparison-start { padding: 36px 24px; text-align: center; }
.comparison-start h2 { font-size: 1.3rem; }
.comparison-characteristics { table-layout: fixed; width: 100%; border-collapse: collapse; }
.comparison-characteristics th { width: 24%; font-weight: 500; font-size: .85rem; }
.comparison-characteristics td { width: 38%; border-left: 1px solid rgba(128,128,128,.18); }
.comparison-characteristics th, .comparison-characteristics td { padding: 12px 16px; text-align: left; vertical-align: top; overflow-wrap: anywhere; border-bottom: 1px solid rgba(128,128,128,.18); }
.comparison-characteristics tr:nth-child(even) { background: var(--background-color, #f7f9fb); }

/* 4. Battery results */
.battery-finder-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }
.battery-finder-result > div { min-width: 0; }
.battery-finder-result figure { margin: 0; }
.battery-finder-result img { width: 100%; max-height: 440px; object-fit: contain; background: #fff; border-radius: 8px; }
.battery-finder-result figcaption { padding-top: 12px; font-size: .9rem; }
.battery-finder-result h2 { overflow-wrap: anywhere; }
.battery-finder-result h3 { font-size: 1.2rem; margin-top: 26px; }
.battery-model-links { padding-left: 20px; }
.battery-model-links li { padding: 6px 0; }

/* 5. Responsive layouts */
@media (max-width: 640px) {
    .device-tool-page { padding: 25px 12px 40px; }
    .device-tool-panel { padding: 15px 12px; }
    .device-tool-fields { gap: 12px; }
    .device-tool-field > label { font-size: .9rem; }
    .device-tool-control { padding: 10px 7px; font-size: .88rem; }
    .comparison-model-heading, .comparison-cell { padding: 16px; }
    .comparison-scroll { padding-bottom: 10px; }
}
@media (max-width: 575px) {
    .device-tool-fields--stack, .battery-finder-result { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .home-device-tool { padding: 20px; gap: 16px; }
}
