/* ==========================================================================
   composer.css - Composer tabs, mode panels, textareas
   Dooze Clip Generator
   ========================================================================== */

/* Tab bar: tanpa garis pemisah, cukup ritme ruang. */
.vids-composer-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.15rem;
}

.vids-tabs-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.vids-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  border: 0 !important;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--duration-fast, 150ms) var(--ease-gemini), transform var(--duration-fast, 150ms) var(--ease-gemini), color 150ms ease;
  user-select: none;
}

.vids-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.vids-tab:active {
  transform: scale(0.96);
}

.vids-tab.active {
  background: rgba(168, 199, 250, 0.16);
  color: var(--accent);
}

.vids-tab-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  stroke-width: var(--icon-stroke, 1.8px);
}

.vids-tab.active .vids-tab-icon {
  filter: drop-shadow(0 0 6px rgba(168, 199, 250, 0.35));
}

.vids-btn-collapse {
  background: transparent;
  border: 0;
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 150ms ease, color 150ms ease, transform 200ms ease;
}

.vids-btn-collapse:hover {
  color: var(--text-primary);
  background: var(--surface-soft);
}

.vids-btn-collapse.is-collapsed {
  transform: rotate(180deg);
}

/* Sub-mode: segmented control halus tonal */
.vids-sub-toggle-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
  margin-bottom: 4px;
  border: 0 !important;
}

.vids-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 0 !important;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 140ms ease;
}

.vids-sub-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.vids-sub-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
}

.vids-sub-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.mode-panel-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.panel {
  background: var(--surface, #1e1f20);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-panel, 28px);
  padding: 1.15rem 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), var(--highlight-top);
  transition: all 180ms ease-out;
}

.panel:focus-within {
  border-color: rgba(168, 199, 250, 0.42);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(168, 199, 250, 0.15);
}

.panel textarea {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: none;
  min-height: 56px;
  max-height: 240px;
  overflow-y: auto;
}

.panel textarea::placeholder {
  color: var(--text-tertiary);
  opacity: 0.85;
}

/* Kerangka upload yang dipakai di semua mode. */
.upload-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.upload-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.upload-desc {
  display: block;
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ==========================================================================
   Dashed Ingredients Slots (Gaya Resmi Google Vids)
   ========================================================================== */
.vids-ingredients-grid {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.vids-dashed-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(168, 199, 250, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 150ms ease;
  position: relative;
  overflow: hidden;
  height: 74px;
}

.vids-dashed-slot:hover {
  border-color: rgba(168, 199, 250, 0.85);
  background: rgba(168, 199, 250, 0.06);
}

.vids-slot-avatar {
  width: 104px;
  flex-shrink: 0;
}

.vids-slot-bahan {
  flex: 1;
  min-width: 0;
}

.vids-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--accent, #a8c7fa);
  user-select: none;
}

.vids-slot-content-bahan {
  flex-direction: row;
  gap: 10px;
}

.vids-slot-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.vids-slot-sublabel {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary, #8e918f);
  letter-spacing: 0;
}

.vids-slot-content svg {
  stroke: var(--accent, #a8c7fa);
  color: var(--accent, #a8c7fa);
  flex-shrink: 0;
}

.vids-slot-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent, #a8c7fa);
  letter-spacing: -0.01em;
}

.vids-slot-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 6px 10px;
  box-sizing: border-box;
}

.vids-slot-preview-multi {
  gap: 10px;
}

.vids-multi-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vids-mini-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
}

