/* HPF GUI Styles */
* {
  box-sizing: border-box;
}

.addon-display{
  display: flex;
  width: 100%;
}

task{
  display: inline-flex !important;
  flex-direction: column;
  width: 200px;
  height: 200px;
  padding: 10px;
  margin: 10px;
  cursor: pointer;
  justify-content: space-around !important;
  align-items: center !important;
}
task .task-name{
    transform: rotate(-5deg); /* Center and rotate slightly */
    background: linear-gradient(45deg, #FF6B6B, #556270); /* Cool gradient background */
    color: #fff; /* White text color */
    border-radius: 15px; /* Slightly rounded corners */
    text-align: center;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4); /* Subtle text shadow for depth */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 6px 6px rgba(0, 0, 0, 0.2); /* More pronounced box shadow */
    /* letter-spacing: 2px; */ /* A bit of letter spacing */
    animation: bounceIn 1s ease-out forwards; /* Simple animation for a cool entry */
    perspective: 1000px; /* For 3D transformations */
    padding: 5px;
    line-height: 13px;
}
task .task-description{
  color: #5a5a5a;
  transform: rotate(-5deg); /* Center and rotate slightly */
  background: linear-gradient(45deg, #3b3b3b78, #556270ad); /* Cool gradient background */
  color: #fff; /* White text color */
  border-radius: 15px; /* Slightly rounded corners */
  text-align: center;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4); /* Subtle text shadow for depth */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 6px 6px rgba(0, 0, 0, 0.2); /* More pronounced box shadow */
  animation: bounceIn 1s ease-out forwards; /* Simple animation for a cool entry */
  perspective: 1000px; /* For 3D transformations */
  padding: 5px;
  margin-top: 5px;
  line-height: 15px;
  font-size: 15px;
}

/* Enhanced Model Selector - Override existing dropdown styles */
.enhanced-model-selector .dropdown-content,
.enhanced-model-selector .dropdown-options {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  background: white !important;
  border: 2px solid #e5e7eb !important;
  border-top: 1px solid #d1d5db !important;
  border-radius: 0 0 12px 12px !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  z-index: 1001 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  display: none !important;
  padding: 0 !important;
  min-width: auto !important;
  max-width: none !important;
}

.enhanced-model-selector .dropdown-options.open {
  display: block !important;
}

/* Reset dropdown-option styles for our custom items */
.enhanced-model-selector .dropdown-option {
  padding: 0 !important;
  border-bottom: none !important;
  background: transparent !important;
  display: inline-block;
  width: 400px;
}

.enhanced-model-selector .dropdown-option:hover {
  background: transparent !important;
}

/* Group Headers */
.group-header {
  pointer-events: none !important;
  background: transparent !important;
  cursor: default !important;
}

