/* Editor Styles - only active when body.edit-mode */

/* Editable elements */
body.edit-mode [data-editable] {
    outline: 2px dashed transparent;
    outline-offset: 4px;
    transition: outline-color 0.2s, background-color 0.2s;
    cursor: text;
    min-height: 1em;
}

body.edit-mode [data-editable]:hover {
    outline-color: var(--color-primary);
    background-color: rgba(0, 128, 200, 0.05);
}

body.edit-mode [data-editable]:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 4px;
    background-color: rgba(34, 197, 94, 0.08);
}

body.edit-mode [data-editable].modified {
    background: linear-gradient(to bottom, transparent 60%, rgba(250, 204, 21, 0.3) 60%);
}

/* Section hover */
body.edit-mode main section {
    position: relative;
    transition: box-shadow 0.3s;
}

body.edit-mode main section:hover {
    box-shadow: inset 0 0 0 2px rgba(30, 58, 95, 0.15);
}

/* Section controls */
.section-controls {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 0.4rem;
    z-index: 100;
}

body.edit-mode .section-controls {
    display: flex;
}

.section-controls button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.section-controls button:hover {
    opacity: 1;
}

/* Editor toolbar (bottom bar) */
.editor-toolbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    padding: 0.75rem 2rem;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

body.edit-mode .editor-toolbar {
    display: block;
}

body.edit-mode {
    padding-bottom: 60px;
}

.editor-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-btn-save {
    background: var(--color-secondary);
    color: #fff;
}

.editor-btn-save:hover {
    filter: brightness(1.1);
}

.editor-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.editor-btn-exit {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.editor-btn-exit:hover {
    color: #fff;
    border-color: #fff;
}

/* Hide login gear in edit mode */
body.edit-mode .admin-login-link {
    display: none;
}

/* Hide login modal in edit mode */
body.edit-mode #loginModal {
    display: none !important;
}
