/* VSCode Layout Styles */

.vscode-layout {
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

.layout-zone {
  background-color: white;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  position: relative;
}

.layout-zone.navbar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #d0d7de;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.layout-zone.sidebar {
  background-color: #f6f8fa;
  border-right: 1px solid #d0d7de;
}

.layout-zone.asidebar {
  background-color: #f6f8fa;
  border-left: 1px solid #d0d7de;
}

.layout-zone.bottom {
  background-color: #f6f8fa;
  border-top: 1px solid #d0d7de;
}

.layout-zone.center {
  background-color: white;
}

/* Resize Handles */
.resize-handle {
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.resize-handle:hover {
  background-color: #0078d4;
}

.resize-handle-vertical {
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.resize-handle-horizontal {
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

.resize-handle-vertical:hover {
  border-left-color: #0078d4;
  border-right-color: #0078d4;
}

.resize-handle-horizontal:hover {
  border-top-color: #0078d4;
  border-bottom-color: #0078d4;
}

/* Zone Content Containers */
.zone-content {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zone-header {
  background-color: #f0f0f0;
  border-bottom: 1px solid #d0d7de;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #656d76;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zone-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Buttons in zone headers */
.zone-actions {
  display: flex;
  gap: 4px;
}

.zone-action-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #656d76;
  font-size: 12px;
}

.zone-action-btn:hover {
  background-color: #e0e0e0;
  color: #24292f;
}

/* Drag and Drop Indicators */
.drop-zone-indicator {
  position: absolute;
  border: 2px dashed #0078d4;
  background-color: rgba(0, 120, 212, 0.1);
  pointer-events: none;
  z-index: 1000;
}

.drop-zone-active {
  background-color: rgba(0, 120, 212, 0.05);
  border: 2px solid #0078d4;
}

/* Panel Tabs */
.zone-tabs {
  display: flex;
  background-color: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  min-height: 32px;
  overflow-x: auto;
}

.zone-tab {
  padding: 6px 12px;
  border-right: 1px solid #d0d7de;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #656d76;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.zone-tab:hover {
  background-color: #f0f0f0;
}

.zone-tab.active {
  background-color: white;
  color: #24292f;
  border-bottom: 2px solid #0078d4;
}

.zone-tab-close {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #656d76;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.zone-tab:hover .zone-tab-close {
  opacity: 1;
}

.zone-tab-close:hover {
  background-color: #e0e0e0;
  color: #24292f;
}

/* Empty zone states */
.empty-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #656d76;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.empty-zone-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-zone-text {
  margin-bottom: 8px;
  font-weight: 500;
}

.empty-zone-subtext {
  font-size: 12px;
  opacity: 0.7;
}

/* Animations */
.layout-zone {
  transition: all 0.2s ease;
}

.resize-handle {
  transition: all 0.1s ease;
}

/* Scrollbars */
.zone-content::-webkit-scrollbar,
.zone-tabs::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.zone-content::-webkit-scrollbar-track,
.zone-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.zone-content::-webkit-scrollbar-thumb,
.zone-tabs::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.zone-content::-webkit-scrollbar-thumb:hover,
.zone-tabs::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Enhanced Drop Zone Indicators */
.vscode-drop-indicator {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  animation: vscode-drop-fade-in 0.2s ease forwards;
}

.vscode-drop-indicator-top {
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
}

.vscode-drop-indicator-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
}

.vscode-drop-indicator-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
}

.vscode-drop-indicator-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
}

.vscode-drop-indicator-center {
  top: 25%;
  left: 25%;
  right: 25%;
  bottom: 25%;
}

.vscode-drop-indicator-content {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  backdrop-filter: blur(2px);
}

/* Enhanced Zone Container */
.vscode-zone-container {
  position: relative;
  background: var(--mantine-color-gray-0);
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 4px;
  overflow: hidden;
}

.vscode-zone-container.vscode-sidebar {
  border-right: 2px solid var(--mantine-color-gray-3);
}

.vscode-zone-container.vscode-asidebar {
  border-left: 2px solid var(--mantine-color-gray-3);
}

.vscode-zone-container.vscode-bottom {
  border-top: 2px solid var(--mantine-color-gray-3);
}

.vscode-zone-container.vscode-center {
  border: none;
  background: white;
}

/* Enhanced DockView Theme */
.vscode-dockview-enhanced {
  --dockview-tab-height: 35px;
  --dockview-tab-background: var(--mantine-color-gray-1);
  --dockview-tab-background-active: white;
  --dockview-tab-border: var(--mantine-color-gray-3);
  --dockview-tab-text: var(--mantine-color-gray-7);
  --dockview-tab-text-active: var(--mantine-color-gray-9);
}

.vscode-dockview-enhanced .dv-tab {
  background: var(--dockview-tab-background);
  border-right: 1px solid var(--dockview-tab-border);
  color: var(--dockview-tab-text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 120px;
  max-width: 200px;
}

.vscode-dockview-enhanced .dv-tab:hover {
  background: var(--mantine-color-gray-2);
}

.vscode-dockview-enhanced .dv-tab.dv-active {
  background: var(--dockview-tab-background-active);
  color: var(--dockview-tab-text-active);
  border-bottom: 2px solid var(--mantine-color-blue-6);
}

.vscode-dockview-enhanced .dv-tab-close-action {
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 3px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vscode-dockview-enhanced .dv-tab:hover .dv-tab-close-action {
  opacity: 1;
}

.vscode-dockview-enhanced .dv-tab-close-action:hover {
  background: var(--mantine-color-gray-4);
}

/* Drag indicators for tabs */
.vscode-dockview-enhanced .dv-tab.dv-dragging {
  opacity: 0.7;
  transform: rotate(2deg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

/* Group drag indicators */
.vscode-dockview-enhanced .dv-drop-target-dropzone {
  border: 2px dashed var(--mantine-color-blue-5) !important;
  background: rgba(59, 130, 246, 0.1) !important;
  border-radius: 4px;
}

.vscode-dockview-enhanced .dv-drop-target-dropzone::before {
  content: 'Soltar aquí';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--mantine-color-blue-6);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  z-index: 1001;
}

/* Animation keyframes */
@keyframes vscode-drop-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Panel content enhancements */
.vscode-dockview-enhanced .dv-content {
  background: white;
  border-top: 1px solid var(--mantine-color-gray-3);
}

/* Splitter enhancements */
.vscode-dockview-enhanced .dv-splitter {
  background: var(--mantine-color-gray-3);
  transition: background 0.2s ease;
}

.vscode-dockview-enhanced .dv-splitter:hover {
  background: var(--mantine-color-blue-5);
}

/* Group enhancements */
.vscode-dockview-enhanced .dv-group {
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 4px;
  overflow: hidden;
}

.vscode-dockview-enhanced .dv-group:focus-within {
  border-color: var(--mantine-color-blue-5);
  box-shadow: 0 0 0 1px var(--mantine-color-blue-5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .layout-zone.sidebar,
  .layout-zone.asidebar {
    min-width: 200px;
  }

  .layout-zone.bottom {
    min-height: 150px;
  }

  .zone-tab {
    padding: 4px 8px;
    font-size: 11px;
  }

  .vscode-dockview-enhanced .dv-tab {
    min-width: 80px;
    max-width: 120px;
    font-size: 12px;
  }
}