/* CMD-002: compact Command Center launcher with unframed color icons. */
.ps-command-center-launcher {
  container-name: ps-command-center-launcher;
  container-type: inline-size;
  padding: 1.5rem !important;
}

.ps-command-center-header {
  align-items: flex-end !important;
  margin-bottom: 1.25rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 64rem;
  width: 100%;
}

.ps-command-center-header > svg {
  display: none !important;
}

.ps-command-center-header h3 {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
  margin-top: 0.125rem !important;
}

.ps-command-center-header p {
  font-size: 0.8125rem !important;
  line-height: 1.25rem !important;
}

.ps-command-center-count {
  background: transparent;
  color: #64748b;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  padding: 0;
}

.ps-command-center-grid {
  display: grid !important;
  gap: 0.5rem !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 64rem;
  width: 100%;
}

.ps-command-center-app {
  align-items: center;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.625rem !important;
  box-shadow: none !important;
  display: grid !important;
  gap: 0.75rem;
  grid-template-columns: 2rem minmax(0, 1fr) max-content max-content;
  min-height: 3.75rem !important;
  overflow: hidden;
  padding: 0.5rem 0.75rem !important;
  position: relative;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease !important;
}

.ps-command-center-app:hover,
.ps-command-center-app:has(.ps-command-center-detail-trigger:focus-visible) {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.ps-command-center-app:has(.ps-command-center-detail-trigger:focus-visible) {
  outline: 3px solid rgba(20, 184, 166, 0.18);
  outline-offset: 1px;
}

.ps-command-center-app-leading {
  display: contents !important;
}

.ps-command-center-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #0f766e !important;
  grid-column: 1;
  grid-row: 1;
  height: 2rem !important;
  width: 2rem !important;
}

.ps-command-center-icon > svg,
.ps-command-center-icon > img {
  height: 1.5rem !important;
  width: 1.5rem !important;
}

.ps-command-center-color-icon {
  filter: none;
  opacity: 1 !important;
}

.ps-command-center-app[data-ps-icon-tone="amber"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="amber"] {
  color: #d97706 !important;
}

.ps-command-center-app[data-ps-icon-tone="blue"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="blue"] {
  color: #2563eb !important;
}

.ps-command-center-app[data-ps-icon-tone="cyan"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="cyan"] {
  color: #0891b2 !important;
}

.ps-command-center-app[data-ps-icon-tone="emerald"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="emerald"] {
  color: #059669 !important;
}

.ps-command-center-app[data-ps-icon-tone="google"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="google"] {
  color: #4285f4 !important;
}

.ps-command-center-app[data-ps-icon-tone="indigo"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="indigo"] {
  color: #4f46e5 !important;
}

.ps-command-center-app[data-ps-icon-tone="orange"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="orange"] {
  color: #f38020 !important;
}

.ps-command-center-app[data-ps-icon-tone="red"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="red"] {
  color: #e11d48 !important;
}

.ps-command-center-app[data-ps-icon-tone="slate"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="slate"] {
  color: #0f172a !important;
}

.ps-command-center-app[data-ps-icon-tone="teal"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="teal"] {
  color: #0f766e !important;
}

.ps-command-center-app[data-ps-icon-tone="violet"] .ps-command-center-icon,
.ps-command-center-dialog-icon[data-ps-icon-tone="violet"] {
  color: #7c3aed !important;
}

.ps-command-center-app-summary {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  min-width: 0;
}

.ps-command-center-app-summary p:first-child {
  color: #0f172a !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.25rem !important;
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-command-center-app-summary p:not(:first-child) {
  color: #64748b !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  margin: 0.125rem 0 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-command-center-status {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #64748b !important;
  display: inline-flex !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  gap: 0.375rem;
  grid-column: 3;
  grid-row: 1;
  line-height: 1rem !important;
  padding: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}

.ps-command-center-status::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  height: 0.4375rem;
  width: 0.4375rem;
}

.ps-command-center-status:is([class*="emerald"], [class*="teal"])::before {
  background: #10b981;
}

.ps-command-center-status:is([class*="amber"], [class*="yellow"])::before {
  background: #f59e0b;
}

.ps-command-center-app-secondary {
  display: none !important;
}

.ps-command-center-detail-trigger {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.4375rem;
  color: #64748b;
  cursor: pointer;
  font: 600 0.75rem/1rem system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  grid-column: 4;
  grid-row: 1;
  height: 2rem;
  padding: 0 0.625rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ps-command-center-detail-trigger:hover,
.ps-command-center-detail-trigger:focus-visible {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  outline: none;
}

.ps-command-center-dialog-open {
  overflow: hidden;
}

.ps-command-center-dialog-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.44);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 2147483000;
}

.ps-command-center-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.875rem;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  color: #0f172a;
  max-height: min(44rem, calc(100vh - 3rem));
  max-width: 34rem;
  overflow: auto;
  width: 100%;
}

