/* ==========================================================================
   Live On-Site Visual Editor Stylesheet
   ========================================================================== */

#liveEditorBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #1E1E2D;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999999;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    font-family: 'Nunito', 'Quicksand', sans-serif;
    font-size: 0.9rem;
}

body.editor-active {
    padding-top: 60px !important;
}

body.editor-active .navbar {
    top: 60px !important;
}

.editor-bar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.editor-bar-brand .emoji {
    font-size: 1.4rem;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-editor {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-editor-primary {
    background: #7C4DFF;
    color: #FFFFFF;
}

.btn-editor-primary:hover {
    background: #651FFF;
    transform: translateY(-1px);
}

.btn-editor-success {
    background: #00E676;
    color: #1E1E2D;
}

.btn-editor-success:hover {
    background: #00C853;
}

.btn-editor-dark {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

.btn-editor-dark:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-editor-danger {
    background: rgba(255, 23, 68, 0.2);
    color: #FF5252;
}

.btn-editor-danger:hover {
    background: #FF1744;
    color: #FFFFFF;
}

/* Floating Trigger Button */
#liveEditorTrigger {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, #7C4DFF, #651FFF);
    color: #FFFFFF;
    border: none;
    padding: 12px 22px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

#liveEditorTrigger:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 14px 35px rgba(124, 77, 255, 0.6);
}

/* Edit Mode Visual Hints */
body.editing-enabled [contenteditable="true"] {
    outline: 2px dashed #7C4DFF !important;
    outline-offset: 4px;
    background: rgba(124, 77, 255, 0.04) !important;
    border-radius: 4px;
    cursor: text !important;
}

body.editing-enabled [contenteditable="true"]:focus {
    outline: 2px solid #00E676 !important;
    background: rgba(0, 230, 118, 0.08) !important;
}

/* Icon Click Highlight */
body.editing-enabled i,
body.editing-enabled .value-icon,
body.editing-enabled .info-icon,
body.editing-enabled .badge-icon-box {
    cursor: pointer !important;
    transition: transform 0.2s, outline 0.2s;
}

body.editing-enabled i:hover,
body.editing-enabled .value-icon:hover,
body.editing-enabled .info-icon:hover,
body.editing-enabled .badge-icon-box:hover {
    outline: 2px dashed #FF9100 !important;
    outline-offset: 4px;
    transform: scale(1.15);
}

/* Modals (SEO, Icon, Image) */
.editor-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 25, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}

.editor-modal-overlay.active {
    display: flex;
    animation: editorFadeIn 0.25s ease-out;
}

@keyframes editorFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.editor-modal-card {
    background: #FFFFFF;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    font-family: 'Nunito', 'Quicksand', sans-serif;
}

.editor-modal-card h3 {
    margin-bottom: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #1E1E2D;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-form-group {
    margin-bottom: 18px;
}

.editor-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4A4A68;
    margin-bottom: 6px;
}

.editor-form-group input,
.editor-form-group textarea,
.editor-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E4E6EF;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.editor-form-group input:focus,
.editor-form-group textarea:focus,
.editor-form-group select:focus {
    border-color: #7C4DFF;
    outline: none;
}

.editor-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Icon Grid in Icon Picker */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #F8F9FA;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    margin-bottom: 16px;
}

.icon-picker-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: #FFFFFF;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #DEE2E6;
    transition: all 0.2s;
}

.icon-picker-item:hover,
.icon-picker-item.selected {
    background: #7C4DFF;
    color: #FFFFFF;
    border-color: #7C4DFF;
    transform: scale(1.1);
}
