/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Elements List Styles */
.elements-list {
    max-height: 300px;
    overflow-y: auto;
}

.element-item {
    padding: 8px 12px;
    margin: 5px 0;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
}

.element-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.element-item i {
    margin-right: 5px;
}

/* Canvas Styles */
.canvas-container {
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
}

.canvas {
    background-color: #fff;
    border: 1px dashed #dee2e6;
    border-radius: 5px;
    min-height: 90vh;
    padding: 20px;
    position: relative;
}

.canvas-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #adb5bd;
    font-size: 1.2rem;
}

/* Draggable Element Styles */
.draggable {
    position: relative;
    min-height: 30px;
    min-width: 50px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.draggable.selected {
    border: 1px dashed #0d6efd !important;
    position: relative;
}

.draggable:hover {
    outline: 1px dashed #adb5bd;
}

.draggable.dragging {
    opacity: 0.5;
}

.draggable::after {
    content: attr(data-element-type);
    position: absolute;
    top: 0;
    right: 0;
    background-color: #0d6efd;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 0 0 0 4px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 10;
}

.draggable:hover::after {
    opacity: 1;
}

/* Drop Target Styles */
.drop-target {
    border: 2px dashed #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.05);
}

/* Context Menu Styles */
.context-menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 180px;
}

.menu-item {
    padding: 8px 15px;
    cursor: pointer;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item i {
    margin-right: 8px;
    width: 15px;
    text-align: center;
}

/* Preview Styles */
.preview-container {
    margin: 0 auto;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background-color: white;
}

.preview-desktop {
    width: 100%;
    height: 60vh;
}

.preview-tablet {
    width: 768px;
    height: 60vh;
}

.preview-mobile {
    width: 375px;
    height: 60vh;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Code Preview Styles */
.code-preview {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9rem;
    white-space: pre;
    tab-size: 4;
}

/* Bootstrap Element Customizations */
[data-element-type="bs-container"] {
    padding: 15px;
    border: 1px dotted #adb5bd;
    min-height: 50px;
}

[data-element-type="bs-row"] {
    padding: 10px;
    border: 1px dotted #6c757d;
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
}

[data-element-type="bs-column"] {
    padding: 10px;
    border: 1px dotted #adb5bd;
    min-height: 30px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        height: auto;
        position: relative;
    }
    
    .canvas-container {
        height: auto;
    }
    
    .canvas {
        min-height: 50vh;
    }
}

/* Helper classes */
.drag-handle {
    cursor: move;
}