.app-shell--ha-dashboard
  .human-agent-dashboard-action--primary
  .ha-cycle-action-label {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: inherit;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
}

.app-shell--ha-dashboard
  .human-agent-dashboard-action--primary
  .ha-cycle-action-label__line {
  display: block;
  white-space: nowrap;
}

@media (min-width: 721px) {
  .app-shell--ha-dashboard
    .human-agent-dashboard-actions:has(
      .human-agent-dashboard-action--primary[data-ha-cycle-action]
    ) {
    grid-template-columns: max-content minmax(0, 260px);
  }

  .app-shell--ha-dashboard
    .human-agent-dashboard-action--primary[data-ha-cycle-action] {
    width: max-content;
    max-width: 100%;
    justify-self: start;
  }
}

@media (min-width: 340px) and (max-width: 720px) {
  .app-shell--ha-dashboard
    .human-agent-dashboard-actions:has(
      .human-agent-dashboard-action--primary[data-ha-cycle-action]
    ) {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .app-shell--ha-dashboard
    .human-agent-dashboard-action--primary[data-ha-cycle-action] {
    width: max-content;
    max-width: 100%;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .app-shell--ha-dashboard
    .human-agent-dashboard-action--primary
    .ha-cycle-action-label {
    align-items: center;
    font-size: 0.86rem;
    line-height: 1.05;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .app-shell--ha-dashboard
    .human-agent-dashboard-action--primary
    .ha-cycle-action-label {
    font-size: 0.82rem;
  }
}
