/* ============================================================
   LANDING PAGE ADMIN EDITOR (Task167b)
   ============================================================ */

/* Toolbar */
.lp-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--an-surface);
    border-bottom: 1px solid var(--an-border);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}
.lp-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--an-border);
    border-radius: 6px;
    background: var(--an-surface2);
    color: var(--an-text);
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, opacity .15s;
}
.lp-toolbar-btn:hover { background: var(--an-border); }
.lp-toolbar-btn:disabled { opacity: .5; cursor: not-allowed; }
.lp-toolbar-btn--primary { background: var(--an-accent); border-color: var(--an-accent); color: #fff; }
.lp-toolbar-btn--primary:hover { background: var(--an-accent-h); }
.lp-toolbar-sep { width: 1px; height: 24px; background: var(--an-border); margin: 0 0.25rem; }
.lp-draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #f59e0b;
    padding: 0.2rem 0.5rem;
    border: 1px solid #f59e0b44;
    border-radius: 12px;
    background: #f59e0b11;
}
.lp-feedback { font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 4px; }
.lp-feedback--ok  { color: #4ade80; }
.lp-feedback--err { color: #f87171; }

/* Editor layout */
.lp-editor-layout {
    display: grid;
    grid-template-columns: 180px 1fr 280px;
    height: calc(100vh - 110px);
    overflow: hidden;
}

/* Left sidebar */
.lp-sidebar {
    border-right: 1px solid var(--an-border);
    background: var(--an-surface);
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.lp-sidebar-section { display: flex; flex-direction: column; gap: 0.25rem; }
.lp-sidebar-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--an-text-muted);
    padding: 0.25rem 0.25rem 0.1rem;
}
.lp-add-section-btn { justify-content: center; }
.lp-sidebar-block-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--an-text-muted);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: background .1s, color .1s, border-color .1s;
}
.lp-sidebar-block-item:hover {
    background: var(--an-surface2);
    color: var(--an-text);
    border-color: var(--an-border);
}
.lp-sidebar-block-item:active {
    background: color-mix(in srgb, var(--an-accent) 12%, transparent);
    color: var(--an-accent);
}

/* Canvas */
.lp-canvas {
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.lp-canvas-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--an-text-muted);
    text-align: center;
    height: 100%;
}

