/* Admin Editor Styles */

/* Editable element highlights */
.admin-edit-mode .admin-editable {
    cursor: pointer;
    transition: outline 0.2s ease, box-shadow 0.2s ease;
}

.admin-edit-mode .admin-editable:hover {
    outline: 2px dashed #0097F4;
    outline-offset: 2px;
}

.admin-edit-mode .admin-editable.admin-selected {
    outline: 2px solid #0097F4 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 151, 244, 0.2);
}

.admin-edit-mode .admin-editable.admin-editing {
    outline: 2px solid #28a745;
    outline-offset: 2px;
    background: rgba(40, 167, 69, 0.05);
}

.admin-edit-mode .admin-text-editable::before {
    content: '✏️ ' attr(data-edit-type);
    position: absolute;
    top: -25px;
    left: 0;
    background: #0097F4;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.admin-edit-mode .admin-text-editable:hover::before {
    opacity: 1;
}

.admin-edit-mode img.admin-editable {
    position: relative;
}

.admin-edit-mode img.admin-editable::after {
    content: '🖼️ Image';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 151, 244, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.admin-edit-mode img.admin-editable:hover::after {
    opacity: 1;
}

/* Admin Toolbar */
.admin-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.admin-toolbar .toolbar-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-toolbar .toolbar-title {
    font-weight: 700;
    color: #00d4ff;
}

.admin-toolbar .toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.admin-toolbar .toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.admin-toolbar .toolbar-btn-danger {
    background: rgba(220, 53, 69, 0.3);
}

.admin-toolbar .toolbar-btn-danger:hover {
    background: rgba(220, 53, 69, 0.5);
}

.admin-toolbar .admin-username {
    background: rgba(0, 212, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Property Editor Panel */
.property-editor {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    font-family: 'Montserrat', sans-serif;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.property-editor.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.property-editor-header {
    background: linear-gradient(135deg, #0097F4 0%, #0066cc 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.property-editor-title {
    font-weight: 700;
    font-size: 16px;
}

.property-editor-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.property-editor-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.property-editor-content {
    padding: 20px;
}

.editor-section {
    margin-bottom: 24px;
}

.editor-section h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 700;
    color: #0097F4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.editor-field {
    margin-bottom: 16px;
}

.editor-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.editor-field input[type="text"],
.editor-field input[type="number"],
.editor-field input[type="url"],
.editor-field select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.editor-field input:focus,
.editor-field select:focus {
    outline: none;
    border-color: #0097F4;
}

.editor-field input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.editor-field input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.editor-field input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px dashed #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.editor-field input[type="file"]:hover {
    border-color: #0097F4;
}

.btn-group {
    display: flex;
    gap: 4px;
}

.btn-option {
    flex: 1;
    padding: 8px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s ease;
}

.btn-option:hover {
    background: #e0e0e0;
    border-color: #0097F4;
}

.btn-option:active {
    background: #0097F4;
    color: white;
}

.btn-editor-action {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0097F4 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.btn-editor-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 151, 244, 0.4);
}

.btn-editor-action.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-editor-action.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.image-preview {
    max-width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Notifications */
.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    z-index: 10002;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.admin-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Admin badge for editable elements */
.admin-edit-mode::before {
    content: '🔒 Admin Mode';
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #0097F4 0%, #0066cc 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 151, 244, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-toolbar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        padding: 10px 16px;
        font-size: 12px;
        gap: 10px;
    }
    
    .admin-toolbar .toolbar-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .property-editor {
        right: 10px;
        left: 10px;
        width: auto;
        top: 60px;
        max-height: calc(100vh - 140px);
    }
}
