/* ==========================================================================
   css/components/channel-create-modal.css
   Split from app.html (build 2026.10.08.9-beta), original lines 3225-3321.
   Rules are in their ORIGINAL order; load order is defined in index.html.
   ========================================================================== */
/* Channel create modal */
.ch-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 800;
  align-items: center;
  justify-content: center;
}
.ch-modal-overlay.open { display: flex; animation: overlay-in 0.15s ease; }
.ch-modal-overlay.open .ch-modal { animation: modal-pop 0.22s var(--ease-out, ease); }
.ch-modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 720px;
  max-width: 95vw;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Roomier. Every .ch-modal uses these - create channel, create category and the App Store -
   and they were all laid out at the same cramped 20/24 with 8px gaps. */
.ch-modal-head {
  padding: 26px 30px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.ch-modal-head h2 { font-size: 19px; font-weight: 700; margin: 0; color: var(--text-primary); }
.ch-modal-head p { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.45; }
.ch-modal-close {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 0; margin-top: -2px;
}
.ch-modal-close:hover { color: var(--text-primary); }
.ch-modal-body { padding: 26px 30px; flex: 1; min-height: 0; overflow-y: auto; }
.ch-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
@media (max-width: 560px) { .ch-type-grid { grid-template-columns: 1fr; } }
.ch-type-opt {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ch-type-opt:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.ch-type-opt.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ch-type-icon {
  width: 40px; height: 40px;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.ch-type-opt.selected .ch-type-icon { background: var(--accent); color: #fff; }
.ch-type-text h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 2px; }
.ch-type-text p { font-size: 12px; color: var(--text-muted); margin: 0; }
/* Fields stack with air between them; they used to butt straight up against each other. */
.ch-modal-field + .ch-modal-field { margin-top: 20px; }
.ch-modal-field label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.ch-modal-field input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-deep); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 14px; color: var(--text-primary); outline: none;
}
.ch-modal-field input:focus { border-color: var(--accent); }
.ch-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 30px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.btn-secondary {
  background: none; border: 1px solid var(--border-strong);
  color: var(--text-secondary); padding: 8px 16px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  transition: background 0.1s;
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-primary {
  background: var(--accent); border: none;
  color: #fff; padding: 8px 20px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 600;
  transition: background 0.15s, transform 0.15s var(--ease-out, ease), box-shadow 0.15s;
}
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
