/**
 * UI Builder Styles
 * Version: 1.0.0
 */

#ui-builder-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ui-builder-toolbox {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 15px;
}

.dark .ui-builder-toolbox {
    background: #1f2937;
    border-color: #374151;
}

.toolbox-category {
    margin-bottom: 20px;
}

.toolbox-category-title {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dark .toolbox-category-title {
    color: #9ca3af;
}

.toolbox-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toolbox-item {
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.toolbox-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.dark .toolbox-item {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .toolbox-item:hover {
    background: #4b5563;
}

.ui-builder-canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: auto;
}

#ui-builder-canvas {
    flex: 1;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 500px;
    position: relative;
}

.dark #ui-builder-canvas {
    background: #1f2937;
    border-color: #374151;
}

.ui-control-wrapper {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ui-control-wrapper:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.ui-control-wrapper.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.dark .ui-control-wrapper {
    background: #374151;
    border-color: #4b5563;
}

.dark .ui-control-wrapper.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.control-drag-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px;
    background: #f8f9fa;
    border-radius: 3px;
    margin-bottom: 8px;
    cursor: move;
    font-size: 12px;
    color: #6c757d;
}

.dark .control-drag-handle {
    background: #1f2937;
    color: #9ca3af;
}

.control-label {
    font-weight: 600;
    margin-left: 4px;
}

.control-delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
}

.control-delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

.control-content {
    padding: 4px;
}

.ui-builder-properties {
    width: 300px;
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 15px;
}

.dark .ui-builder-properties {
    background: #1f2937;
    border-color: #374151;
}

.property-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
}

.dark .property-panel-empty {
    color: #9ca3af;
}

.property-section {
    margin-bottom: 20px;
}

.property-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
}

.dark .property-section-title {
    color: #e5e7eb;
    border-color: #374151;
}

.property-field {
    margin-bottom: 12px;
}

.property-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 4px;
}

.dark .property-field label {
    color: #9ca3af;
}

.property-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.property-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.dark .property-input {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .property-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.property-checkbox {
    margin-right: 6px;
}

.ui-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.dark .ui-control {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.ui-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ui-button-primary {
    background: #0d6efd;
    color: white;
}

.ui-button-primary:hover {
    background: #0b5ed7;
}

.ui-button-secondary {
    background: #6c757d;
    color: white;
}

.ui-button-success {
    background: #198754;
    color: white;
}

.ui-button-danger {
    background: #dc3545;
    color: white;
}

.ui-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ui-builder-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.dark .ui-builder-toolbar {
    background: #1f2937;
    border-color: #374151;
}

.ui-builder-toolbar select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.dark .ui-builder-toolbar select {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.ui-builder-toolbar button {
    padding: 6px 12px;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.ui-builder-toolbar button:hover {
    background: #0b5ed7;
}

.grid-stack-item-content {
    overflow: visible !important;
}
