/* Intelleqt Platform — The Reel editor (a0.61.0, R2) */

.ip-rede-overlay {
    position: fixed; inset: 0; z-index: 99000;
    background: rgba(15, 23, 42, 0.5);
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}
.ip-rede-modal {
    background: #fff; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3);
    overflow: hidden;
}
.ip-rede-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #e2e8f0;
}
.ip-rede-title { font-size: 16px; font-weight: 700; color: #0f172a; }
.ip-rede-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; }
.ip-rede-x:hover { color: #0f172a; }
.ip-rede-body { padding: 16px 18px; overflow: auto; }

.ip-rede-loading, .ip-rede-empty { color: #64748b; font-size: 13px; padding: 14px 4px; line-height: 1.5; }

.ip-rede-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ip-rede-btn {
    padding: 8px 14px; border-radius: 9px; border: 1px solid #cbd5e1;
    background: #fff; color: #334155; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}
.ip-rede-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.ip-rede-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.ip-rede-btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.ip-rede-btn:disabled { opacity: 0.6; cursor: default; }

/* ── Reel list ─────────────────────────────────────────────────── */
.ip-rede-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ip-rede-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
}
.ip-rede-row:hover { border-color: #c7d2fe; }
.ip-rede-row-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ip-rede-row-title { font-weight: 600; color: #0f172a; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-rede-row-meta { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.ip-rede-kind {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 2px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; white-space: nowrap;
}
.ip-rede-kind-scenario { background: #fef3c7; color: #b45309; }
.ip-rede-kind-intro { background: #dcfce7; color: #15803d; }
.ip-rede-row-acts { display: flex; gap: 6px; flex-shrink: 0; }
.ip-rede-mini {
    border: 1px solid #cbd5e1; background: #fff; color: #475569;
    font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; cursor: pointer;
}
.ip-rede-mini:hover { background: #f1f5f9; }
.ip-rede-mini:disabled { opacity: 0.4; cursor: default; }
.ip-rede-mini-danger { color: #b91c1c; border-color: #fecaca; }
.ip-rede-mini-danger:hover { background: #fef2f2; }

/* ── Editor ────────────────────────────────────────────────────── */
.ip-rede-meta-row { display: flex; gap: 10px; margin-bottom: 12px; }
.ip-rede-f { display: flex; flex-direction: column; gap: 4px; }
.ip-rede-f-grow { flex: 1; min-width: 0; }
.ip-rede-f > span { font-size: 11px; font-weight: 600; color: #64748b; }
.ip-rede-f input, .ip-rede-f select {
    border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #0f172a; font-family: inherit;
}
.ip-rede-f input:focus, .ip-rede-f select:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

.ip-rede-scenes { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.ip-rede-scene {
    display: grid; grid-template-columns: 22px 92px 1fr auto; gap: 10px; align-items: start;
    padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; position: relative;
}
.ip-rede-scene-n { font-size: 12px; font-weight: 700; color: #94a3b8; padding-top: 6px; text-align: center; }
.ip-rede-scene-img { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.ip-rede-thumb {
    width: 88px; height: 56px; border-radius: 7px; background-size: cover; background-position: center;
    border: 1px solid #e2e8f0; background-color: #0b1020;
}
.ip-rede-thumb.is-empty {
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: #94a3b8; font-size: 10px; line-height: 1.2; background: #f1f5f9;
}
.ip-rede-pick { font-size: 11px; border: 1px solid #cbd5e1; background: #fff; color: #475569; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.ip-rede-pick:hover { background: #f1f5f9; }
.ip-rede-scene-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ip-rede-cap, .ip-rede-vo {
    width: 100%; box-sizing: border-box; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 7px 9px; font-size: 13px; color: #0f172a; font-family: inherit; resize: vertical;
}
.ip-rede-cap:focus, .ip-rede-vo:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.ip-rede-cap { font-weight: 600; }
.ip-rede-scene-ctl { display: flex; flex-direction: column; gap: 4px; }

.ip-rede-picker {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px;
    margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0;
}
.ip-rede-pickopt {
    height: 48px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer;
    background-size: cover; background-position: center; background-color: #0b1020; padding: 0;
}
.ip-rede-pickopt:hover { border-color: #6366f1; }
.ip-rede-pickopt.is-none {
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: #f8fafc; color: #64748b; font-size: 10px; line-height: 1.2;
}

.ip-rede-addscene { width: 100%; border-style: dashed; }
.ip-rede-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.ip-rede-foot-r { display: flex; gap: 8px; }

@media (max-width: 560px) {
    .ip-rede-scene { grid-template-columns: 1fr; }
    .ip-rede-scene-ctl { flex-direction: row; }
    .ip-rede-meta-row { flex-direction: column; }
}
