[hidden] {
    display: none !important;
}

/* Marca del sidebar */
.landings-app-body .navbar-logo {
    width: 120px;
    max-height: 40px;
    height: auto;
    object-fit: contain;
}

/* Mensaje de error reutiliza el alert de CORK */
.alert.is-error {
    color: #e7515a;
    background: rgba(231, 81, 90, 0.12);
}

/* Listado de landings */
.landing-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landing-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
    transition: border-color .2s, box-shadow .2s;
}

.landing-item:hover,
.landing-item.active {
    border-color: #4361ee;
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.12);
}

.landing-item strong {
    display: block;
    color: #0e1726;
    font-size: 14px;
}

.landing-item span {
    display: block;
    color: #888ea8;
    font-size: 12px;
    margin-bottom: 6px;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 0 9px;
    background: #fff4df;
    color: #e2a03f;
    font-size: 11px;
    font-weight: 800;
    font-style: normal;
    text-transform: uppercase;
}

.status-aprobada {
    background: rgba(0, 150, 108, 0.12);
    color: #00966c;
}

.status-rechazada {
    background: rgba(231, 81, 90, 0.12);
    color: #e7515a;
}

/* Barra de herramientas del constructor */
.builder-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* Toolbar de formato del editor visual */
.format-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fafbfd;
}

.format-toolbar .btn {
    min-width: 38px;
}

.element-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(67, 97, 238, 0.08);
}

.element-actions-label {
    color: #4361ee;
    font-size: 12px;
    font-weight: 800;
}

body.dark .format-toolbar {
    background: #0e1726;
    border-color: #1b2e4b;
}

.block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Superficie de edicion: textarea o iframe segun el modo */
.editor-surface {
    position: relative;
    height: 540px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.code-editor,
.preview-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
}

.code-editor {
    resize: none;
    padding: 16px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 0;
}

.code-editor.active,
.preview-frame.active {
    display: block;
}

/* ============================================================
   Pantalla de listado: tarjetas de landings
   ============================================================ */
.landing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.landing-card-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e6ed;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.landing-card-item:hover,
.landing-card-item:focus-visible {
    transform: translateY(-3px);
    border-color: #4361ee;
    box-shadow: 0 10px 26px rgba(14, 23, 38, 0.12);
    outline: none;
}

.landing-card-thumb {
    height: 150px;
    background: linear-gradient(135deg, #093a8e, #4361ee);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.landing-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-card-initial {
    color: #fff;
    font-size: 52px;
    font-weight: 800;
    opacity: .9;
}

.landing-card-body {
    display: grid;
    gap: 6px;
    padding: 14px 16px 18px;
}

.landing-card-body strong {
    color: #0e1726;
    font-size: 15px;
}

.landing-card-url {
    color: #888ea8;
    font-size: 12px;
}

.landing-card-cat {
    color: #888ea8;
    font-size: 12px;
    align-self: center;
}

.landing-card-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(14, 23, 38, 0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: opacity .15s;
}

.landing-card-item:hover .landing-card-edit {
    opacity: 1;
}

/* ============================================================
   Editor a pantalla completa (estilo Shopify)
   ============================================================ */
body.lp-editor-open {
    overflow: hidden;
}

.lp-editor {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    background: #eef1f6;
}

.lp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
}

.lp-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.lp-back {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    color: #3b3f5c;
    cursor: pointer;
}

.lp-back:hover {
    border-color: #4361ee;
    color: #4361ee;
}

.lp-title-wrap {
    display: grid;
    min-width: 0;
}

