/* Live Edit Feature Styles */

/* Section Highlighting */
.live-edit-section {
    position: relative;
    transition: outline 0.2s ease;
}

.live-edit-section:hover {
    outline: 2px dashed rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
}

.live-edit-section.active {
    outline: 2px solid rgba(13, 110, 253, 0.8);
    outline-offset: 2px;
    background-color: rgba(13, 110, 253, 0.05);
}

/* Edit Button */
.live-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1000;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
}

.live-edit-section:hover .live-edit-btn,
.live-edit-section.active .live-edit-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.live-edit-btn:hover {
    background: #0b5ed7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.live-edit-btn i {
    font-size: 14px;
}

/* Section Info Badge */
.live-edit-info {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.live-edit-section:hover .live-edit-info,
.live-edit-section.active .live-edit-info {
    opacity: 1;
}

/* Edit Modal */
.live-edit-modal .modal-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    border-bottom: none;
}

.live-edit-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.live-edit-modal .form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.live-edit-modal .form-control,
.live-edit-modal .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 10px 12px;
}

.live-edit-modal .form-control:focus,
.live-edit-modal .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.live-edit-modal .btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
    border-radius: 6px;
    padding: 10px 24px;
    font-weight: 500;
}

.live-edit-modal .btn-primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
}

.live-edit-modal .btn-secondary {
    border-radius: 6px;
    padding: 10px 24px;
}

/* Color Picker Preview */
.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

/* Loading State */
.live-edit-loading {
    opacity: 0.6;
    pointer-events: none;
}

.live-edit-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0d6efd;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.live-edit-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #198754;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .live-edit-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .live-edit-info {
        font-size: 10px;
        padding: 3px 6px;
    }
}
