/**
 * Criar GIF — filmstrip + frame props on the media-timeline shell.
 * Load after media-studio-shell.css. Do not re-fork shell chrome here.
 */

body.is-fullscreen .fs-workspace.mstudio-fs.gifmk-fs {
  --ms-timeline-h: 148px;
}

@media (max-width: 960px) {
  .gifmk-app .mstudio-body.is-2col {
    grid-template-rows: minmax(220px, 36vh) auto;
  }
  .gifmk-app .mstudio-stage {
    order: -1;
  }
  .gifmk-app .mstudio-panel--left {
    max-height: none;
  }
}

.gifmk-app .mstudio-field {
  margin-bottom: 8px;
}

.gifmk-app .mstudio-fields {
  margin-bottom: 4px;
}

.gifmk-app .mstudio-field input[type="range"] {
  padding: 6px 0;
  accent-color: var(--ms-accent);
}

.gifmk-sel-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ms-text);
  word-break: break-word;
}

.gifmk-sel-meta {
  font-size: 0.72rem;
  color: var(--ms-faint);
  margin: -4px 0 6px;
}

.gifmk-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 4px;
  min-height: 108px;
}

.gifmk-add,
.gifmk-thumb {
  flex: 0 0 auto;
  width: 88px;
  border-radius: 10px;
  border: 1px solid var(--ms-line);
  background: var(--ms-item);
  cursor: pointer;
  overflow: hidden;
}

.gifmk-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 100px;
  color: var(--ms-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.gifmk-add:hover {
  border-color: var(--ms-accent);
  color: var(--ms-accent);
  background: rgba(250, 91, 15, 0.08);
}

.gifmk-add span {
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
}

.gifmk-thumb {
  position: relative;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}

.gifmk-thumb img {
  display: block;
  width: 88px;
  height: 64px;
  object-fit: cover;
  background: #0b1220;
}

.gifmk-thumb-meta {
  display: block;
  padding: 4px 6px 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ms-faint);
  font-variant-numeric: tabular-nums;
}

.gifmk-thumb.is-selected {
  border-color: var(--ms-accent);
  box-shadow: 0 0 0 2px rgba(250, 91, 15, 0.35);
}

.gifmk-thumb.is-dragging {
  opacity: 0.45;
}

.gifmk-thumb-idx {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gifmk-progress {
  padding: 0 12px 8px;
}

.gifmk-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.gifmk-preview-img[hidden] {
  display: none;
}
