/* Mode toggle button styles */
.mode-toggle-container {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.mode-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mode-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mode-toggle-btn.edit-mode {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#modeIcon {
    font-size: 20px;
}

/* Editable content styles */
.editable-content {
    transition: all 0.2s ease;
}

.editable-content[contenteditable="false"] {
    cursor: default;
}

.editable-content[contenteditable="true"] {
    cursor: text;
}

.editable-content[contenteditable="true"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 4px;
    padding: 8px;
    border-radius: 4px;
    background-color: rgba(102, 126, 234, 0.15);
}

/* Drag and drop styles */
.editable-content {
    position: relative;
}

.editable-content.dragging {
    opacity: 0.5;
    background-color: rgba(102, 126, 234, 0.2);
    user-select: none;
}

.editable-content.drag-over {
    border-top: 3px solid #667eea;
}

/* Drag handle */
.drag-handle {
    display: none;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    line-height: 24px;
    border-radius: 4px;
    cursor: grab;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

/* Show drag handle only in edit mode */
.edit-mode-enabled .drag-handle {
    display: inline-block;
    opacity: 0.6;
}

.edit-mode-enabled .editable-content:hover .drag-handle {
    opacity: 0.8;
}

.edit-mode-enabled .drag-handle:hover {
    opacity: 1;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.edit-mode-enabled .drag-handle:active {
    cursor: grabbing;
}

#content {
    position: relative;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

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

.notification-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-error {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.notification-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* CMS Button styles (frontend) */
.button-container {
    margin: 16px 0;
}

.cms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cms-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cms-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mode-toggle-container {
        padding: 15px;
    }

    .mode-toggle-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    #modeIcon {
        font-size: 18px;
    }

    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .button-container {
        text-align: center !important;
    }

    .button-container > div {
        justify-content: center !important;
    }
}