.lp-title-wrap strong {
    color: #0e1726;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.lp-status {
    justify-self: start;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.lp-topbar-center {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-device {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #888ea8;
    cursor: pointer;
}

.lp-device:hover {
    color: #4361ee;
}

.lp-device.active {
    border-color: #4361ee;
    background: rgba(67, 97, 238, 0.08);
    color: #4361ee;
}

.lp-sep {
    width: 1px;
    height: 22px;
    background: #e0e6ed;
    margin: 0 4px;
}

.lp-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-review-hint {
    margin: 10px 16px 0;
}

.lp-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.lp-panel {
    width: 330px;
    min-width: 330px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e0e6ed;
    overflow-y: auto;
}

.lp-tabs {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
}

.lp-tab {
    flex: 1;
    padding: 12px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #888ea8;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.lp-tab.active {
    color: #4361ee;
    border-bottom-color: #4361ee;
}

.lp-tab-pane {
    display: none;
    padding: 16px;
}

.lp-tab-pane.active {
    display: block;
}

.lp-pane-hint {
    margin: 0 0 14px;
    color: #888ea8;
    font-size: 12.5px;
    line-height: 1.5;
}

.lp-pane-title {
    margin: 18px 0 10px;
    color: #0e1726;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.lp-pane-title:first-of-type {
    margin-top: 0;
}

.lp-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.lp-block {
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 12px 6px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    color: #3b3f5c;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.lp-block span {
    font-size: 18px;
    line-height: 1;
    color: #4361ee;
}

.lp-block:hover {
    border-color: #4361ee;
    background: rgba(67, 97, 238, 0.05);
}

.lp-block-form {
    border-color: rgba(0, 150, 108, 0.4);
}

.lp-block-form span {
    color: #00966c;
}

/* Vista previa tipo Google (pestaña SEO) */
.lp-serp {
    display: grid;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
}

.lp-serp-url {
    color: #202124;
    font-size: 12px;
}

.lp-serp-title {
    color: #1a0dab;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
}

.lp-serp-desc {
    margin: 0;
    color: #4d5156;
    font-size: 13px;
    line-height: 1.45;
}

/* Portada */
.lp-cover-preview {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1.91 / 1;
    border: 1px dashed #d5dcef;
    border-radius: 12px;
    background: #f8faff;
    overflow: hidden;
}

.lp-cover-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lp-cover-empty {
    color: #888ea8;
    font-size: 13px;
    font-weight: 700;
}

/* Bloques del catálogo (dados de alta en Control) */
.lp-block-catalog img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Panel de propiedades del bloque (sustituye al panel al seleccionar) */
.lp-block-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -4px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e6ed;
}

.lp-block-pane-header h6 {
    color: #0e1726;
    font-weight: 800;
}

.lp-block-pane-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    color: #888ea8;
    font-size: 13px;
    cursor: pointer;
}

.lp-block-pane-close:hover {
    color: #e7515a;
    border-color: #e7515a;
}

.lp-prop {
    margin-bottom: 16px;
}

.lp-prop .form-label {
    margin-bottom: 6px;
    color: #515365;
    font-size: 12.5px;
    font-weight: 800;
}

.lp-prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-prop-row .btn {
    flex: 1;
}

.lp-color {
    width: 46px;
    height: 34px;
    padding: 3px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.lp-prop .btn-group .btn.active {
    background: #4361ee;
    border-color: #4361ee;
    color: #fff;
}

.lp-prop-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(67, 97, 238, 0.12);
    color: #4361ee;
    font-size: 11px;
    font-weight: 800;
}

.lp-prop-state {
    display: block;
    margin-top: 6px;
    color: #888ea8;
    font-size: 12px;
}

.lp-bg-thumb {
    height: 64px;
    margin-bottom: 8px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #f1f3f9;
}

/* Acordeón de CSS personalizado (avanzado) */
.lp-css-acc {
    margin-top: 18px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}

.lp-css-acc summary {
    padding: 11px 14px;
    background: #f8faff;
    color: #515365;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.lp-css-acc summary::before {
    content: "\203A";
    display: inline-block;
    margin-right: 8px;
    color: #4361ee;
    transition: transform .15s;
}

.lp-css-acc[open] summary::before {
    transform: rotate(90deg);
}

.lp-css-acc > *:not(summary) {
    margin-left: 14px;
    margin-right: 14px;
}

.lp-css-acc > p {
    margin-top: 10px;
}

.lp-css-acc > button {
    width: calc(100% - 28px) !important;
    margin-bottom: 14px;
}

.lp-css-editor {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    background: #0e1726;
    color: #e0e6ed;
    border-color: #1b2e4b;
}

.lp-css-editor:focus {
    background: #0e1726;
    color: #e0e6ed;
    border-color: #4361ee;
}

body.dark .lp-css-acc {
    border-color: #1b2e4b;
}

body.dark .lp-css-acc summary {
    background: #1b2e4b;
    color: #e0e6ed;
}

body.dark .lp-bg-thumb {
    border-color: #1b2e4b;
    background-color: #1b2e4b;
}

body.dark .lp-block-pane-header {
    border-color: #1b2e4b;
}

body.dark .lp-block-pane-header h6 {
    color: #e0e6ed;
}

body.dark .lp-block-pane-close,
body.dark .lp-color {
    background: #1b2e4b;
    border-color: #1b2e4b;
}

/* URL/categoría fijas (landing aprobada) */
.lp-locked-info {
    padding: 14px 16px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #f8faff;
    margin-bottom: 16px;
}

.lp-locked-info a {
    color: #4361ee;
    font-weight: 700;
}

/* Selector de cobertura geografica (Configuracion) */
.coverage-picker {
    padding: 14px 16px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #f8faff;
    margin-bottom: 16px;
}

.coverage-cities-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
}

.coverage-city-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 6px;
    font-size: 13px;
}

.coverage-city-item:hover {
    background: rgba(67, 97, 238, 0.08);
}

.coverage-city-item input {
    margin: 0;
}

.coverage-city-item span {
    color: #888ea8;
    font-size: 11.5px;
}

body.dark .coverage-picker {
    background: #1b2e4b;
    border-color: #0e1726;
}

