.rails-den-onebox {
  width: min(100%, 720px);
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid var(--rails-den-border);
  border-radius: var(--rails-den-radius);
  background: var(--rails-den-surface-raised);
}

.rails-den-onebox-link {
  display: flex;
  color: inherit;
  text-decoration: none;
}

.rails-den-onebox-link:hover {
  background: rgba(255, 255, 255, 0.025);
}

.rails-den-onebox-content {
  min-width: 0;
  flex: 1 1 auto;
  padding: 16px 18px;
}

.rails-den-onebox-image {
  width: 180px;
  min-height: 120px;
  flex: 0 0 180px;
  overflow: hidden;
  background: var(--rails-den-surface-input);
}

.rails-den-onebox-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rails-den-onebox-provider {
  color: var(--rails-den-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rails-den-onebox-title {
  margin-top: 5px;
  color: var(--rails-den-text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.rails-den-onebox-description {
  margin-top: 7px;
  color: var(--rails-den-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.rails-den-onebox-meta {
  margin-top: 10px;
  color: var(--rails-den-muted);
  font-size: 0.8rem;
}

.rails-den-onebox-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.rails-den-onebox-embed-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.rails-den-onebox-embed-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rails-den-onebox-embed-link {
  min-width: 0;
  overflow: hidden;
  color: var(--rails-den-text);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rails-den-onebox-embed-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .rails-den-onebox-link {
    display: block;
  }

  .rails-den-onebox-image {
    width: 100%;
    height: 180px;
  }

  .rails-den-onebox-embed-footer {
    display: block;
  }

  .rails-den-onebox-embed-footer .rails-den-onebox-provider {
    margin-top: 6px;
  }
}