/* LLM Tasker specific type styles */

/* Action Button Styles */
.action-button {
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form Field Group Styles */
.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field-group .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field-group .form-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.form-field-group .form-input {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.form-field-group .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field-group .help-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

/* Prompt specific styling */
.prompt-group .form-input {
  min-height: 100px;
  resize: vertical;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Enhanced Flow Node Styles */
.flow-node-enhanced {
  cursor: move;
  user-select: none;
}

/* Node type specific styles */
.node-type-regular {
  /* Default styling handled by SVG */
}

.node-type-task {
  /* Task node styling */
}

.node-type-task .node-title {
  font-weight: bold;
}

.node-type-trigger {
  /* Trigger node styling */
}

.node-type-trigger .node-title {
  font-style: italic;
}

/* Drop zone highlighting for tools */
.flow-node-enhanced.drop-zone-active {
  filter: brightness(1.1);
}

.flow-node-enhanced.tool-added {
  animation: toolAdded 0.5s ease;
}

/* model popup */
/* Modal Base Styles */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 90vw;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modal Header */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: 20px 24px; */
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.popup-close-icon {
  cursor: pointer;
  font-size: 24px;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.popup-close-icon:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Modal Body */
.popup-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Form Elements */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  margin-bottom: 16px;
  box-sizing: border-box;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group > div:first-child {
  font-weight: 500;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

/* Dropdown Styles */
.hpf-dropdown {
  /* position: relative; */
  /* width: 100%; */
  /* margin-bottom: 16px; */
}

.dropdown-selected {
  padding: 12px 40px 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #374151;
}

.dropdown-selected:hover {
  border-color: #d1d5db;
}

.hpf-dropdown.open .dropdown-selected,
.dropdown-selected:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.dropdown-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
}

.dropdown-options.open {
  display: block;
}

.dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background: #f8fafc;
}

.dropdown-option:active {
  background: #e2e8f0;
}

/* Model Info Styles */
.model-info {
  padding: 0;
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.model-name-section {
  flex: 1;
}

.model-api {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-name {
  font-weight: 500;
  color: #111827;
  font-size: 14px;
}

.model-pricing {
  font-size: 12px;
  color: #059669;
  font-weight: 500;
  background: #ecfdf5;
  padding: 4px 8px;
  border-radius: 4px;
}

.model-capabilities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.caps-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.capability-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.capability-badge.input {
  background: #dbeafe;
  color: #1e40af;
}

.capability-badge.output {
  background: #d1fae5;
  color: #065f46;
}

.capability-badge.selected {
  background: #fbbf24;
  color: #92400e;
}

.model-warning {
  font-size: 11px;
  color: #d97706;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #f59e0b;
}

.model-disabled {
  opacity: 0.8;
}

.selected {
  background: #fffbeb !important;
  border-left-color: #f59e0b !important;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  /* padding: 20px 24px; */
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Scrollbar Styling */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.popup-body::-webkit-scrollbar {
  width: 8px;
}

.popup-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.popup-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 640px) {
  .modal {
    min-width: auto;
    width: 95vw;
    margin: 0 2.5vw;
  }
  
  .popup-header,
  .popup-body,
  .modal-actions {
    padding: 16px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .btn {
    /* width: 100%; */
  }
}
/* end model popup */

@keyframes toolAdded {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-field-group {
    gap: 0.75rem;
  }
  
  .action-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .form-field-group .form-input {
    font-size: 1rem; /* Larger for mobile */
  }
}