/* ========================================
   INLINE EDITOR STYLES
   ======================================== */

/* -----------------------------
   EDITOR PANEL
----------------------------- */
.editor-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.editor-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-header h3 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.btn-toggle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* -----------------------------
   EDITOR SECTIONS
----------------------------- */
.editor-section {
    margin-bottom: 20px;
}

.editor-section h4 {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px 0;
    opacity: 0.8;
}

.editor-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-edit {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    transform: translateX(5px);
}

.btn-save {
    background: #10B981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-save:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-preview {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 5px 0;
}

.btn-preview:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.btn-reset {
    background: #EF4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-reset:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

/* -----------------------------
   MODAL
----------------------------- */
.editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.editor-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-apply {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-apply:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* -----------------------------
   FORM ELEMENTS
----------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.form-group input[type="color"] {
    height: 50px;
    padding: 5px;
    cursor: pointer;
}

.form-group input[type="range"] {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* -----------------------------
   EDITABLE ELEMENTS
----------------------------- */
.editable-text {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editable-text:hover {
    background: rgba(147, 51, 234, 0.1);
    border-radius: 4px;
    padding: 4px;
}

.editable-text::after {
    content: '✏️';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.editable-text:hover::after {
    opacity: 1;
}

.editable-image {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editable-image:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.editable-image::after {
    content: '🖼️';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.editable-image:hover::after {
    opacity: 1;
}

.editable-video {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editable-video:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.editable-video::after {
    content: '🎥';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.editable-video:hover::after {
    opacity: 1;
}

/* -----------------------------
   HIGHLIGHTED ELEMENTS
----------------------------- */
.highlighted {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
    0%, 100% { outline-color: var(--primary); }
    50% { outline-color: var(--primary-light); }
}

/* -----------------------------
   NOTIFICATIONS
----------------------------- */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10002;
    animation: notification-slide 0.3s ease;
}

.notification-success {
    border-left: 4px solid #10B981;
}

.notification-error {
    border-left: 4px solid #EF4444;
}

.notification-info {
    border-left: 4px solid #3B82F6;
}

@keyframes notification-slide {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* -----------------------------
   RESPONSIVE DESIGN
----------------------------- */
@media (max-width: 768px) {
    .editor-panel {
        width: 280px;
        top: 10px;
        right: 10px;
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .editor-header h3 {
        font-size: 16px;
    }
    
    .btn-toggle {
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .editor-panel {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-apply,
    .btn-cancel {
        width: 100%;
    }
}

/* -----------------------------
   ACCESSIBILITY
----------------------------- */
@media (prefers-reduced-motion: reduce) {
    .editor-panel,
    .modal-content,
    .btn-toggle,
    .btn-edit,
    .btn-save,
    .btn-preview,
    .btn-reset,
    .btn-apply,
    .btn-cancel,
    .editable-text,
    .editable-image,
    .editable-video,
    .notification {
        transition: none;
        animation: none;
    }
    
    .highlighted {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.btn-toggle:focus,
.btn-edit:focus,
.btn-save:focus,
.btn-preview:focus,
.btn-reset:focus,
.btn-apply:focus,
.btn-cancel:focus,
.btn-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .editor-panel {
        background: #000000;
        border: 2px solid #ffffff;
    }
    
    .modal-content {
        background: #000000;
        border: 2px solid #ffffff;
    }
    
    .btn-toggle,
    .btn-save,
    .btn-preview,
    .btn-reset,
    .btn-apply {
        border: 2px solid #ffffff;
    }
}