.vids-slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.vids-slot-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent, #a8c7fa);
  background: rgba(168, 199, 250, 0.15);
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.vids-slot-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.vids-slot-avatar .vids-slot-thumb {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.vids-slot-name {
  font-size: 12px;
  color: var(--text-primary);
  max-width: calc(100% - 25px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vids-slot-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 150ms ease;
  z-index: 2;
}

.vids-slot-clear:hover {
  background: rgba(220, 53, 69, 0.9);
}

/* ==========================================================================
   Mention Chips, @ Autocomplete Popup & Mode Edit Reference Strip
   ========================================================================== */
.vids-prompt-wrap {
  position: relative;
  width: 100%;
}

.vids-mention-popup {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  max-width: min(340px, 100%);
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface-elevated, #282a2c);
  border: 1px solid rgba(168, 199, 250, 0.28);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vids-mention-popup[hidden] {
  display: none;
}

.vids-mention-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-inline-size: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.vids-mention-option:hover,
.vids-mention-option.is-active {
  background: rgba(168, 199, 250, 0.16);
}

.vids-mention-option-thumb {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.vids-mention-option-tag {
  font-weight: 600;
  color: var(--accent, #a8c7fa);
  flex-shrink: 0;
}

.vids-mention-option-name {
  min-inline-size: 0;
  flex: 1;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vids-mention-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.vids-mention-chip-row[hidden] {
  display: none;
}

.vids-mention-bar-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-right: 2px;
}

.vids-mention-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(168, 199, 250, 0.3);
  border-radius: 999px;
  background: rgba(168, 199, 250, 0.12);
  color: var(--accent, #a8c7fa);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.vids-mention-badge:hover {
  background: rgba(168, 199, 250, 0.24);
  border-color: rgba(168, 199, 250, 0.65);
}

.vids-mention-badge:focus-visible {
  outline: 2px solid var(--accent, #a8c7fa);
  outline-offset: 2px;
}

.vids-mention-badge-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.vids-edit-media-strip {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.vids-edit-video-box {
  flex: 1 1 210px;
  min-inline-size: 0;
  min-height: 78px;
  padding: 8px 10px;
  justify-content: flex-start;
  text-align: left;
  border-radius: 12px;
}

.vids-edit-video-preview {
  width: 100%;
  min-inline-size: 0;
  gap: 10px;
}

.vids-edit-video-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: #0d0e0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.vids-edit-video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-inline-size: 0;
  flex: 1;
}

.vids-edit-video-meta .upload-file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vids-video-dur-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent, #a8c7fa);
  background: rgba(168, 199, 250, 0.12);
  border-radius: 999px;
  padding: 1px 7px;
}

.vids-video-dur-badge.is-trimmed {
  color: #fdd663;
  background: rgba(253, 214, 99, 0.14);
}

.vids-edit-ref-cards {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}

.vids-ref-tile {
  position: relative;
  width: 82px;
  height: 78px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.vids-ref-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vids-ref-tile .vids-mention-badge {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  justify-content: center;
  padding: 2px 5px;
  font-size: 10.5px;
  background: rgba(19, 19, 20, 0.84);
  backdrop-filter: blur(4px);
}

.vids-tile-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color 140ms ease;
}

.vids-tile-remove:hover {
  background: rgba(220, 53, 69, 0.92);
}

.vids-add-ref-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 86px;
  height: 78px;
  padding: 6px 10px;
  border: 1.5px dashed rgba(168, 199, 250, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent, #a8c7fa);
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.vids-add-ref-tile:not(:disabled):hover {
  border-color: rgba(168, 199, 250, 0.85);
  background: rgba(168, 199, 250, 0.08);
}

.vids-add-ref-tile:disabled {
  opacity: 0.45;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.vids-add-ref-label {
  font-size: 11.5px;
  font-weight: 500;
}

.vids-add-ref-count {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.vids-ref-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.35;
}

.vids-inline-notice {
  font-size: 12px;
  line-height: 1.4;
  color: #fdd663;
  background: rgba(253, 214, 99, 0.1);
  border: 1px solid rgba(253, 214, 99, 0.25);
  border-radius: 10px;
  padding: 6px 10px;
}

.vids-inline-notice[hidden] {
  display: none;
}

.vids-chip.is-mode-disabled {
  opacity: 0.45;
}
