/* Add Image to GIF tool, page-specific styles.
   Prefixed mgai- to avoid collisions with the shared styles in
   site.css. The site tokens (steel blue #4a7fb5, white panels,
   soft borders) match every other tool page. */

.mgai-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mgai-over {
  border-color: #4a7fb5 !important;
  background: #eaf3fb !important;
}

.mgai-fname {
  font-weight: 700;
  word-break: break-all;
}

.mgai-layer {
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin: 0 0 12px;
  background: #fbfdff;
}
.mgai-layer.is-selected { border-color: #4a7fb5; }
.mgai-layer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mgai-layer-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mgai-mini {
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #33506e;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
}
.mgai-mini:hover { border-color: #4a7fb5; color: #4a7fb5; }
.mgai-remove { color: #b91c1c; }
.mgai-remove:hover { border-color: #b91c1c; color: #b91c1c; }
.mgai-layer-name {
  font-size: 13px;
  color: #33506e;
  margin: 2px 0 6px;
  word-break: break-all;
}

.mgai-num {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.mgai-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mgai-pair input[type="range"] { flex: 1; min-width: 0; }
.mgai-num-small { width: 76px; flex: 0 0 76px; }
.mgai-val { font-weight: 700; color: #4a7fb5; }

.mgai-fieldset {
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 0;
}
.mgai-fieldset legend {
  font-size: 13px;
  font-weight: 700;
  color: #33506e;
  padding: 0 4px;
}
.mgai-modes { display: flex; gap: 8px; margin-bottom: 10px; }
.mgai-mode-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #33506e;
  font-size: 14px;
  cursor: pointer;
}
.mgai-mode-btn[aria-pressed="true"] {
  background: #4a7fb5;
  border-color: #4a7fb5;
  color: #fff;
  font-weight: 700;
}

.mgai-error {
  color: #b91c1c;
  font-size: 13.5px;
  margin: 10px 0 0;
}
.mgai-warn { color: #b91c1c; }

.mgai-overlay-drop {
  border: 1.5px dashed #b9cbdd;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  color: #33506e;
  background: #f7fbff;
  margin-bottom: 12px;
}
.mgai-overlay-drop p { margin: 0 0 8px; font-size: 14px; }
