/* ============================================
   Live Editor UI (admin-only, injected by JS)
   ============================================ */

.le-has-bar { padding-top: 0; }

/* ---- Top toolbar ---- */
.le-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
    font-family: 'Jost', sans-serif;
}

.le-brand {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.le-brand span {
    color: #C89B54;
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 4px;
}

.le-actions { display: flex; align-items: center; gap: 10px; }

.le-btn {
    padding: 9px 18px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.le-btn:hover { background: rgba(255,255,255,0.1); }

.le-toggle.active {
    background: #C89B54;
    color: #1e293b;
    border-color: #C89B54;
}

.le-save {
    background: #10b981;
    border-color: #10b981;
}
.le-save:hover { background: #059669; }
.le-save:disabled { opacity: 0.4; cursor: not-allowed; }
.le-save.dirty { animation: lePulse 1.6s infinite; }

@keyframes lePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* push page down while bar is visible */
body.le-has-bar { margin-top: 56px; }
body.le-has-bar .navbar { top: 56px; }

/* ---- Edit mode highlights ---- */
.le-editable {
    outline: 1px dashed rgba(200,155,84,0.7);
    outline-offset: 3px;
    cursor: text;
    transition: outline-color 0.2s, background 0.2s;
    border-radius: 2px;
}
.le-editable:hover {
    outline-color: #C89B54;
    background: rgba(200,155,84,0.08);
}
.le-editable:focus {
    outline: 2px solid #C89B54;
    background: rgba(200,155,84,0.12);
}

.le-editable-img {
    cursor: pointer;
    position: relative;
    outline: 2px dashed rgba(200,155,84,0.8);
    outline-offset: -6px;
}
.le-editable-img::after {
    content: '📷 Click to replace';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30,41,59,0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
    white-space: nowrap;
}
.le-editable-img:hover::after { opacity: 1; }

.le-changed {
    outline-color: #10b981 !important;
}

/* ---- Theme panel ---- */
.le-theme-panel {
    position: fixed;
    top: 66px;
    right: 20px;
    width: 260px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    padding: 20px;
    z-index: 100001;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    font-family: 'Jost', sans-serif;
}
.le-theme-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}
.le-theme-panel h4 {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 16px;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
}
.le-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.le-color-row label { font-size: 0.85rem; color: #475569; }
.le-color-row input[type="color"] {
    width: 48px; height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}
.le-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.5;
}

/* ---- Toast ---- */
.le-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #fff;
    padding: 14px 26px;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    z-index: 100002;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.le-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.le-toast.error { background: #ef4444; }

@media (max-width: 600px) {
    .le-bar { flex-direction: column; height: auto; padding: 10px; gap: 8px; }
    .le-brand { font-size: 0.85rem; }
    .le-btn { padding: 7px 12px; font-size: 0.72rem; }
    body.le-has-bar { margin-top: 92px; }
    body.le-has-bar .navbar { top: 92px; }
    .le-theme-panel { top: 100px; right: 10px; left: 10px; width: auto; }
}
