/* ==========================================================================
   Event Page Builder — Admin UI (Lime & Slate)
   Estilos do construtor de paginas de evento dentro do Super Admin.
   As PAGINAS GERADAS usam a paleta selecionavel; este CSS e so do builder.
   ========================================================================== */

:root {
    --eb-lime: #C6F24F;
    --eb-lime-600: #A9D13B;
    --eb-ink: #111317;
    --eb-slate: #5B6660;
}

/* Layout principal: 3 colunas */
.eb-shell {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 1100px) {
    .eb-shell {
        grid-template-columns: 268px minmax(0, 1fr) 360px;
        align-items: start;
    }
}

.eb-col {
    min-width: 0;
}

.eb-panel {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}
.dark .eb-panel {
    border-color: #374151;
    background: #111827;
}

.eb-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f2;
}
.dark .eb-panel-head { border-color: #1f2937; }

.eb-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9ca3af;
}

/* ----- Paleta de blocos (botoes "adicionar") ----- */
.eb-block-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
}
.eb-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
    min-height: 44px;
}
.eb-add-btn:hover {
    background: #fff;
    border-color: var(--eb-lime-600);
    transform: translateY(-1px);
}
.eb-add-btn i { color: var(--eb-ink); width: 16px; text-align: center; }
.dark .eb-add-btn { background: #0b1220; border-color: #374151; color: #d1d5db; }
.dark .eb-add-btn i { color: var(--eb-lime); }

/* ----- Lista de blocos (sortable) ----- */
.eb-blocklist { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.eb-block-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.eb-block-card {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, background .15s ease;
}
.eb-block-card:hover { background: #f9fafb; }
.eb-block-card.is-active {
    border-color: var(--eb-ink);
    background: #f3f7e6;
    box-shadow: inset 0 0 0 1px var(--eb-ink);
}
.dark .eb-block-card { background: #0b1220; border-color: #374151; }
.dark .eb-block-card.is-active { background: #1a2233; box-shadow: inset 0 0 0 1px var(--eb-lime); border-color: var(--eb-lime); }

.eb-block-ico {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--eb-lime);
    color: var(--eb-ink);
    font-size: 13px;
}
.eb-block-meta { min-width: 0; }
.eb-block-title {
    font-size: 13px; font-weight: 800; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dark .eb-block-title { color: #f3f4f6; }
.eb-block-sub { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; }
.eb-block-card.is-hidden { opacity: .5; }

.eb-block-actions { display: flex; flex-direction: column; gap: 4px; }
.eb-icon-btn {
    width: 30px; height: 21px;
    display: grid; place-items: center;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 11px;
    transition: background .15s ease, color .15s ease;
}
.eb-icon-btn:hover { background: #f3f4f6; color: #111827; }
.eb-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.eb-icon-btn.is-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.dark .eb-icon-btn { background: #0b1220; border-color: #374151; color: #9ca3af; }
.eb-block-row .eb-icon-btn.eb-del { width: 36px; height: auto; }

.eb-empty {
    padding: 18px 14px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* ----- Centro: preview ----- */
.eb-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.eb-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.eb-device-tabs { display: inline-flex; gap: 4px; padding: 3px; background: #f3f4f6; border-radius: 11px; }
.dark .eb-device-tabs { background: #1f2937; }
.eb-device-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 9px;
    font-size: 12px; font-weight: 700; color: #6b7280;
    background: transparent; border: 0; cursor: pointer; min-height: 36px;
}
.eb-device-tab.is-active { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.dark .eb-device-tab.is-active { background: #0b1220; color: #f3f4f6; }

.eb-preview-stage {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background:
        repeating-conic-gradient(#f4f4f5 0% 25%, #fafafa 0% 50%) 0 0 / 22px 22px;
    padding: 14px;
    overflow: auto;
    display: flex;
    justify-content: center;
}
.dark .eb-preview-stage { border-color: #374151; background: #0b1220; }
.eb-preview-frame {
    width: 100%;
    height: 70vh;
    min-height: 520px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.16);
    transition: width .25s ease;
}
.eb-preview-stage[data-device="mobile"] .eb-preview-frame { width: 390px; max-width: 100%; }

/* ----- Direita: propriedades / tema ----- */
.eb-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #f3f4f6; border-radius: 12px; }
.dark .eb-tabs { background: #1f2937; }
.eb-tab {
    flex: 1 1 0; min-height: 38px;
    padding: 7px 10px; border-radius: 9px; border: 0; cursor: pointer;
    font-size: 12px; font-weight: 800; color: #6b7280; background: transparent;
}
.eb-tab.is-active { background: var(--eb-ink); color: #fff; }
.dark .eb-tab.is-active { background: var(--eb-lime); color: var(--eb-ink); }

.eb-props { display: flex; flex-direction: column; gap: 14px; padding: 14px; }
.eb-field { display: block; }
.eb-field > span.eb-label {
    display: block; margin-bottom: 5px;
    font-size: 12px; font-weight: 700; color: #374151;
}
.dark .eb-field > span.eb-label { color: #d1d5db; }
.eb-input, .eb-textarea, .eb-select {
    width: 100%;
    border-radius: 11px;
    border: 1px solid #d1d5db;
    background: #fff;
    padding: 9px 11px;
    font-size: 13px;
    color: #111827;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.eb-textarea { min-height: 64px; resize: vertical; line-height: 1.5; }
.eb-input:focus, .eb-textarea:focus, .eb-select:focus {
    border-color: var(--eb-lime-600);
    box-shadow: 0 0 0 3px rgba(198,242,79,.4);
}
.dark .eb-input, .dark .eb-textarea, .dark .eb-select {
    background: #0b1220; border-color: #374151; color: #f3f4f6;
}

/* itens repetiveis */
.eb-items { display: flex; flex-direction: column; gap: 10px; }
.eb-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 11px;
    background: #fafafa;
    position: relative;
}
.dark .eb-item { background: #0b1220; border-color: #374151; }
.eb-item-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.eb-item-tag { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9ca3af; }
.eb-item-grid { display: grid; gap: 8px; }
.eb-item-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.eb-add-item {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: 40px;
    border-radius: 11px; border: 1px dashed #cbd5e1; background: #fff;
    color: #374151; font-size: 12px; font-weight: 700; cursor: pointer;
}
.eb-add-item:hover { border-color: var(--eb-lime-600); background: #f7fbe9; }
.dark .eb-add-item { background: #0b1220; border-color: #374151; color: #d1d5db; }

.eb-checkbox-row {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 11px; border-radius: 11px; border: 1px solid #e5e7eb; background: #fafafa;
    font-size: 13px; font-weight: 600; color: #374151; cursor: pointer;
}
.dark .eb-checkbox-row { background: #0b1220; border-color: #374151; color: #d1d5db; }

/* ----- Tema: paleta + fontes ----- */
.eb-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eb-preset {
    border: 1px solid #e5e7eb; border-radius: 13px; padding: 10px; cursor: pointer;
    background: #fff; text-align: left; transition: border-color .15s ease, transform .12s ease;
}
.eb-preset:hover { transform: translateY(-1px); }
.eb-preset.is-active { border-color: var(--eb-ink); box-shadow: inset 0 0 0 1px var(--eb-ink); }
.dark .eb-preset { background: #0b1220; border-color: #374151; }
.dark .eb-preset.is-active { border-color: var(--eb-lime); box-shadow: inset 0 0 0 1px var(--eb-lime); }
.eb-preset-name { font-size: 12px; font-weight: 800; color: #111827; margin-bottom: 7px; }
.dark .eb-preset-name { color: #f3f4f6; }
.eb-swatches { display: flex; gap: 4px; }
.eb-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }

.eb-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.eb-color-field { display: flex; flex-direction: column; gap: 5px; }
.eb-color-field > span { font-size: 11px; font-weight: 700; color: #6b7280; }
.eb-color-pick { display: flex; align-items: center; gap: 7px; }
.eb-color-pick input[type="color"] {
    width: 34px; height: 34px; padding: 0; border: 1px solid #d1d5db; border-radius: 9px;
    background: #fff; cursor: pointer;
}
.eb-color-pick input[type="text"] {
    flex: 1 1 auto; min-width: 0;
    border: 1px solid #d1d5db; border-radius: 9px; padding: 7px 8px;
    font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-transform: uppercase; color: #111827; background: #fff;
}
.dark .eb-color-pick input[type="text"] { background: #0b1220; border-color: #374151; color: #f3f4f6; }

/* ==========================================================================
   Tela cheia (construtor dedicado) — overlay fixo cobrindo a viewport
   ========================================================================== */
body.eb-fs-open { overflow: hidden; }

.eb-fs {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}
.dark .eb-fs { background: #0b1220; }
.eb-fs.hidden { display: none; }

/* Topbar */
.eb-fs-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.dark .eb-fs-topbar { background: #111827; border-color: #1f2937; }

.eb-fs-titlewrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.eb-fs-back {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 8px 13px;
    border-radius: 12px; border: 1px solid #e5e7eb; background: #fff;
    font-size: 13px; font-weight: 800; color: var(--eb-ink); cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.eb-fs-back:hover { background: #f3f4f6; border-color: var(--eb-lime-600); }
.dark .eb-fs-back { background: #0b1220; border-color: #374151; color: #f3f4f6; }

.eb-fs-titles { min-width: 0; }
.eb-fs-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #9ca3af; }
.eb-fs-title { font-size: 15px; font-weight: 900; color: var(--eb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.dark .eb-fs-title { color: #f3f4f6; }

.eb-fs-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.eb-fs-btn {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 9px 14px;
    border-radius: 12px; border: 1px solid transparent;
    font-size: 13px; font-weight: 800; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.eb-fs-btn-ghost { background: #fff; border-color: #e5e7eb; color: #374151; }
.eb-fs-btn-ghost:hover { background: #f3f4f6; }
.dark .eb-fs-btn-ghost { background: #0b1220; border-color: #374151; color: #e5e7eb; }
.eb-fs-btn-dark { background: var(--eb-ink); color: #fff; }
.eb-fs-btn-dark:hover { background: #000; }
.eb-fs-btn-lime { background: var(--eb-lime); color: var(--eb-ink); }
.eb-fs-btn-lime:hover { background: var(--eb-lime-600); }
.eb-fs-btn-icon { width: 44px; padding: 0; justify-content: center; background: #fff; border-color: #e5e7eb; color: #6b7280; }
.eb-fs-btn-icon:hover { background: #f3f4f6; color: var(--eb-ink); }
.dark .eb-fs-btn-icon { background: #0b1220; border-color: #374151; color: #9ca3af; }

/* Corpo rolavel: hospeda o form #event-template-editor */
.eb-fs-body {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px;
}

/* O builder aproveita toda a largura/altura */
.eb-fs .eb-shell { margin-top: 0 !important; }
@media (min-width: 1100px) {
    .eb-fs .eb-shell { grid-template-columns: 300px minmax(0, 1fr) 400px; }
    .eb-fs .eb-preview-frame { height: calc(100vh - 232px); min-height: 560px; }
}

/* Mobile: acoes da topbar viram so icone (rotulo escondido) */
@media (max-width: 720px) {
    .eb-fs-btn-label { display: none; }
    .eb-fs-back span { display: none; }
    .eb-fs-title { max-width: 38vw; }
}

/* resumo */
.eb-summary { display: grid; gap: 9px; }
.eb-summary-cell { border-radius: 12px; background: rgba(255,255,255,.08); padding: 11px; }
.eb-summary-key { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #94a3b8; }
.eb-summary-val { margin-top: 4px; font-weight: 800; }
