/* Simplified Tool Cards Styles */

.tools-section {
  padding: 2rem 0;
}

/* Two-column layout: sidebar + content */
.tools-layout {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  align-items: flex-start;
}

.tools-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

.tools-content {
  flex: 1;
  min-width: 0;
}

.tool-selector-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tool-selector-btn:hover {
  border-color: #667eea;
  background: #f8f9fa;
  transform: translateX(4px);
}

.tool-selector-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

.tool-selector-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.tool-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  animation: fadeInCard 0.4s ease;
}

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

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.tool-card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f0f0f0;
  text-align: left;
}

.tool-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tool-card-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  text-align: left;
}

.tool-card-section {
  margin-bottom: 1rem;
  text-align: left;
}

.tool-card-section:last-child {
  margin-bottom: 0;
}

.tool-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  text-align: left;
}

.tool-inputs,
.tool-output {
  background: #f8f9fa;
  padding: 0.8rem;
  border-radius: 8px;
  border-left: 3px solid #667eea;
  text-align: left;
}

.tool-param {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
}

.tool-param:last-child {
  margin-bottom: 0;
}

.tool-param-name {
  font-family: 'Courier New', monospace;
  background: #667eea;
  color: white;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.4rem;
}

.tool-param-type {
  color: #888;
  font-style: italic;
}

.tool-code-example {
  background: #2d3748;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: left;
}

.tool-code-example code {
  color: #e2e8f0;
  background: none;
  padding: 0;
}

.tool-code-desc {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin-bottom: 0.8rem;
  text-align: left;
}

.tool-card-footer {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px solid #f0f0f0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  text-align: left;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.tool-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
  color: white;
}

.tool-link i {
  font-size: 0.9rem;
}

/* Filter and Search */
.tools-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.tools-search {
  flex: 1;
  min-width: 250px;
}

.tools-search input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.tools-search input:focus {
  outline: none;
  border-color: #667eea;
}

.tools-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #667eea;
  color: white;
}

.filter-btn.active {
  background: #667eea;
  color: white;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .tools-layout {
    flex-direction: column;
  }

  .tools-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tool-selector-btn {
    width: auto;
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
  }
}

@media screen and (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tool-card {
    padding: 1.2rem;
  }

  .tool-card-title {
    font-size: 1rem;
  }

  .tools-controls {
    flex-direction: column;
  }

  .tools-search {
    width: 100%;
  }

  .tool-card-footer {
    flex-direction: column;
  }

  .tool-link {
    width: 100%;
    justify-content: center;
  }

  .tools-sidebar {
    flex-direction: column;
  }

  .tool-selector-btn {
    width: 100%;
  }
}

/* Metadata Button */
.tool-metadata-btn {
  border: none;
  cursor: pointer;
}

/* Metadata Modal */
.tool-metadata-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tool-metadata-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tool-metadata-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f0f0f0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: #666;
  z-index: 10;
}

.tool-metadata-close:hover {
  background: #667eea;
  color: white;
  transform: rotate(90deg);
}

.tool-metadata-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-icon-large {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-metadata-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.tool-metadata-body {
  padding: 2rem;
}

.metadata-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.metadata-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.metadata-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 1rem;
}

.metadata-param {
  margin-bottom: 0.8rem;
  line-height: 1.6;
  color: #4a4a4a;
}

.metadata-param strong {
  color: #333;
  font-weight: 700;
}

.metadata-param em {
  color: #888;
  font-style: italic;
}

.metadata-list {
  margin: 0;
  padding-left: 1.5rem;
}

.metadata-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  color: #4a4a4a;
}

.metadata-demo {
  margin-bottom: 1.5rem;
}

.metadata-demo:last-child {
  margin-bottom: 0;
}

/* Empty State */
.tools-empty {
  text-align: center;
  padding: 3rem;
  color: #999;
  font-size: 1.1rem;
}

.tools-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.3;
}

/* Mobile adjustments for modal */
@media screen and (max-width: 768px) {
  .tool-metadata-modal {
    padding: 1rem;
  }

  .tool-metadata-content {
    max-height: 95vh;
  }

  .tool-metadata-header {
    padding: 1.5rem;
  }

  .tool-icon-large {
    font-size: 2rem;
  }

  .tool-metadata-header h2 {
    font-size: 1.4rem;
  }

  .tool-metadata-body {
    padding: 1.5rem;
  }
}