.ps-command-center-dialog-header {
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 0.875rem;
  grid-template-columns: 2.5rem minmax(0, 1fr) max-content;
  padding: 1.25rem;
}

.ps-command-center-dialog-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #0f766e !important;
  height: 2.5rem !important;
  width: 2.5rem !important;
}

.ps-command-center-dialog-icon > img,
.ps-command-center-dialog-icon > svg {
  filter: none;
  height: 1.75rem !important;
  opacity: 1 !important;
  width: 1.75rem !important;
}

.ps-command-center-dialog-heading {
  min-width: 0;
}

.ps-command-center-dialog-title {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.5rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.ps-command-center-dialog-category {
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  margin: 0.125rem 0 0;
}

.ps-command-center-dialog-status {
  background: #ecfdf5;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1rem;
  margin-top: 0.625rem;
  padding: 0.25rem 0.5rem;
}

.ps-command-center-dialog-status[data-status="needs-credentials"],
.ps-command-center-dialog-status[data-status="needs-setup"],
.ps-command-center-dialog-status[data-status="planned"] {
  background: #fffbeb;
  color: #b45309;
}

.ps-command-center-dialog-close {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.4375rem;
  color: #475569;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  height: 2rem;
  padding: 0 0.625rem;
}

.ps-command-center-dialog-close:hover,
.ps-command-center-dialog-close:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  outline: 3px solid rgba(20, 184, 166, 0.16);
}

.ps-command-center-dialog-body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.ps-command-center-dialog-summary,
.ps-command-center-dialog-owner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.875rem;
}

.ps-command-center-dialog-summary {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ps-command-center-dialog-summary-label,
.ps-command-center-dialog-owner-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  margin: 0;
}

.ps-command-center-dialog-summary-detail {
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.375rem;
  margin: 0;
  text-align: right;
}

.ps-command-center-dialog-owner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.ps-command-center-dialog-owner-name {
  font-size: 0.8125rem;
}

.ps-command-center-dialog-subtitle {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.25rem;
  margin: 0 0 0.625rem;
}

.ps-command-center-dialog-setup ol {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ps-command-center-dialog-setup li {
  align-items: flex-start;
  color: #475569;
  display: grid;
  font-size: 0.8125rem;
  gap: 0.625rem;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  line-height: 1.25rem;
}

.ps-command-center-dialog-step-number {
  align-items: center;
  background: #f1f5f9;
  border-radius: 0.375rem;
  color: #64748b;
  display: inline-flex;
  font-size: 0.6875rem;
  font-weight: 650;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

.ps-command-center-dialog-step-copy {
  padding-top: 0.125rem;
}

.ps-command-center-dialog-configuration {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  color: #475569;
  font-size: 0.75rem;
  padding: 0.75rem;
}

.ps-command-center-dialog-configuration-label {
  color: #334155;
  cursor: pointer;
  font-weight: 650;
}

.ps-command-center-dialog-configuration-copy {
  line-height: 1.25rem;
  margin: 0.5rem 0 0;
  overflow-wrap: anywhere;
}

.ps-command-center-dialog-footer {
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

.ps-command-center-dialog-action,
.ps-command-center-dialog-pending {
  align-items: center;
  border-radius: 0.5rem;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 650;
  height: 2.5rem;
  justify-content: center;
  padding: 0 1rem;
  text-decoration: none;
}

.ps-command-center-dialog-action {
  background: #0f172a;
  color: #ffffff;
}

.ps-command-center-dialog-action:hover,
.ps-command-center-dialog-action:focus-visible {
  background: #1e293b;
  outline: 3px solid rgba(20, 184, 166, 0.18);
}

.ps-command-center-dialog-pending {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}

@container ps-command-center-launcher (max-width: 52rem) {
  .ps-command-center-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@container ps-command-center-launcher (max-width: 31rem) {
  .ps-command-center-app {
    grid-template-columns: 2rem minmax(0, 1fr) max-content;
  }

  .ps-command-center-status {
    display: none !important;
  }

  .ps-command-center-detail-trigger {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 40rem) {
  .ps-command-center-dialog-overlay {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .ps-command-center-dialog {
    max-height: calc(100vh - 1.5rem);
  }

  .ps-command-center-dialog-header {
    grid-template-columns: 2.5rem minmax(0, 1fr) max-content;
    padding: 1rem;
  }

  .ps-command-center-dialog-icon {
    height: 2.5rem !important;
    width: 2.5rem !important;
  }

  .ps-command-center-dialog-body {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-command-center-app,
  .ps-command-center-detail-trigger {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .ps-command-center-app,
  .ps-command-center-dialog,
  .ps-command-center-dialog-close,
  .ps-command-center-detail-trigger {
    border: 1px solid CanvasText !important;
  }

  .ps-command-center-status::before {
    background: CanvasText !important;
  }
}
