/* shakti-editor.css - Elementor-Style Sidebar UI */

:root {
    --editor-bg: #0d0d0d;
    --editor-border: #d4af37;
    --editor-accent: rgba(212, 175, 55, 0.2);
    --editor-text: #fff;
}

/* Sidebar Container */
#shakti-editor-sidebar {
    position: fixed;
    top: 0;
    left: -350px; /* Hidden by default */
    width: 350px;
    height: 100vh;
    background-color: var(--editor-bg);
    border-right: 1px solid var(--editor-border);
    z-index: 99999;
    transition: left 0.3s ease;
    box-shadow: 5px 0 20px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: var(--editor-text);
}

#shakti-editor-sidebar.open {
    left: 0;
}

/* Sidebar Header */
.shakti-editor-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
}

.shakti-editor-header h2 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--editor-border);
}

.shakti-editor-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.shakti-editor-close:hover {
    color: #fff;
}

/* Sidebar Body */
.shakti-editor-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.shakti-editor-group {
    margin-bottom: 20px;
}

.shakti-editor-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shakti-editor-group textarea,
.shakti-editor-group input {
    width: 100%;
    background-color: #050505;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 150px;
    box-sizing: border-box;
}

.shakti-editor-group input {
    min-height: auto;
}

.shakti-editor-group textarea:focus,
.shakti-editor-group input:focus {
    border-color: var(--editor-border);
    outline: none;
}

/* Sidebar Footer */
.shakti-editor-footer {
    padding: 20px;
    border-top: 1px solid #333;
    background: #111;
    display: flex;
    gap: 10px;
}

.shakti-editor-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.shakti-editor-btn-primary {
    background-color: var(--editor-border);
    color: #000;
}

.shakti-editor-btn-primary:hover {
    background-color: #f3ca46;
}

.shakti-editor-btn-secondary {
    background-color: #333;
    color: #fff;
}

.shakti-editor-btn-secondary:hover {
    background-color: #ff4c4c;
}

/* Page Overlay when editing */
.shakti-editor-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    display: none;
}
.shakti-editor-overlay.active {
    display: block;
}

/* Editable Elements Highlight on Hover */
body.shakti-admin-active [data-edit-id] {
    transition: outline 0.2s, background-color 0.2s;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%23d4af37"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>') 0 24, pointer;
}

body.shakti-admin-active [data-edit-id]:hover {
    outline: 2px dashed var(--editor-border) !important;
    background-color: var(--editor-accent);
}

body.shakti-admin-active [data-edit-id].editing-active {
    outline: 2px solid var(--editor-border) !important;
    background-color: var(--editor-accent);
}

/* Floating Edit Toggle (Optional, can be hidden if we just rely on session) */
#shakti-edit-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--editor-border);
    color: #000;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 99997;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
