/* AMTake image tools — shared UI (light-styled; theme inverts for dark mode). */
.aimg-tool { max-width: 760px; margin: 0 auto; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2937; }
.aimg-drop { position: relative; border: 2px dashed #94a3b8; border-radius: 14px; background: #f7f9fc; padding: 38px 20px; text-align: center; cursor: pointer; transition: all .2s ease; }
.aimg-drop:hover, .aimg-drop.over { border-color: #7c3aed; background: #f3efff; }
.aimg-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.aimg-drop p { margin: 8px 0 0; color: #4b5563; } .aimg-drop strong { color: #1f2937; }
/* Two-pane preview: Original (input) beside Result (output). */
.aimg-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.aimg-previews-single { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
.aimg-pane { margin: 0; text-align: center; }
.aimg-pane figcaption { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.aimg-frame { position: relative; height: 240px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid #e6eaf1; overflow: hidden;
    background: repeating-conic-gradient(#eef1f6 0% 25%, #ffffff 0% 50%) 50% / 18px 18px; }
.aimg-frame img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.aimg-empty { position: absolute; color: #9aa4b2; font-size: 13px; padding: 0 10px; }
.aimg-dim { display: block; margin-top: 6px; font-size: 12.5px; color: #6b7280; }
@media (max-width: 560px) { .aimg-previews { grid-template-columns: 1fr; } .aimg-frame { height: 200px; } }
.aimg-file { text-align: center; font-size: 13.5px; color: #6b7280; margin-bottom: 14px; }
.aimg-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.aimg-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.aimg-field select, .aimg-field input[type=number] { padding: 10px 12px; font-size: 15px; color: #111827; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; }
.aimg-field input[type=range] { width: 100%; }
.aimg-qv { font-weight: 500; color: #7c3aed; font-size: 13px; }
.aimg-actions { display: flex; gap: 10px; }
.aimg-run { border: 0; border-radius: 10px; padding: 12px 24px; font-size: 15px; font-weight: 600; cursor: pointer; background: linear-gradient(135deg,#7c3aed,#2e6bf0); color: #fff; }
.aimg-reset { border: 1px solid #cbd5e1; background: #eef2f9; color: #374151; border-radius: 10px; padding: 12px 20px; font-size: 15px; font-weight: 600; cursor: pointer; }
.aimg-dl { display: inline-flex; align-items: center; margin-top: 16px; padding: 12px 24px; border-radius: 10px; background: linear-gradient(135deg,#10b981,#047857); color: #fff; font-weight: 600; text-decoration: none; }
.aimg-status { font-size: 13.5px; color: #4b5563; margin-top: 12px; min-height: 18px; }
.aimg-b64 { width: 100%; box-sizing: border-box; min-height: 120px; margin-top: 14px; padding: 12px; font-size: 12px; font-family: monospace; color: #111827; background: #f7f9fc; border: 1px solid #cbd5e1; border-radius: 10px; resize: vertical; }
.aimg-copy { margin-top: 10px; border: 1px solid #cbd5e1; background: #fff; color: #374151; border-radius: 9px; padding: 9px 16px; font-size: 14px; font-weight: 500; cursor: pointer; }

/* ---- Resize presets (social media & web) ---- */
.aimg-presets { margin: 4px 0 18px; }
.aimg-presets-title { font-size: 12px; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.aimg-presets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 12px; }
.aimg-pgroup { border: 1px solid #e6eaf1; border-radius: 12px; padding: 12px; background: #fbfcfe; }
.aimg-plat { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }
.aimg-plat svg { flex: none; }
.pf-facebook svg { color: #1877f2; }
.pf-instagram svg { color: #e1306c; }
.pf-x svg { color: #0f1419; }
.pf-linkedin svg { color: #0a66c2; }
.pf-youtube svg { color: #ff0000; }
.pf-web svg { color: #7c3aed; }
.aimg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aimg-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid #cbd5e1; background: #fff; border-radius: 9px; padding: 7px 11px; cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease; }
.aimg-preset b { font-size: 13px; font-weight: 600; color: #1f2937; }
.aimg-preset em { font-size: 11px; font-style: normal; color: #6b7280; }
.aimg-preset:hover { border-color: #7c3aed; background: #f3efff; }
.aimg-preset.is-active { border-color: #7c3aed; background: #7c3aed; }
.aimg-preset.is-active b, .aimg-preset.is-active em { color: #fff; }
