/* Inline Editor Styles */

/* Edit Mode Indicator */
body.edit-mode::before {
    content: "Edit Mode";
    position: fixed;
    top: 80px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Editable Elements */
.editable {
    position: relative;
    cursor: pointer;
    transition: outline 0.2s ease, background 0.2s ease;
}

body.edit-mode .editable:hover {
    outline: 2px dashed #3498db;
    outline-offset: 4px;
    background: rgba(52, 152, 219, 0.05);
}

body.edit-mode .editable:focus {
    outline: 2px solid #3498db;
    outline-offset: 4px;
    background: rgba(52, 152, 219, 0.08);
}

/* Editor Toolbar */
.editor-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    flex-wrap: wrap;
    max-width: 90vw;
}

.editor-toolbar.hidden {
    display: none;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-label {
    color: #bdc3c7;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.toolbar-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #34495e;
    color: white;
    font-size: 13px;
    text-align: center;
}

.toolbar-input:focus {
    outline: none;
    border-color: #3498db;
}

.toolbar-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.toolbar-btn-primary {
    background: #27ae60;
    color: white;
}

.toolbar-btn-primary:hover {
    background: #2ecc71;
}

.toolbar-btn-secondary {
    background: #7f8c8d;
    color: white;
}

.toolbar-btn-secondary:hover {
    background: #95a5a6;
}

.toolbar-btn-danger {
    background: #c0392b;
    color: white;
}

.toolbar-btn-danger:hover {
    background: #e74c3c;
}

/* Floating Style Panel */
.style-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 10001;
    width: 280px;
    max-height: 80vh;
    overflow-y: auto;
}

.style-panel.hidden {
    display: none;
}

.style-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.style-control {
    margin-bottom: 15px;
}

.style-control label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 500;
}

.style-control input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.style-control .value-display {
    font-size: 12px;
    color: #3498db;
    text-align: right;
}

.style-control input[type="text"],
.style-control textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.style-control textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.style-panel-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.style-panel-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.style-panel-buttons .apply-btn {
    background: #3498db;
    color: white;
}

.style-panel-buttons .close-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

/* Save Notification */
.save-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 10002;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.save-notification.error {
    background: #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Edit Button (Enable Edit Mode) */
.edit-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-mode-toggle:hover {
    background: #2980b9;
}

.edit-mode-toggle.active {
    background: #e74c3c;
}

.edit-mode-toggle svg {
    width: 18px;
    height: 18px;
}