/* Section row */
.lp-section-row { border: 1px solid var(--an-border); border-radius: 8px; background: var(--an-surface); overflow: hidden; }
.lp-section-row--selected { border-color: var(--an-accent); }
.lp-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--an-surface2);
    border-bottom: 1px solid var(--an-border);
    flex-wrap: wrap;
}
.lp-section-num { font-size: 0.8rem; font-weight: 600; color: var(--an-text-muted); min-width: 60px; }
.lp-cols-selector { display: flex; gap: 2px; }
.lp-cols-btn {
    width: 26px; height: 26px;
    border: 1px solid var(--an-border);
    border-radius: 4px;
    background: var(--an-surface);
    color: var(--an-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s;
}
.lp-cols-btn:hover { background: var(--an-surface2); color: var(--an-text); }
.lp-cols-btn--active { background: var(--an-accent) !important; color: #fff !important; border-color: var(--an-accent); }
.lp-select-sm {
    height: 26px; padding: 0 0.4rem; font-size: 0.75rem;
    border: 1px solid var(--an-border); border-radius: 4px;
    background: var(--an-surface); color: var(--an-text);
}
.lp-color-input {
    width: 32px; height: 26px; padding: 1px 2px;
    border: 1px solid var(--an-border); border-radius: 4px;
    cursor: pointer; background: none;
}
.lp-section-btns { display: flex; gap: 4px; margin-left: auto; }

/* Section canvas grid */
.lp-section-canvas { display: grid; gap: 0.5rem; padding: 0.75rem; min-height: 80px; }
.lp-section-canvas.lp-cols-1 { grid-template-columns: 1fr; }
.lp-section-canvas.lp-cols-2 { grid-template-columns: 1fr 1fr; }
.lp-section-canvas.lp-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.lp-section-canvas.lp-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* Block card */
.lp-block-card {
    border: 1px dashed var(--an-border);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    background: var(--an-bg);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
    min-height: 60px;
    display: flex; flex-direction: column; gap: 0.25rem;
}
.lp-block-card:hover { border-color: var(--an-accent); background: var(--an-surface); }
.lp-block-card--selected { border-color: var(--an-accent) !important; border-style: solid; }
.lp-block-card-preview { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--an-text); }
.lp-block-type-label { font-size: 0.75rem; color: var(--an-text-muted); }
.lp-block-card-hint { font-size: 0.72rem; color: var(--an-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-block-card-actions { position: absolute; top: 4px; right: 4px; display: none; }
.lp-block-card:hover .lp-block-card-actions { display: flex; gap: 2px; }
.lp-add-block-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 0.3rem; min-height: 60px;
    border: 1px dashed var(--an-border); border-radius: 6px;
    background: transparent; color: var(--an-text-muted); font-size: 0.8rem;
    cursor: pointer; transition: border-color .15s, color .15s; width: 100%;
}
.lp-add-block-btn:hover { border-color: var(--an-accent); color: var(--an-accent); }

/* Icon buttons */
.lp-icon-btn {
    width: 26px; height: 26px;
    border: 1px solid var(--an-border); border-radius: 4px;
    background: var(--an-surface); color: var(--an-text-muted);
    font-size: 0.75rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s, color .1s; padding: 0;
}
.lp-icon-btn:hover { background: var(--an-surface2); color: var(--an-text); }
.lp-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.lp-icon-btn--danger:hover { background: #7f1d1d22; color: #f87171; border-color: #f87171; }

/* Props panel */
.lp-props-panel {
    border-left: 1px solid var(--an-border);
    background: var(--an-surface);
    overflow-y: auto;
    display: flex; flex-direction: column;
}
.lp-props-panel--empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0.5rem; color: var(--an-text-muted);
    font-size: 0.85rem; padding: 2rem; text-align: center;
}
.lp-props-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--an-surface2); border-bottom: 1px solid var(--an-border);
    font-size: 0.85rem; position: sticky; top: 0; z-index: 5;
}
.lp-props-header strong { flex: 1; }
.lp-props-close { background: none; border: none; color: var(--an-text-muted); cursor: pointer; font-size: 0.8rem; padding: 2px; }
.lp-props-close:hover { color: var(--an-text); }
.lp-props-empty { display: flex; align-items: center; gap: 0.5rem; padding: 1rem; color: var(--an-text-muted); font-size: 0.82rem; }
.lp-props-panel .ob-prop-field { padding: 0.5rem 0.75rem 0; }
.lp-props-panel .ob-prop-field:last-child { padding-bottom: 0.75rem; }

/* Modal (block picker) */
.lp-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
}
.lp-modal {
    background: var(--an-surface); border: 1px solid var(--an-border); border-radius: 12px;
    width: min(460px, 95vw); max-height: 80vh;
    overflow: hidden; display: flex; flex-direction: column;
}
.lp-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--an-border); font-weight: 600;
}
.lp-modal-close { background: none; border: none; color: var(--an-text-muted); cursor: pointer; font-size: 1rem; padding: 2px 4px; }
.lp-modal-close:hover { color: var(--an-text); }
.lp-block-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 1rem; overflow-y: auto; }
.lp-block-picker-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--an-border); border-radius: 8px;
    background: var(--an-surface2); color: var(--an-text); font-size: 0.8rem;
    cursor: pointer; transition: border-color .15s, background .15s;
}
.lp-block-picker-item i { font-size: 1.4rem; color: var(--an-accent); }
.lp-block-picker-item:hover { border-color: var(--an-accent); background: var(--an-bg); }

/* Drawer (Branding / SEO) */
.lp-drawer-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    display: flex; justify-content: flex-end; z-index: 200;
}
.lp-drawer {
    width: min(380px, 95vw); height: 100%;
    background: var(--an-surface); border-left: 1px solid var(--an-border);
    display: flex; flex-direction: column; overflow: hidden;
}
.lp-drawer-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--an-border);
    font-size: 0.9rem; background: var(--an-surface2);
}
.lp-drawer-header strong { flex: 1; }
.lp-drawer-body { flex: 1; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }

/* SEO char counter */
.lp-char-counter { margin-left: 0.4rem; font-size: 0.7rem; color: var(--an-text-muted); font-weight: normal; }
.lp-char-counter--warn { color: #f87171; }
