/* ===========================
   ADMIN EDITOR STYLES
   =========================== */

/* Edit Buttons */
.edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--royal-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    font-size: 1.2rem;
}

.edit-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

.editable-container {
    position: relative;
    border: 2px dashed transparent;
    transition: border 0.3s;
}

.admin-mode .editable-container:hover {
    border-color: var(--accent-color);
}

/* Editor Modal */
.editor-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
}

.editor-modal.active {
    display: block;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.editor-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(3px);
}

.editor-backdrop.active {
    display: block;
}

.editor-form-group {
    margin-bottom: 1.5rem;
}

.editor-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.editor-form-group input,
.editor-form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.editor-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel {
    background: #eee;
    color: #333;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save {
    background: var(--royal-red);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* Add Image Button */
.add-gallery-btn {
    display: block;
    margin: 2rem auto;
    background: var(--accent-color);
    color: white;
    border: 2px dashed white;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.add-gallery-btn:hover {
    background: var(--royal-red);
    transform: translateY(-2px);
}

/* Image Preview */
.image-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-top: 0.5rem;
    border-radius: 5px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}