/**
 * KRA - Auto Code Generator Page Styles
 */

.warningBar {
  margin-bottom: 16px;
}

.sectionCard {
  margin-bottom: 16px;
}

.aiSection {
  position: relative;
}

.aiButtons {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 8px;
}

.toolbar {
  margin-bottom: 16px;
}

.actionBar {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.expertSection {
  padding: 16px;
}

.settingGroup {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;

  &:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  h4 {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
  }
}

.codePreview {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 4px;
  overflow: auto;
  max-height: calc(100vh - 200px);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.fieldTable {
  :global {
    .ant-table-row {
      &:hover {
        .dragHandle {
          color: #1890ff;
        }
      }
    }
  }
}

.dragHandle {
  cursor: move;
  color: #999;
  transition: color 0.2s;

  &:hover {
    color: #1890ff;
  }

  &:active {
    color: #096dd9;
  }
}

.expertCollapse {
  :global {
    .ant-collapse-header {
      padding: 12px 0 !important;
    }
    
    .ant-collapse-content-box {
      padding: 0 !important;
    }
  }
}

// Dark mode support
:global(.ant-layout-content[data-theme='dark']) {
  .settingGroup {
    border-color: #303030;

    h4 {
      color: rgba(255, 255, 255, 0.85);
    }
  }
  
  .dragHandle {
    color: #666;
    
    &:hover {
      color: #177ddc;
    }
  }
}
