/* Event Designer - Main Styles */

:root {
    --sidebar-width: 260px;
    --properties-width: 280px;
    --toolbar-height: 56px;
    --statusbar-height: 40px;
}

body {
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Layout */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebars */
.sidebar-left,
.sidebar-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-left {
    width: var(--sidebar-width);
}

.sidebar-right {
    width: var(--properties-width);
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    background-image:
        linear-gradient(45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(-45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e9ecef 75%),
        linear-gradient(-45deg, transparent 75%, #e9ecef 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#editor-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Canvas Controls */
.canvas-controls {
    z-index: 100;
}

.canvas-controls .btn {
    min-width: 40px;
}

/* Status Bar */
.status-bar {
    height: var(--statusbar-height);
    font-size: 0.8rem;
}

/* Element Library */
#element-library .accordion-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

#element-library .accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0c63e4;
}

#element-library .accordion-body {
    padding: 0;
}

.element-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: grab;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

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

.element-item:active {
    cursor: grabbing;
}

.element-item .element-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.7rem;
    color: white;
    flex-shrink: 0;
}

.element-item .element-preview-icon {
    background-color: transparent;
    border: 1px solid #dee2e6;
}

.element-item .element-preview-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.element-item .element-info {
    flex: 1;
    min-width: 0;
}

.element-item .element-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.element-item .element-size {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Properties Panel */
#element-properties .form-label {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

/* Drag Ghost */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
    transform: translate(-50%, -50%);
}

/* Scrollbar Styling */
.overflow-auto::-webkit-scrollbar {
    width: 8px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar-left,
    .sidebar-right {
        position: absolute;
        top: var(--toolbar-height);
        bottom: var(--statusbar-height);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar-left.show {
        transform: translateX(0);
    }

    .sidebar-right {
        right: 0;
        transform: translateX(100%);
    }

    .sidebar-right.show {
        transform: translateX(0);
    }
}
