/* ═══════════════════════════════════════════════
   CLARIX — CREATIVE STUDIOS CSS v2
   Visual heroes · Kids gallery · Festival cards · Voice
═══════════════════════════════════════════════ */

/* ── STUDIO CARDS (Apps page grid) ── */
.studios-section { margin:40px 0 32px; }
.studios-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.studios-header .ai-badge { margin:0; }
.studios-header h2 { font-size:22px; font-weight:800; color:#fff; margin:0; }

.studios-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:14px;
}
@media(max-width:600px){ .studios-grid{ grid-template-columns:1fr 1fr; gap:10px; } }

.studio-card {
  position:relative; border-radius:18px; overflow:hidden;
  cursor:pointer; padding:22px 18px 18px;
  border:1px solid rgba(255,255,255,0.07); background:#0d0d0d;
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display:flex; flex-direction:column; gap:8px;
  animation:cardIn .5s ease both;
}
.studio-card:hover { transform:translateY(-4px) scale(1.02); border-color:rgba(255,255,255,0.15); box-shadow:0 20px 50px rgba(0,0,0,.6); }
.studio-card::before { content:''; position:absolute; inset:0; border-radius:inherit; opacity:.07; transition:opacity .3s; }
.studio-card:hover::before { opacity:.14; }
.studio-card.studio-kids::before    { background:linear-gradient(135deg,#ff6b6b,#ffc300); }
.studio-card.studio-corp::before    { background:linear-gradient(135deg,#1a78c2,#0f4c81); }
.studio-card.studio-cultural::before{ background:linear-gradient(135deg,#ff7043,#f59e0b); }
.studio-card.studio-multi::before   { background:linear-gradient(135deg,#7c3aed,#db2777); }

.studio-emoji  { font-size:34px; line-height:1; }
.studio-name   { font-size:16px; font-weight:800; color:#fff; }
.studio-desc   { font-size:12px; color:rgba(255,255,255,.55); line-height:1.5; }
.studio-badge  {
  display:inline-flex; align-items:center; font-size:10px; font-weight:700;
  letter-spacing:.06em; padding:3px 9px; border-radius:20px; margin-top:4px; width:fit-content;
}
.studio-kids .studio-badge     { background:rgba(255,107,107,.15); color:#ff6b6b; border:1px solid rgba(255,107,107,.3); }
.studio-corp .studio-badge     { background:rgba(26,120,194,.15);  color:#60a5fa; border:1px solid rgba(26,120,194,.3); }
.studio-cultural .studio-badge { background:rgba(255,112,67,.15);  color:#ff7043; border:1px solid rgba(255,112,67,.3); }
.studio-multi .studio-badge    { background:rgba(124,58,237,.15);  color:#a78bfa; border:1px solid rgba(124,58,237,.3); }
.studio-arrow  { position:absolute; top:14px; right:14px; font-size:16px; color:rgba(255,255,255,.3); transition:transform .2s,color .2s; }
.studio-card:hover .studio-arrow { transform:translate(2px,-2px); color:#fff; }

/* ── STUDIO OVERLAY & MODAL ── */
.studio-overlay {
  position:fixed; inset:0; z-index:9000;
  background:rgba(0,0,0,.92);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  display:flex; justify-content:center; align-items:flex-start;
  overflow-y:auto; opacity:0; pointer-events:none; transition:opacity .3s;
}
.studio-overlay.open { opacity:1; pointer-events:all; }

.studio-modal {
  width:100%; max-width:680px;
  background:#0d0d0d;
  border:1px solid rgba(255,255,255,.08);
  min-height:100vh;
  transform:translateY(-12px);
  transition:transform .35s cubic-bezier(.34,1.56,.64,1);
  position:relative;
}
.studio-overlay.open .studio-modal { transform:translateY(0); }
@media(min-width:700px){
  .studio-overlay { padding:30px 20px; }
  .studio-modal { border-radius:24px; min-height:auto; }
}

.studio-modal-close-top {
  position:absolute; top:12px; right:12px; z-index:10;
  background:rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.15);
  color:#fff; padding:7px 14px; border-radius:24px;
  font-size:13px; font-weight:700; cursor:pointer;
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  transition:background .2s;
}
.studio-modal-close-top:hover { background:rgba(255,255,255,.12); }

/* ── HERO SECTION ── */
.studio-hero {
  width:100%; height:200px; position:relative;
  background-size:cover; background-position:center;
  border-radius: 0;
  overflow:hidden; flex-shrink:0;
}
@media(min-width:700px){ .studio-hero{ border-radius:24px 24px 0 0; } }
.studio-hero-overlay {
  position:absolute; inset:0;
}
.studio-hero-content {
  position:absolute; bottom:0; left:0; right:0;
  padding:20px 24px;
  background:linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
}
.studio-hero-emoji  { font-size:36px; margin-bottom:6px; }
.studio-hero-title  { font-size:22px; font-weight:900; color:#fff; }
.studio-hero-sub    { font-size:13px; color:rgba(255,255,255,.75); margin-top:4px; line-height:1.5; }

/* ── TIPS STRIP ── */
.studio-tips-strip {
  display:flex; gap:8px; overflow-x:auto; padding:14px 0;
  scrollbar-width:none;
  border-bottom:1px solid rgba(255,255,255,.05);
  margin-bottom:4px;
}
.studio-tips-strip::-webkit-scrollbar { display:none; }
.studio-tip {
  flex-shrink:0; background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08); border-radius:24px;
  padding:7px 14px; font-size:12px; font-weight:600; color:rgba(255,255,255,.7);
  white-space:nowrap;
}
/* Clickable tip chips (Cultural Creator WhatsApp/Instagram) */
.studio-tip-btn {
  cursor:pointer;
  background:rgba(255,112,67,.08);
  border-color:rgba(255,112,67,.25);
  color:#ff7043;
  transition:background .2s, border-color .2s, transform .15s;
}
.studio-tip-btn:hover {
  background:rgba(255,112,67,.18);
  border-color:rgba(255,112,67,.5);
  transform:translateY(-1px);
}

.studio-modal-body { padding:20px 20px 80px; }

/* ── KIDS STYLE GALLERY ── */
.kids-style-gallery {
  display:flex; gap:10px; overflow-x:auto; padding:4px 0 12px;
  scrollbar-width:none; margin-bottom:8px;
}
.kids-style-gallery::-webkit-scrollbar { display:none; }
.kids-style-card {
  flex-shrink:0; width:110px; border-radius:14px; overflow:hidden;
  border:2px solid rgba(255,255,255,.08); cursor:pointer;
  transition:all .2s; background:#111;
}
.kids-style-card.active { border-color:#ff6b6b; box-shadow:0 0 0 2px rgba(255,107,107,.3); }
.kids-style-card img { width:110px; height:75px; object-fit:cover; display:block; }
.ks-label { font-size:11px; font-weight:800; color:#fff; padding:5px 8px 2px; }
.ks-desc  { font-size:10px; color:rgba(255,255,255,.5); padding:0 8px 7px; }

/* ── OPTIONS & PILLS ── */
.studio-options-label {
  font-size:11px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:rgba(255,255,255,.5);
  margin:16px 0 8px;
}
.studio-pill-group { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:4px; }
.studio-pill {
  padding:8px 16px; border-radius:24px; font-size:13px; font-weight:600;
  border:1.5px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04); color:rgba(255,255,255,.7);
  cursor:pointer; transition:all .2s; white-space:nowrap;
}
.studio-pill:hover  { border-color:rgba(255,255,255,.25); color:#fff; }
.studio-pill.active { background:rgba(255,112,67,.15); border-color:rgba(255,112,67,.6); color:#fff; }

/* ── FESTIVAL GRID ── */
.festival-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px;
}
@media(min-width:500px){ .festival-grid{ grid-template-columns:repeat(4,1fr); } }
.festival-card {
  border-radius:14px; padding:12px 8px; text-align:center;
  border:1.5px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03);
  cursor:pointer; transition:all .2s;
}
.festival-card:hover  { border-color:rgba(255,112,67,.4); background:rgba(255,112,67,.05); }
.festival-card.selected { border-color:rgba(255,112,67,.7); }
.fi-emoji { font-size:26px; margin-bottom:5px; }
.fi-name  { font-size:11px; font-weight:700; color:#fff; }

.festival-preview-card {
  border-radius:16px; padding:20px; text-align:center;
  margin-bottom:16px; transition:all .4s;
}
.fpc-emojis { font-size:32px; margin-bottom:8px; }
.fpc-name   { font-size:20px; font-weight:900; color:#fff; }
.fpc-sub    { font-size:13px; color:rgba(255,255,255,.75); margin-top:6px; }

/* ── UPLOAD ZONE ── */
.studio-upload-zone {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; padding:28px 20px;
  border:2px dashed rgba(255,255,255,.12); border-radius:16px; cursor:pointer;
  background:rgba(255,255,255,.02); transition:all .2s; margin-bottom:8px; text-align:center;
}
.studio-upload-zone:hover, .studio-upload-zone.dragover { border-color:rgba(255,112,67,.5); background:rgba(255,112,67,.04); }
.studio-upload-preview { width:100%; border-radius:14px; overflow:hidden; max-height:240px; display:none; position:relative; }
.studio-upload-preview.visible { display:block; }
.studio-upload-preview img { width:100%; height:240px; object-fit:cover; display:block; }
.change-photo {
  position:absolute; bottom:10px; right:10px;
  background:rgba(0,0,0,.7); color:#fff; border:1px solid rgba(255,255,255,.2);
  border-radius:20px; padding:6px 14px; font-size:12px; cursor:pointer;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
}

/* ── CONTEXT + VOICE ROW ── */
.studio-voice-row { position:relative; margin-bottom:16px; }
.studio-textarea {
  width:100%; box-sizing:border-box;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.09);
  border-radius:12px; padding:14px 52px 14px 14px; color:#e0e0e0;
  font-size:14px; line-height:1.6; font-family:var(--font-body); resize:none;
}
.studio-textarea:focus { outline:none; border-color:rgba(255,112,67,.4); }
.studio-mic-btn {
  position:absolute; top:10px; right:10px;
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12);
  font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:all .2s;
}
.studio-mic-btn:hover { background:rgba(255,112,67,.2); }

/* ── GENERATE BUTTON ── */
.studio-analyze-btn {
  width:100%; padding:16px; border-radius:14px;
  background:linear-gradient(135deg,#ff7043,#ff5722);
  border:none; color:#fff; font-size:16px; font-weight:800;
  cursor:pointer; font-family:var(--font-body);
  transition:all .2s; box-shadow:0 8px 24px rgba(255,112,67,.35);
}
.studio-analyze-btn:hover { filter:brightness(1.1); transform:translateY(-1px); }
.studio-analyze-btn:disabled { opacity:.5; cursor:not-allowed; transform:none; }

/* ── OUTPUT & VARIATIONS ── */
.studio-output { margin-top:24px; display:none; animation:fadeUp .4s ease; }
.studio-output.visible { display:block; }
.studio-output-label {
  font-size:11px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--accent); margin-bottom:12px;
}
.studio-variation {
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.09);
  border-radius:14px; padding:16px; margin-bottom:12px; position:relative;
  cursor:pointer; transition:border-color .2s;
}
.studio-variation:hover { border-color:rgba(255,112,67,.4); }
.studio-variation.selected { border-color:rgba(255,112,67,.6); background:rgba(255,112,67,.06); }
.studio-variation-num  { font-size:10px; font-weight:800; color:var(--accent); letter-spacing:.08em; margin-bottom:6px; text-transform:uppercase; }
.studio-variation-text { font-size:13px; line-height:1.8; color:#e0e0e0; }
.studio-variation-copy {
  position:absolute; top:12px; right:12px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  color:rgba(255,255,255,.6); border-radius:8px; padding:4px 10px;
  font-size:11px; cursor:pointer; font-family:var(--font-body); transition:all .2s;
}
.studio-variation-copy:hover { background:rgba(255,112,67,.15); color:#fff; border-color:rgba(255,112,67,.4); }

/* ── FESTIVAL CANVAS WRAP ── */
.festival-canvas-wrap { margin-top:16px; }
.festival-canvas-wrap canvas { border-radius:16px; }

/* ── SEND TO WRITE ── */
.studio-send-to-write {
  width:100%; padding:13px; border-radius:12px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  color:#fff; font-size:14px; font-weight:700;
  cursor:pointer; font-family:var(--font-body); transition:all .2s; margin-top:8px;
}
.studio-send-to-write:hover { background:rgba(255,255,255,.1); }

/* ════════════════════════════════════════════
   CARD DESIGN PANEL
════════════════════════════════════════════ */
.card-design-panel {
  margin-top:16px; border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.cdp-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; cursor:pointer;
  font-size:14px; font-weight:700; color:#e0e0e0;
  background:rgba(255,255,255,.04);
  transition:background .2s;
}
.cdp-header:hover { background:rgba(255,255,255,.08); }
.cdp-arrow { transition:transform .3s; font-size:11px; color:rgba(255,255,255,.4); }
.card-design-panel.open .cdp-arrow { transform:rotate(180deg); }

.cdp-body {
  display:none; padding:16px 18px 20px; display:none;
  flex-direction:column; gap:10px;
}
.card-design-panel.open .cdp-body { display:flex; }

.cdp-label {
  font-size:11px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:rgba(255,255,255,.45);
  margin-top:6px;
}

/* Swatch row */
.cdp-row {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
}
.cdp-swatch {
  width:36px; height:36px; border-radius:50%; border:2px solid transparent;
  cursor:pointer; transition:all .2s; display:flex; align-items:center;
  justify-content:center; font-size:14px; color:#fff; font-weight:900;
}
.cdp-swatch.active { border-color:#fff; transform:scale(1.15); }
.cdp-text-swatch { width:30px; height:30px; }

/* Color picker */
.cdp-color-input {
  width:36px; height:36px; border-radius:50%; border:2px solid rgba(255,255,255,.2);
  cursor:pointer; padding:0; background:none;
}
.cdp-color-input::-webkit-color-swatch-wrapper { padding:0; border-radius:50%; }
.cdp-color-input::-webkit-color-swatch { border-radius:50%; border:none; }

/* Pill row */
.cdp-pill-row { display:flex; flex-wrap:wrap; gap:8px; }
.cdp-pill {
  padding:7px 14px; border-radius:24px; font-size:12px; font-weight:600;
  border:1.5px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04); color:rgba(255,255,255,.6);
  cursor:pointer; transition:all .18s;
}
.cdp-pill:hover { border-color:rgba(255,112,67,.4); color:#fff; }
.cdp-pill.active { background:rgba(255,112,67,.15); border-color:rgba(255,112,67,.6); color:#fff; }

/* Toggle */
.cdp-toggle {
  display:flex; align-items:center; gap:10px;
  font-size:13px; color:rgba(255,255,255,.65); cursor:pointer;
}
.cdp-toggle input[type=checkbox] { accent-color:#ff7043; width:16px; height:16px; cursor:pointer; }

/* ════════════════════════════════════════════
   BLANK CANVAS CREATOR (Cultural Creator)
════════════════════════════════════════════ */
.blank-canvas-toggle {
  width:100%; margin-bottom:16px; padding:14px;
  border-radius:14px; border:1.5px dashed rgba(255,112,67,.35);
  background:rgba(255,112,67,.04); color:rgba(255,255,255,.7);
  font-size:14px; font-weight:700; cursor:pointer;
  font-family:var(--font-body); transition:all .2s; text-align:center;
}
.blank-canvas-toggle:hover { border-color:rgba(255,112,67,.6); background:rgba(255,112,67,.1); color:#fff; }
.blank-canvas-toggle.active {
  background:rgba(255,112,67,.15); border-color:rgba(255,112,67,.7);
  color:#ff7043; border-style:solid;
}

.blank-canvas-section {
  display:none; margin-bottom:16px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px; padding:16px;
}
.blank-canvas-section.visible { display:block; }

.blank-canvas-section .bcs-label {
  font-size:11px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:rgba(255,255,255,.45); margin:10px 0 6px;
}
.blank-canvas-section .bcs-row {
  display:flex; gap:10px; margin-bottom:4px;
}
.blank-canvas-section .bcs-input {
  width:100%; box-sizing:border-box;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  border-radius:10px; padding:11px 14px; color:#e0e0e0;
  font-size:14px; font-family:var(--font-body);
}
.blank-canvas-section .bcs-input:focus { outline:none; border-color:rgba(255,112,67,.4); }
.blank-canvas-section .bcs-emoji { width:80px; text-align:center; font-size:22px; }

#blankCardCanvas { margin-top:12px; }
