/**
 * Theme T&B — tools content UI.
 *
 * @package Theme_TB
 * @since 1.0.0
 */

.tb-tools-archive .tb-archive-hero,
.tb-tool-single .tb-entry-header {
  margin-bottom: var(--tb-space-xl);
}

.tb-card--tool .tb-card__media {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.08));
}

.tb-card__placeholder--tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  color: var(--tb-color-primary);
}

/* Single tool */
.tb-tool-single {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--tb-space-md);
}

.tb-tool-single-content {
  display: flex;
  flex-direction: column;
  gap: var(--tb-space-2xl);
}

.tb-tool-hero {
  display: grid;
  gap: var(--tb-space-xl);
  align-items: center;
  padding: var(--tb-space-xl);
  border: 1px solid var(--tb-color-border);
  border-radius: var(--tb-radius-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.04));
}

@media (min-width: 768px) {
  .tb-tool-hero {
    grid-template-columns: 1fr 160px;
  }
}

.tb-tool-hero__title {
  margin: 0 0 var(--tb-space-md);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.tb-tool-hero__media {
  justify-self: center;
  max-width: 160px;
}

.tb-tool-hero__image {
  width: 100%;
  height: auto;
  border-radius: var(--tb-radius-md);
}

.tb-tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tb-space-sm);
  margin-bottom: 0;
}

.tb-tool-embed {
  width: 100%;
}

.tb-tool-embed__frame {
  width: 100%;
  min-height: 500px;
  padding: var(--tb-space-lg);
  border: 1px solid var(--tb-color-border);
  border-radius: var(--tb-radius-lg);
  background: var(--tb-color-surface);
  overflow: hidden;
}

.tb-tool-embed__frame > * {
  width: 100% !important;
  max-width: 100% !important;
}

.tb-tool-embed__frame iframe,
.tb-tool-embed__frame canvas {
  width: 100% !important;
  min-height: 480px !important;
}

.tb-tool-description {
  padding: var(--tb-space-xl);
  border: 1px solid var(--tb-color-border);
  border-radius: var(--tb-radius-lg);
}

.tb-tool-description__content {
  line-height: var(--tb-leading-relaxed);
  color: var(--tb-color-text-muted);
}

.tb-related-tools {
  margin-top: var(--tb-space-2xl);
  padding-top: var(--tb-space-xl);
  border-top: 1px solid var(--tb-color-border);
}