.group-divider {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 12px 20px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-divider i {
  font-size: 14px;
  opacity: 0.7;
}

.models-group {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-bottom-color: #93c5fd;
}

/* Enhanced Items */
.enhanced-item {
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
  background: white;
  border-bottom: 1px solid #f1f5f9;
}

.enhanced-item:hover:not(.item-disabled) {
  background: #e1effd;
  transform: translateX(2px);
}

.enhanced-item.selected {
  background: #eff6ff;
  border-left-color: #2563eb;
}

.enhanced-item.item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.enhanced-item.item-disabled:hover {
  background: white;
  border-left-color: transparent;
  transform: none;
}

/* Item Layout */
.item-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.provider-badge {
  font-size: 10px;
  color: #4338ca;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #a5b4fc;
  flex-shrink: 0;
}

.tool-provider {
  color: #059669 !important;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
  border-color: #6ee7b7 !important;
}

.model-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pricing-badge {
  font-size: 10px;
  color: #065f46;
  font-weight: 600;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #6ee7b7;
  flex-shrink: 0;
}

/* Capabilities Line */
.capabilities-line {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.caps-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.caps-prefix {
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cap-tag {
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.cap-tag.input {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.cap-tag.output {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

/* Warning Text */
.warning-text {
  margin-top: 8px;
  font-size: 10px;
  color: #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #f87171;
  font-weight: 500;
}

/* Scrollbar */
.enhanced-model-selector .dropdown-content::-webkit-scrollbar,
.enhanced-model-selector .dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.enhanced-model-selector .dropdown-content::-webkit-scrollbar-track,
.enhanced-model-selector .dropdown-options::-webkit-scrollbar-track {
  background: #f9fafb;
}

.enhanced-model-selector .dropdown-content::-webkit-scrollbar-thumb,
.enhanced-model-selector .dropdown-options::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.enhanced-model-selector .dropdown-content::-webkit-scrollbar-thumb:hover,
.enhanced-model-selector .dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f6fa;
  margin: 0;
  padding: 0;
}

/* File drop component styles */
.hpf-filedrop {
  width: 100%;
}

.file-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 16px;
  position: relative;
}

.file-drop-zone:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.file-drop-zone.dragover {
  border-color: #10b981;
  background: #ecfdf5;
  border-style: solid;
  transform: scale(1.02);
}

.file-drop-zone.has-files {
  border-color: #10b981;
  background: #f0fdf4;
}

/* Override any conflicting file-drop-area styles */
.hpf-filedrop.file-drop-area {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  transform: none !important;
}

.hpf-filedrop.file-drop-area:hover {
  border: none !important;
  background: transparent !important;
  transform: none !important;
}

.hpf-filedrop.file-drop-area.dragover {
  border: none !important;
  background: transparent !important;
  transform: none !important;
}

/* Ensure no nested borders on content */
.file-drop-zone .drop-zone-content {
  border: none;
  background: transparent;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drop-icon {
  font-size: 32px;
  opacity: 0.7;
}

.drop-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

.drop-hint {
  font-size: 12px;
  color: #6b7280;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.log-files{
  flex-wrap: wrap;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-wrap: wrap;
}

.file-item:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.file-icon {
  font-size: 24px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.file-name {
  font-weight: 500;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: #6b7280;
}

.file-remove {
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.file-remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Dropdown Styles */
.hpf-dropdown {
  position: relative;
  display: block;
  width: 100%;
  min-width: 250px;
  margin-bottom: 15px;
}
.hpf-dropdown audio{
  display: block !important;
  background: red;
}

.dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  min-height: 48px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dropdown-selected:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.dropdown-selected:active {
  transform: translateY(0);
}

.dropdown-arrow {
  margin-left: 12px;
  transition: transform 0.2s ease;
  font-size: 14px;
  color: #6b7280;
  font-weight: bold;
  position: absolute;
  bottom: 0;
}

.horizontal{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
  color: #3b82f6;
  right: 0;
}

.dropdown-options {
  /* position: absolute; */
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  /* z-index: 1000; */
  display: none;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  /* display: flex; */
}

.dropdown-options.open {
  display: flex;
  animation: dropdownOpen 0.2s ease;
  flex-wrap: wrap;
}

@keyframes dropdownOpen {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.dropdown-option:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: translateX(4px);
}

.dropdown-option.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  /* color: white; */
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.dropdown-option.selected:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateX(2px);
}


/* General form styles */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
/*
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  transform: translateY(-2px);
}
*/

/* Input styles */
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* User Component Styles */
.user-component {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.user-info {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  min-width: 120px;
}

.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-actions .btn {
  /* padding: 8px 16px; */
  /* min-height: 36px; */
  /* font-size: 13px; */
}

.hide-user-btn .user-btn{
  display: none;
}

/* Modal and Popup Styles */
.modal-overlay, .hpf-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  /* animation: modalAppear 0.3s ease; */
}

.preview-image{
  max-width: 100px;
  max-height: 100px;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.json-thumbnail{
  cursor: 'pointer',
  padding: '2px',
  borderRadius: '4px',
  border: '1px solid #e1e5e9',
  backgroundColor: '#f8f9fa',
  display: 'flex',
  alignItems: 'center',
  justifyContent: 'center',
  minWidth: '24px',
  height: '24px',
  transition: 'all 0.2s ease'
}

/* Popup header with close icon */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.popup-close-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  user-select: none;
}

.popup-close-icon:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.1);
}

.popup-close-icon:active {
  transform: scale(0.95);
}

.modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  flex: 1;
}

.modal-form {
  margin-bottom: 24px;
  max-height: 900px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-form .form-input {
  margin-bottom: 16px;
}

.modal-form .form-input:last-child {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 100px;
}

/* User component button variations */
.login-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  /* color: white; */
}

.login-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.register-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  /* color: white; */
}

.register-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.logout-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  /* color: white; */
}

.logout-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.subscribe-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

log-files{
  display: flex;
  flex-wrap: wrap;
}

.subscribe-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* JSON Viewer Styles */
.json-viewer {
  width: 100%;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-family: 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  height: 100%;
  display: block;
  overflow: auto;
}

.json-viewers {
  padding: 16px;
  /* max-height: 400px; */
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 8px;
}

.json-item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 2px 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  min-height: 18px;
}

.json-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.json-toggle {
  cursor: pointer;
  user-select: none;
  min-width: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  margin-top: 1px;
}

.json-toggle:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 2px;
}

.json-indent {
  min-width: 12px;
  display: flex;
  align-items: center;
}

.json-key {
  color: #0969da;
  font-weight: 500;
  white-space: nowrap;
}

.json-value {
  color: #1f2937;
  word-break: break-all;
  flex: 1;
  text-align: left;
}

.json-end {
  color: #1f2937;
  font-weight: 500;
  margin: 2px 0;
  padding: 2px 4px;
  text-align: left;
}

/* Type-specific value colors matching Chrome DevTools */
.json-viewer .json-value[style*="#a31515"] {
  /* String values - red */
  color: #a31515 !important;
}

.json-viewer .json-value[style*="#0969da"] {
  /* Number and boolean values - blue */
  color: #0969da !important;
}

.json-viewer .json-value[style*="#808080"] {
  /* null and undefined values - gray */
  color: #808080 !important;
  font-style: italic;
}

/* Scrollbar styling for json-viewers */
.json-viewers::-webkit-scrollbar {
  width: 8px;
}

.json-viewers::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 4px;
}

.json-viewers::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.json-viewers::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

media_preview img{
  max-width: 100px;
  height: auto;
  max-height: 100px;
  width: auto;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .json-viewer {
    font-size: 12px;
  }
  
  .json-viewers {
    padding: 12px;
    max-height: 300px;
  }
  
  .json-item {
    padding-left: calc(var(--level, 0) * 15px) !important;
  }
}

