/* MotionGIF — Combine GIFs page styles.
   Loaded after site.css; uses the same design tokens. All classes
   are prefixed mgcb- so nothing collides with the shared stylesheet. */

.mgcb-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 18px;
  text-align: center;
  margin-top: 20px;
}
.mgcb-dropzone.mgcb-over { border-color: var(--accent); background: var(--accent-soft); }
.mgcb-dropzone p { margin: 6px auto; color: var(--muted); }
.mgcb-dropzone .mgcb-big { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 auto; }
.mgcb-file-input { display: none; }

/* The loaded GIFs */
.mgcb-list { display: grid; gap: 10px; margin: 4px 0 10px; }
.mgcb-item {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: var(--surface);
}
.mgcb-thumb {
  flex: none; width: 96px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.mgcb-thumb canvas { max-width: 100%; height: auto; }
.mgcb-item-info { flex: 1 1 160px; min-width: 0; }
.mgcb-item-name { font-weight: 700; margin: 0; word-break: break-all; }
.mgcb-item-facts { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.mgcb-item-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.mgcb-item-btns button {
  min-height: 36px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--accent-dark); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.mgcb-item-btns button:hover { border-color: var(--accent); }
.mgcb-item-btns button[disabled] { opacity: 0.45; cursor: not-allowed; }
.mgcb-list-note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Setting groups */
.mgcb-fieldset { border: 0; padding: 0; margin: 18px 0 8px; }
.mgcb-fieldset legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }
.mgcb-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.mgcb-opt-btn {
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.mgcb-opt-btn[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.mgcb-num, .mgcb-select {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-family: inherit;
}

.mgcb-error { color: #b91c1c; font-size: 14px; margin: 10px 0 0; }
.mgcb-readout {
  border-radius: var(--radius); padding: 12px 16px; margin: 16px 0 0;
  font-size: 15px; border: 1px solid #a7f3d0; background: #ecfdf5;
}
.mgcb-readout p { margin: 4px 0; }
.mgcb-readout:empty { display: none; }

.mgcb-limits {
  font-size: 14px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 10px 14px; margin-top: 16px;
}
.mgcb-limits p { margin: 4px 0; }
.mgcb-limits strong { color: var(--ink); }

@media (max-width: 560px) {
  .mgcb-item { flex-wrap: wrap; }
  .mgcb-item-btns { flex-direction: row; }
}
