/* —— Actions —— */
.actions-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 12px;
}

.action-card-small {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(var(--black-rgb), 0.06);
}

.action-card-small:hover {
  border-color: var(--button-primary, var(--primary-color));
}

.action-card-small.selected {
  border: 2px solid var(--button-primary, var(--primary-color));
}

.action-card-custom {
  display: block;
  text-decoration: none;
  color: inherit;
  border-style: dashed;
  box-shadow: none;
}

.action-card-custom .action-card-small-description {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.action-card-custom-cta {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-secondary);
}

.action-card-custom:hover .action-card-custom-cta {
  text-decoration: underline;
}

.action-card-small-title {
  margin: 0 0 6px;
  font-size: 1.05em;
  font-weight: 600;
  color: var(--text-primary);
}

.action-card-small-description {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 0.88em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-card-small-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.status-indicator.activated {
  background: var(--badge-ok-bg);
  color: var(--badge-ok-text);
}

.pricing-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.pricing-badge.free {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}

.pricing-badge.paid {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-text);
}

.action-detail-content {
  width: 100%;
  max-width: 960px;
  background: var(--surface-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(var(--black-rgb), 0.08);
  padding: 32px;
  box-sizing: border-box;
  position: relative;
}

.action-detail-header {
  position: relative;
}

.action-detail-header-with-expand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.action-detail-heading {
  min-width: 0;
  flex: 1;
}

.action-detail-header h2 {
  margin: 0 0 8px;
  color: var(--secondary-color, var(--text-primary));
}

.action-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.action-long-description {
  margin: 16px 0 24px;
}

.action-long-copy p {
  margin: 0 0 0.8em;
  line-height: 1.55;
}

.action-long-copy p:last-child {
  margin-bottom: 0;
}

.action-long-description-with-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 8px 28px;
  align-items: start;
}

.action-example-image {
  margin: 0;
  max-width: 300px;
}

.action-example-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-white);
}

.action-example-image figcaption {
  margin-top: 8px;
  font-size: 0.82em;
  color: var(--text-secondary);
}

.action-example-image a {
  display: block;
}

.action-external-link {
  margin: 16px 0 0;
}

.action-external-link .download-button {
  width: auto;
}

@media (max-width: 720px) {
  .action-long-description-with-image {
    grid-template-columns: 1fr;
  }

  .action-example-image {
    max-width: 240px;
  }
}

/* IDS checkers: upload IFC first, then pick IDS */
.ids-file-first .ids-cascade,
.ids-file-first .ids-run,
.idswasm-file-first .idswasm-cascade,
.idswasm-file-first .idswasm-run {
  display: none;
}

.ids-file-first:has(input[name="model_file"]:valid) .ids-cascade,
.idswasm-file-first:has(input[name="model_file"]:valid) .idswasm-cascade {
  display: block;
}

.ids-file-first:has(input[name="model_file"]:valid) .ids-run,
.idswasm-file-first:has(input[name="model_file"]:valid) .idswasm-run {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ids-file-first:has(input[name="model_file"]:valid) .ids-cascade-placeholder,
.idswasm-file-first:has(input[name="model_file"]:valid) .idswasm-cascade-placeholder {
  display: none;
}

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}

.detail-empty h3 {
  margin: 0 0 8px;
}

