/* =============================================================================
   overnight-slot-subtitle.css — Per-slot subtitle configuration styles
   Add this to overnight.css or include separately
   ============================================================================= */

/* ── Slot subtitle config toggle ── */
.slot-subtitle-config {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.slot-subtitle-toggle {
  width: 100%;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  color: #f59e0b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.slot-subtitle-toggle:hover {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.25);
}

.slot-subtitle-chevron {
  transition: transform 0.2s;
  font-size: 0.7rem;
}

/* ── Slot subtitle editor panel ── */
.slot-subtitle-editor {
  margin-top: 0.75rem;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
}

/* ── Two-column layout: controls + phone preview ── */
.slot-sub-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 920px) {
  .slot-sub-layout {
    grid-template-columns: 1fr;
  }
  .slot-sub-preview {
    order: -1;
    margin: 0 auto;
  }
}

.slot-sub-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slot-sub-mini-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slot-sub-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.slot-sub-field {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.slot-sub-field label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #546180;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.slot-sub-field select,
.slot-sub-field input[type="range"] {
  background: #0d1017;
  border: 1px solid #1e2d45;
  color: #c7d2e8;
  padding: 0.45rem 0.75rem;
  border-radius: 30px;
  font-size: 0.78rem;
  width: 100%;
}

.slot-sub-field select:focus {
  outline: none;
  border-color: rgba(245,158,11,0.4);
}

.slot-sub-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 0.3rem;
  accent-color: #f59e0b;
}

/* ── Color picker ── */
.slot-sub-color-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0d1017;
  border: 1px solid #1e2d45;
  border-radius: 30px;
  padding: 0.3rem 0.75rem;
}

.slot-sub-color-picker input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.slot-sub-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.slot-sub-color-picker input[type="color"]::-webkit-color-swatch {
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}

.slot-sub-color-picker span {
  font-family: monospace;
  font-size: 0.75rem;
  color: #c7d2e8;
  letter-spacing: 0.05em;
}

/* ── Range slider value display ── */
.slot-sub-value {
  font-family: monospace;
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  margin-left: 0.5rem;
}

.slot-sub-field input[type="range"] {
  flex: 1;
  accent-color: #f59e0b;
  padding: 0;
}

/* ── Mode-specific panels ── */
.slot-sub-mode-panel {
  padding: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.slot-sub-mode-hint {
  font-size: 0.72rem;
  color: #8892A4;
  line-height: 1.5;
}

.slot-sub-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Color pool list ── */
.slot-sub-pool-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #0b1120;
}

.slot-sub-pool-list::-webkit-scrollbar {
  width: 4px;
}

.slot-sub-pool-list::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 4px;
}

.slot-sub-pool-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}

.slot-sub-pool-item:hover {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.2);
}

.slot-sub-pool-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  cursor: pointer;
}

.slot-sub-pool-hex {
  font-family: monospace;
  font-size: 0.75rem;
  color: #c7d2e8;
  flex: 1;
  letter-spacing: 0.05em;
}

.slot-sub-pool-picker-btn {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  color: #f59e0b;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.12s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-sub-pool-picker-btn:hover {
  background: rgba(245,158,11,0.2);
  border-color: rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

.slot-sub-pool-del {
  background: transparent;
  border: none;
  color: #546180;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.12s;
  flex-shrink: 0;
}

.slot-sub-pool-del:hover:not(:disabled) {
  color: #ef4444;
}

.slot-sub-pool-del:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slot-sub-pool-add {
  background: rgba(245,158,11,0.1);
  border: 1px dashed rgba(245,158,11,0.3);
  color: #f59e0b;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.slot-sub-pool-add:hover {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.5);
}

/* ── Preset color buttons ── */
.slot-sub-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.slot-sub-preset-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.13s;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8897b3;
}

.slot-sub-preset-btn:hover {
  border-color: currentColor;
  background: rgba(255,255,255,0.09);
  transform: translateY(-1px);
}

.slot-sub-preset-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ── Mix pattern controls ── */
.slot-sub-mix-pattern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.slot-sub-mix-label {
  font-size: 0.75rem;
  color: #8897b3;
}

.slot-sub-mix-input {
  width: 54px;
  background: #0d1017;
  border: 1px solid #1e2d45;
  color: #e8edf5;
  padding: 0.3rem 0.5rem;
  border-radius: 30px;
  font-size: 0.8rem;
  text-align: center;
}

.slot-sub-mix-input:focus {
  outline: none;
  border-color: rgba(245,158,11,0.4);
}

/* ── Pattern preview ── */
.slot-sub-pattern-preview {
  font-size: 0.7rem;
  color: #8897b3;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  line-height: 1.6;
  word-break: break-all;
}

/* ── Responsive adjustments ── */
@media (max-width: 640px) {
  .slot-sub-row {
    flex-direction: column;
  }
  
  .slot-sub-field {
    min-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHONE PREVIEW (Per-Slot)
   ═══════════════════════════════════════════════════════════════════════ */

.slot-sub-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* ── Phone shell ── */
.slot-preview-phone-shell {
  width: 175px;
  background: #0d1017;
  border-radius: 36px;
  border: 2px solid #1e2740;
  box-shadow:
    0 0 0 1px #0d1017,
    0 0 0 5px #0d1017,
    0 24px 48px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 10px 7px 9px;
  position: relative;
}

.slot-preview-phone-screen {
  background: #0d1017;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9/16;
  width: 100%;
}

/* ── Minecraft-style background ── */
.slot-preview-phone-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #0a1a08 0%,
    #152b10 25%,
    #1a3d18 50%,
    #0f2210 75%,
    #060d05 100%
  );
}

.slot-preview-phone-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(26,107,58,0.3) 0px,
    rgba(26,107,58,0.3) 14px,
    rgba(45,125,26,0.2) 14px,
    rgba(45,125,26,0.2) 28px
  );
}

.slot-preview-phone-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.5) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

/* ── Preview badge ── */
.slot-preview-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  z-index: 10;
  background: rgba(0,0,0,0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ── Subtitle area ── */
.slot-preview-subtitle {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 0 8px;
  text-align: center;
}

/* ── Disclaimer ── */
.slot-preview-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #60a5fa;
  text-align: left;
  width: 175px;
  box-sizing: border-box;
}

.slot-preview-disclaimer i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.75rem;
}

/* ── Preview controls ── */
.slot-preview-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.slot-preview-play-btn {
  background: transparent;
  border: 1px solid #1e2d45;
  color: #c7d2e8;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.13s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.slot-preview-play-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.slot-preview-play-btn.active {
  background: rgba(245,158,11,0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

/* ── Word counter ── */
.slot-preview-word-counter {
  font-family: monospace;
  font-size: 0.7rem;
  color: #546180;
  text-align: center;
}