body.dark .coverage-cities-list {
    background: #0e1726;
    border-color: #0e1726;
}

/* Toolbars FLOTANTES (formato sobre el texto, acciones junto al bloque) */
.lp-float {
    position: fixed;
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-radius: 12px;
    background: #0e1726;
    box-shadow: 0 12px 32px rgba(14, 23, 38, 0.35);
}

.lp-float[hidden] {
    display: none;
}

.lp-float button {
    min-width: 32px;
    height: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #e0e6ed;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.lp-float button:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.lp-float .lp-float-danger {
    color: #ff8086;
}

.lp-float .lp-float-danger:hover {
    background: rgba(231, 81, 90, 0.25);
}

.lp-float-sep {
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.18);
}

/* Botón para abatir el panel izquierdo */
.lp-body {
    position: relative;
}

.lp-panel-toggle {
    position: absolute;
    left: 330px;
    top: 50%;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 26px;
    height: 52px;
    transform: translate(-50%, -50%);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    color: #888ea8;
    cursor: pointer;
    transition: left .2s ease;
}

.lp-panel-toggle:hover {
    color: #4361ee;
    border-color: #4361ee;
}

.lp-panel-toggle svg {
    transition: transform .2s ease;
}

.lp-editor.panel-collapsed .lp-panel {
    display: none;
}

.lp-editor.panel-collapsed .lp-panel-toggle {
    left: 0;
    transform: translate(0, -50%);
    border-radius: 0 10px 10px 0;
    border-left: 0;
}

.lp-editor.panel-collapsed .lp-panel-toggle svg {
    transform: rotate(180deg);
}

/* Escenario del canvas + marcos por dispositivo */
.lp-stage {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    padding: 18px;
    background: #eef1f6;
}

.lp-stage:fullscreen {
    padding: 0;
    background: #0e1726;
}

.lp-device-frame {
    position: relative;
    width: 100%;
    height: calc(100vh - 130px);
    min-height: 420px;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(14, 23, 38, 0.08);
    overflow: hidden;
    transition: width .25s ease;
}

.lp-stage[data-device-view="tablet"] .lp-device-frame {
    width: 820px;
    max-width: 100%;
}

.lp-stage[data-device-view="mobile"] .lp-device-frame {
    width: 400px;
    max-width: 100%;
    border-radius: 26px;
    border-width: 6px;
    border-color: #0e1726;
}

.lp-stage:fullscreen .lp-device-frame {
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

.lp-stage:fullscreen[data-device-view="desktop"] .lp-device-frame {
    border: 0;
}

.lp-device-frame .code-editor,
.lp-device-frame .preview-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
}

.lp-device-frame .code-editor.active,
.lp-device-frame .preview-frame.active {
    display: block;
}

@media (max-width: 991px) {
    .lp-body {
        flex-direction: column;
    }

    .lp-panel {
        width: 100%;
        min-width: 0;
        max-height: 46vh;
        border-right: 0;
        border-bottom: 1px solid #e0e6ed;
    }

    .lp-panel-toggle {
        display: none;
    }

    .lp-device-frame {
        height: 60vh;
    }

    .lp-topbar {
        flex-wrap: wrap;
    }
}

body.dark .lp-locked-info {
    background: #1b2e4b;
    border-color: #1b2e4b;
}

body.dark .lp-panel-toggle {
    background: #1b2e4b;
    border-color: #1b2e4b;
    color: #888ea8;
}

/* Modo oscuro del editor */
body.dark .lp-editor {
    background: #060818;
}

body.dark .lp-topbar,
body.dark .lp-panel,
body.dark .lp-tabs {
    background: #0e1726;
    border-color: #1b2e4b;
}

body.dark .lp-back,
body.dark .lp-block,
body.dark .lp-serp {
    background: #1b2e4b;
    border-color: #1b2e4b;
    color: #e0e6ed;
}

body.dark .lp-title-wrap strong,
body.dark .lp-pane-title {
    color: #e0e6ed;
}

body.dark .lp-stage {
    background: #060818;
}

body.dark .lp-device-frame {
    border-color: #1b2e4b;
}

body.dark .lp-cover-preview {
    background: #1b2e4b;
    border-color: #3b3f5c;
}

body.dark .landing-card-item {
    background: #1b2e4b;
    border-color: #1b2e4b;
}

body.dark .landing-card-body strong {
    color: #e0e6ed;
}

/* Modo oscuro (toggle de tema CORK) */
body.dark .landing-item {
    background: #1b2e4b;
    border-color: #1b2e4b;
}

body.dark .landing-item:hover,
body.dark .landing-item.active {
    border-color: #4361ee;
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.25);
}

body.dark .landing-item strong {
    color: #e0e6ed;
}

body.dark .editor-surface {
    background: #0e1726;
    border-color: #1b2e4b;
}

body.dark .code-editor {
    background: #0e1726;
    color: #e0e6ed;
}
