/* ImageConverter.html (js/image-converter.js); page layout classes come from css/resistor-values.css */
.rv-sub { max-width: 85ch; }   /* wider intro on this page only (78ch in resistor-values.css) */
.ic-card .rv-card-h { flex-wrap: wrap; }
.ic-private { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 700; color: #1e5a2a; background: #dff1e3; padding: 2px 10px; border-radius: 999px; }
.ic-step { font-size: 12px; font-weight: 700; color: var(--rv-soft); margin: 0 0 6px; }

/* format picker */
.ic-formats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.ic-formats button { font: 700 14px Roboto, Arial, sans-serif; min-width: 62px; padding: 8px 12px; border: 1.5px solid #434343; border-radius: 8px; background: #fff; color: var(--rv-ink); cursor: pointer; }
.ic-formats button:hover { background: var(--rv-tint); }
.ic-formats button[aria-checked=true] { background: #1d3f4b; color: #fff; }
.ic-formats button:focus-visible { outline: 3px solid #5fc7db; outline-offset: 1px; }
.ic-formats button.ic-nosupport { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.ic-fmtnote { font-size: 13px; color: var(--rv-soft); margin: 0 0 12px; min-height: 1.5em; line-height: 1.5; }

/* drop zone */
.ic-drop { border: 2.5px dashed #8a9ba1; border-radius: 12px; background: #f7fafb; padding: 26px 16px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.ic-drop:hover, body.ic-dragging .ic-drop { border-color: var(--rv-accent); background: var(--rv-tint); }
.ic-drop svg { width: 44px; height: 44px; color: var(--rv-accent); display: block; margin: 0 auto 8px; pointer-events: none; }
.ic-drop-text { font-size: 17px; color: var(--rv-ink); }
.ic-drop-text small { display: block; font-size: 13px; color: var(--rv-soft); margin-top: 8px; line-height: 1.5; }
body.ic-has-items .ic-drop { padding: 12px 16px; }
body.ic-has-items .ic-drop svg { display: none; }
body.ic-has-items .ic-drop-text small { display: none; }
body.ic-dragging::after { content: 'Drop to convert'; position: fixed; inset: 10px; z-index: 9999; border: 4px dashed #5fc7db; border-radius: 16px; background: rgba(29, 63, 75, .82); color: #fff; font: 800 30px Roboto, Arial, sans-serif; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.ic-btn { font: 700 13.5px Roboto, Arial, sans-serif; padding: 7px 14px; border: 1.5px solid #434343; border-radius: 8px; background: #fff; color: var(--rv-ink); cursor: pointer; white-space: nowrap; }
.ic-btn:hover { background: var(--rv-tint); }
.ic-btn:disabled { opacity: .45; cursor: default; }
.ic-primary { background: #1a6475; border-color: #1a6475; color: #fff; }
.ic-primary:hover { background: #15535f; }
.ic-big { font-size: 15px; padding: 9px 18px; }

/* options */
.ic-opts { margin: 14px 0 0; }
.ic-opts label { min-width: 0; }
.ic-opts .ic-inline { flex-direction: row; align-items: center; gap: 8px; }
.ic-opts input[type=range] { width: 170px; padding: 0; border: none; }
.ic-opts input[type=color] { width: 46px; height: 36px; padding: 2px; }
.ic-opts input[type=checkbox] { width: 18px; height: 18px; }
.ic-opts output { font-weight: 800; color: var(--rv-ink); min-width: 2ch; }
.ic-opts .rv-in input[type=number], .ic-opts input[type=number] { width: 100px; }
.ic-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 400; }
.ic-checks label { flex-direction: row; align-items: center; gap: 4px; font-weight: 400; color: var(--rv-ink); font-size: 14px; }
.ic-opts [hidden] { display: none !important; }

/* status bar and results */
.ic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 8px; padding: 10px 12px; border: 1px solid var(--rv-line); border-radius: 10px; background: #f4f7f8; }
.ic-bar[hidden] { display: none; }
.ic-status { flex: 1 1 220px; font-size: 14px; font-weight: 700; color: var(--rv-ink); }
.ic-list { list-style: none; margin: 0; padding: 0; }
.ic-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #e3eaec; }
.ic-thumb { width: 72px; height: 72px; border: 1px solid var(--rv-line); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; background: #fff; cursor: zoom-in; }
.ic-thumb img, .ic-thumb canvas { max-width: 100%; max-height: 100%; display: block; }
.ic-checker { background: repeating-conic-gradient(#e6ecee 0% 25%, #fff 0% 50%) 50% / 14px 14px; }
.ic-ph { font: 800 12px Roboto, Arial, sans-serif; color: var(--rv-soft); }
.ic-spin { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(26, 100, 117, .25); border-top-color: #1a6475; border-radius: 50%; animation: ic-spin .8s linear infinite; background: rgba(255, 255, 255, .7); }
@keyframes ic-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ic-spin { animation-duration: 3s; } }
.ic-name { font-weight: 700; font-size: 14.5px; color: var(--rv-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-meta { font-size: 13px; color: var(--rv-soft); line-height: 1.5; font-variant-numeric: tabular-nums; }
.ic-meta b { color: var(--rv-ink); }
.ic-arrow { color: var(--rv-accent); font-weight: 800; }
.ic-smaller { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #dff1e3; color: #1e5a2a; white-space: nowrap; }
.ic-larger { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef1f2; color: var(--rv-soft); white-space: nowrap; }
.ic-note { font-size: 12.5px; color: #8a5a00; line-height: 1.45; }
.ic-err { font-size: 13px; color: #a3312a; line-height: 1.45; }
.ic-error .ic-thumb { border-color: #e2b4b0; background: #fbf1f0; }
.ic-acts { display: flex; gap: 6px; align-items: center; }
.ic-x { width: 32px; height: 32px; border: none; border-radius: 50%; background: transparent; color: var(--rv-soft); font-size: 22px; line-height: 1; cursor: pointer; }
.ic-x:hover { background: #f3dcdc; color: #8a2a24; }

/* supported-formats table */
.ic-tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; background: #fff; }
.ic-tbl th, .ic-tbl td { border-bottom: 1px solid #e3eaec; padding: 7px 9px; text-align: left; vertical-align: top; }
.ic-tbl thead th { background: #1d3f4b; color: #fff; font-size: 12px; }
.ic-tbl tbody th { white-space: nowrap; color: var(--rv-ink); }
.ic-tbl tbody tr:nth-child(even) { background: #f4f8f9; }
.ic-tbl td.ic-y, .ic-tbl td.ic-n, .ic-tbl td.ic-p { white-space: nowrap; font-weight: 700; }
.ic-y { color: #1e5a2a; }
.ic-n { color: #8a2a24; }
.ic-p { color: #8a5a00; }

/* preview dialog */
.ic-dialog { border: 2px solid #434343; border-radius: 12px; padding: 0; width: min(1100px, 94vw); max-height: 92vh; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.ic-dialog::backdrop { background: rgba(10, 25, 30, .6); }
.ic-pv-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 2px solid #434343; background: #f4f7f8; }
.ic-pv-h span { flex: 1 1 200px; font-weight: 700; font-size: 14px; color: var(--rv-ink); overflow-wrap: anywhere; }
.ic-pv-b { padding: 12px; overflow: auto; max-height: calc(92vh - 64px); text-align: center; background: repeating-conic-gradient(#e6ecee 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.ic-pv-b img { max-width: 100%; max-height: calc(92vh - 100px); }
.ic-actual .ic-pv-b img { max-width: none; max-height: none; }
.ic-pv-b .ic-pv-small { max-width: 128px; display: block; margin: 0 auto 10px; }
.ic-pv-msg { font-size: 14.5px; background: #fff; display: inline-block; padding: 8px 14px; border-radius: 8px; }

@media (max-width: 600px) {
  .ic-row { grid-template-columns: 56px minmax(0, 1fr); }
  .ic-thumb { width: 56px; height: 56px; }
  .ic-acts { grid-column: 2; }
  .ic-formats button { min-width: 0; flex: 1 0 18%; padding: 8px 4px; }
  .ic-opts input[type=range] { width: 130px; }
}
