/* ==========================================================================
   Query All The Post Types — Admin Styles
   All colors from the WordPress 5.7 admin palette.
   ========================================================================== */

/* ---------- Page wrapper ---------- */
.qatp-wrap {
  max-width: none;
}

/* ---------- Page header banner ---------- */
.qatp-page-header {
  background: #5c2d91; /* Purple */
  border-radius: 4px;
  margin: 0 0 24px;
  overflow: hidden;
}

.qatp-page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  gap: 24px;
}

.qatp-page-title {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 23px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.qatp-page-subtitle {
  margin: 4px 0 0;
  color: #a7aaad; /* Gray 20 */
  font-size: 13px;
}

.qatp-page-header-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qatp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 12px 16px;
  border: 1px solid #c50; /* Burnt Orange */
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.qatp-stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.qatp-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #f5f5f5;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* ---------- Tabs ---------- */
.qatp-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 4px;
  margin-bottom: 20px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c3c4c7 transparent;
}

.qatp-tabs::-webkit-scrollbar {
  height: 6px;
}

.qatp-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.qatp-tabs::-webkit-scrollbar-thumb {
  background: #c3c4c7;
  border-radius: 3px;
}

.qatp-tabs::-webkit-scrollbar-thumb:hover {
  background: #a7aaad;
}

.qatp-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: #50575e; /* Gray 60 */
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  position: relative;
}

.qatp-tab + .qatp-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: #dcdcde; /* Gray 5 */
}

.qatp-tab:hover {
  background: #f6f7f7; /* Gray 0 */
  color: #1d2327; /* Gray 90 */
}

.qatp-tab:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: -2px;
}

.qatp-tab.qatp-tab-active {
  background: #f6f7f7; /* Gray 0 */
  color: #1d2327; /* Gray 90 */
  font-weight: 600;
  border-bottom-color: #2271b1; /* Blue 50 */
}

.qatp-tab:not(.qatp-tab-active) {
  border-bottom-color: transparent !important;
}

.qatp-tab-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.qatp-tab-text {
  flex-shrink: 0;
}

.qatp-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #dcdcde; /* Gray 5 */
  color: #50575e; /* Gray 60 */
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.qatp-tab.qatp-tab-active .qatp-tab-count {
  background: #2271b1; /* Blue 50 */
  color: #fff;
}

.qatp-tab-panel {
  margin-top: 0;
}

.qatp-tab-panel:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: 2px;
}

/* ---------- WooCommerce Ecosystem Styling ---------- */

/* Official Woo Purple palette:
   Purple 10: #D1C1FF | Purple 40: #873EFF | Purple 50: #720EEC
   Purple 70: #5007AA | Purple 90: #2C045D
*/

/* ---------- Cards ---------- */
.qatp-card {
  margin-bottom: 20px;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;

  /* Override WP .postbox defaults. */
  min-width: 0;
}

.qatp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f6f7f7; /* Gray 0 */
  border-bottom: 1px solid #dcdcde; /* Gray 5 */
}

.qatp-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.qatp-card-title strong {
  font-weight: 600;
  color: #1d2327; /* Gray 90 */
}

.qatp-card-title code {
  font-size: 12px;
  background: #dcdcde; /* Gray 5 */
  color: #50575e; /* Gray 60 */
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 400;
}

.qatp-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.qatp-card .inside {
  padding: 0;
  margin: 0;
}

/* ---------- Settings table ---------- */
.qatp-settings-table {
  border: none;
  border-collapse: collapse;
  margin: 0;
  width: 100%;
}

.qatp-settings-table td,
.qatp-settings-table th {
  padding: 8px 20px;
  vertical-align: top;
  font-size: 13px;
  color: #3c434a; /* Gray 70 */
  border-bottom: 1px solid #f0f0f1; /* Gray 2 */
}

.qatp-settings-table tr:last-child td,
.qatp-settings-table tr:last-child th {
  border-bottom: none;
}

.qatp-settings-table th.qatp-label,
.qatp-settings-table td.qatp-label {
  width: 200px;
  font-weight: 600;
  color: #1d2327; /* Gray 90 */
  white-space: nowrap;
}

.qatp-settings-table tr.alternate td,
.qatp-settings-table tr.alternate th {
  background: #f6f7f7; /* Gray 0 */
}

/* ---------- Bool values ---------- */
.qatp-bool-true {
  color: #00a32a; /* Green 40 */
  font-weight: 600;
}

.qatp-bool-false {
  color: #a7aaad; /* Gray 20 */
}

/* ---------- Card sections (supports, taxonomies, labels, REST) ---------- */
.qatp-supports,
.qatp-taxonomies,
.qatp-labels-section,
.qatp-rest-endpoint {
  padding: 14px 20px;
  border-top: 1px solid #dcdcde; /* Gray 5 */
  font-size: 13px;
  color: #3c434a; /* Gray 70 */
}

/* ---------- Support badges ---------- */
.qatp-badge {
  display: inline-block;
  background: #2271b1; /* Blue 50 */
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin: 2px 3px 2px 0;
  letter-spacing: 0.2px;
}

/* ---------- Taxonomies ---------- */
.qatp-taxonomies a {
  text-decoration: none;
}

.qatp-taxonomies a:hover {
  text-decoration: underline;
}

/* ---------- Toggle button focus ---------- */
.qatp-toggle:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: 2px;
}

/* ---------- Labels section ---------- */
.qatp-labels-list {
  margin-top: 10px;
  border: 1px solid #dcdcde; /* Gray 5 */
  border-radius: 3px;
  overflow: hidden;
}

/* stylelint-disable-next-line no-descending-specificity -- overrides padding only; border-bottom conflict is in a different row context */
.qatp-labels-list .qatp-settings-table td {
  padding: 6px 16px;
  font-size: 12px;
}

/* ---------- REST endpoint ---------- */
.qatp-rest-endpoint code {
  font-size: 12px;
  background: #f0f0f1; /* Gray 2 */
  padding: 3px 8px;
  border-radius: 3px;
}

/* stylelint-disable-next-line no-descending-specificity -- different component scope from .qatp-taxonomies a:hover */
.qatp-rest-endpoint a {
  text-decoration: none;
}

.qatp-rest-endpoint a:hover code {
  background: #dcdcde; /* Gray 5 */
}

/* ---------- WooCommerce card overrides ---------- */

/* Placed after all base card/content styles to avoid specificity conflicts. */
.qatp-card[data-ecosystem="woocommerce"] {
  border-color: #873eff; /* Woo Purple 40 */
}

.qatp-card[data-ecosystem="woocommerce"] .qatp-card-header {
  background: #873eff; /* Woo Purple 40 */
  border-bottom-color: #720eec; /* Woo Purple 50 */
}

.qatp-card[data-ecosystem="woocommerce"] .qatp-card-title strong {
  color: #fff;
}

.qatp-card[data-ecosystem="woocommerce"] .qatp-card-title code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.qatp-card[data-ecosystem="woocommerce"] .qatp-card-actions .button {
  background: #fff;
  color: #720eec; /* Woo Purple 50 */
  border-color: #fff;
}

.qatp-card[data-ecosystem="woocommerce"] .qatp-card-actions .button:hover {
  background: #d1c1ff; /* Woo Purple 10 */
  color: #5007aa; /* Woo Purple 70 */
  border-color: #d1c1ff;
}

/* ---------- Sidebar ---------- */
.qatp-sidebar-box {
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.qatp-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2c3338; /* Gray 80 */
  color: #fff;
}

.qatp-sidebar-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.qatp-sidebar-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #a7aaad; /* Gray 20 */
}

.qatp-sidebar-body {
  padding: 16px;
}

.qatp-sidebar-body p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #3c434a; /* Gray 70 */
  line-height: 1.5;
}

.qatp-sidebar-body p:last-child {
  margin-bottom: 0;
}

.qatp-sidebar-note {
  font-size: 12px;
  font-style: italic;
  color: #8c8f94; /* Gray 30 */
}

.qatp-sidebar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f1; /* Gray 2 */
  font-size: 12px;
  color: #8c8f94; /* Gray 30 */
}

/* stylelint-disable-next-line no-descending-specificity -- different component scope from .qatp-taxonomies a:hover */
.qatp-sidebar-meta a {
  text-decoration: none;
}

/* ---------- Legend ---------- */
.qatp-legend-body {
  padding: 12px 16px;
}

.qatp-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f1; /* Gray 2 */
}

.qatp-legend-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qatp-legend-row:first-child {
  padding-top: 0;
}

.qatp-legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.qatp-legend-label {
  flex: 1;
  font-size: 13px;
  color: #3c434a; /* Gray 70 */
}

.qatp-legend-count {
  font-size: 12px;
  font-weight: 600;
  color: #50575e; /* Gray 60 */
  background: #f0f0f1; /* Gray 2 */
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.qatp-legend-total {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;

  font-size: 12px;
  flex-wrap: wrap;
}

.qatp-legend-total-core,
.qatp-legend-total-external {
  font-weight: 600;
  color: #50575e;
}

.qatp-legend-total-op {
  color: #a7aaad;
}

.qatp-legend-total-sum {
  font-weight: 700;
  color: #1d2327;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 782px) {

  .qatp-page-header-inner {
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .qatp-page-header-stats {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .qatp-stat-number {
    font-size: 22px;
  }

  .qatp-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: visible;
    border-radius: 4px;
  }

  .qatp-tab {
    padding: 12px 16px;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .qatp-tab + .qatp-tab::before {
    display: none;
  }

  .qatp-tab.qatp-tab-active {
    border-left-color: currentcolor;
    border-bottom-color: transparent !important;
  }

  .qatp-tab:not(.qatp-tab-active) {
    border-left-color: transparent !important;
  }

  .qatp-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  .qatp-settings-table td,
  .qatp-settings-table th {
    padding: 8px 16px;
  }

  .qatp-settings-table td.qatp-label,
  .qatp-settings-table th.qatp-label {
    width: auto;
  }

  .qatp-supports,
  .qatp-taxonomies,
  .qatp-labels-section,
  .qatp-rest-endpoint {
    padding: 12px 16px;
  }
}

/* ---------- Tab overflow — More button ---------- */
.qatp-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: #50575e; /* Gray 60 */
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  flex-shrink: 0;
}

.qatp-more-btn:hover {
  background: #f6f7f7; /* Gray 0 */
  color: #1d2327; /* Gray 90 */
}

.qatp-more-btn:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: -2px;
}

.qatp-more-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  padding: 4px 0;
}

.qatp-more-dropdown .qatp-tab {
  display: flex;
  width: 100%;
  border-bottom: none !important;
  border-left: 3px solid transparent;
  padding: 10px 16px;
}

.qatp-more-dropdown .qatp-tab.qatp-tab-active {
  border-left-color: #2271b1; /* Blue 50 */
  border-bottom-color: transparent !important;
  background: #f6f7f7; /* Gray 0 */
}

.qatp-more-dropdown .qatp-tab::before {
  display: none;
}

/* ---------- Mode toggle — segmented control ---------- */
.qatp-mode-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.qatp-mode-btn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.qatp-mode-btn:last-child {
  border-right: none;
}

.qatp-mode-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.qatp-mode-btn:focus {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.qatp-mode-btn.qatp-mode-btn-active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 600;
}

/* ---------- Explorer guide ---------- */
.qatp-explorer-guide {
  background: #fff;
  border: 1px solid #dcdcde;
  border-left: 3px solid #2271b1;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

/* Header: eyebrow + heading + intro */
.qatp-explorer-guide-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f1;
}

.qatp-explorer-guide-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2271b1;
  margin-bottom: 6px;
}

/* Override #poststuff h2 which applies padding: 8px 12px */
#poststuff .qatp-explorer-guide-heading {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 0;
  color: #1d2327;
}

.qatp-explorer-guide-intro {
  margin: 0;
  color: #646970;
  font-size: 13px;
  line-height: 1.65;
}

/* Three steps */
.qatp-explorer-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
}

.qatp-explorer-guide-step {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-right: 1px solid #f0f0f1;
}

.qatp-explorer-guide-step:last-child {
  border-right: none;
}

.qatp-explorer-guide-step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2271b1;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.qatp-explorer-guide .qatp-explorer-guide-step-body p {
  margin: 0;
  font-size: 12px;
  color: #646970;
  line-height: 1.55;
}

/* Use cases row */
.qatp-explorer-guide-usecases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f6f7f7;
  border-top: 1px solid #dcdcde;
}

.qatp-explorer-guide-usecase {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-right: 1px solid #dcdcde;
}

.qatp-explorer-guide-usecase:last-child {
  border-right: none;
}

.qatp-usecase-icon {
  flex-shrink: 0;
  color: #2271b1;
  font-size: 18px;
  margin-top: 1px;
}

.qatp-explorer-guide-usecase .qatp-usecase-body p {
  margin: 0;
  font-size: 12px;
  color: #646970;
  line-height: 1.5;
}

.qatp-guide-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 4px;
}

/* ---------- Explorer pills ---------- */
.qatp-explorer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 12px;
}

.qatp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #3c434a; /* Gray 70 */
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.qatp-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-color, transparent);
  flex-shrink: 0;
}

/* Hide color dot on "All" pill which has no --pill-color. */
.qatp-pill[data-category=""]::before {
  display: none;
}

.qatp-pill:hover {
  background: #f6f7f7; /* Gray 0 */
  border-color: #a7aaad; /* Gray 20 */
}

.qatp-pill:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: 2px;
}

.qatp-pill.qatp-pill-active {
  background: #2271b1; /* Blue 50 */
  border-color: #2271b1;
  color: #fff;
}

.qatp-pill.qatp-pill-active::before {
  background: rgba(255, 255, 255, 0.9);
}

/* ---------- Explorer results ---------- */
.qatp-ability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 12px 0 20px;
}

.qatp-ability-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.qatp-ability-card:hover {
  background: #f6f7f7; /* Gray 0 */
  border-color: #2271b1; /* Blue 50 */
  box-shadow: 0 2px 6px rgba(34, 113, 177, 0.15);
}

.qatp-ability-card:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: 2px;
}

.qatp-ability-card-id {
  font-size: 11px;
  font-family: monospace;
  color: #8c8f94; /* Gray 30 */
}

.qatp-ability-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #1d2327; /* Gray 90 */
}

.qatp-ability-card-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #f0f0f1; /* Gray 2 */
  color: #50575e; /* Gray 60 */
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  align-self: flex-start;
}

/* Explorer text states. */
.qatp-explorer-loading,
.qatp-explorer-error,
.qatp-explorer-empty,
.qatp-explorer-merge-note {
  font-size: 13px;
  color: #50575e; /* Gray 60 */
  padding: 12px 0;
  margin: 0;
}

.qatp-explorer-error {
  color: #d63638; /* WP error red */
}

/* ---------- Drill-down panel ---------- */
.qatp-explorer-drilldown {
  margin-top: 8px;
}

.qatp-drilldown-heading {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327; /* Gray 90 */
  margin: 0 0 8px;
}

.qatp-drilldown-pre {
  background: #f6f7f7; /* Gray 0 */
  border: 1px solid #dcdcde; /* Gray 5 */
  border-radius: 3px;
  padding: 12px 16px;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #3c434a; /* Gray 70 */
}

/* ---------- Command reference ---------- */
.qatp-commands-heading {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327; /* Gray 90 */
  margin: 16px 0 8px;
  padding: 0;
}

.qatp-command-block {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid #dcdcde; /* Gray 5 */
  border-radius: 4px;
  overflow: hidden;
}

.qatp-command-label {
  display: block;
  padding: 6px 12px;
  background: #2c3338; /* Gray 80 */
  color: #f0f0f1; /* Gray 2 */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.qatp-command-pre {
  display: block;
  padding: 10px 12px;
  padding-right: 70px; /* room for copy button */
  background: #f6f7f7; /* Gray 0 */
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  color: #3c434a; /* Gray 70 */
  margin: 0;
  border: none;
}

.qatp-command-copy {
  position: absolute;
  top: 36px; /* below the label bar */
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #c3c4c7; /* Gray 10 */
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #2271b1; /* Blue 50 */
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  white-space: nowrap;
  align-self: center;
}

.qatp-command-copy:hover {
  background: #2271b1; /* Blue 50 */
  color: #fff;
  border-color: #2271b1;
}

.qatp-command-copy:focus {
  outline: 2px solid #2271b1; /* Blue 50 */
  outline-offset: 2px;
}

/* ---------- REST URL clickable block ---------- */
.qatp-command-urls {
  padding: 8px 12px;
  background: #f6f7f7;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qatp-command-url-link {
  font-size: 12px;
  color: #2271b1;
  word-break: break-all;
  text-decoration: none;
  font-family: monospace;
}

.qatp-command-url-link:hover {
  color: #135e96;
  text-decoration: underline;
}

/* ---------- Application Password note ---------- */
.qatp-app-password-note {
  padding: 10px 12px 4px;
}

.qatp-app-password-text {
  margin: 0;
  font-size: 12px;
  color: #646970;
  line-height: 1.6;
}

.qatp-app-password-link {
  color: #2271b1;
  text-decoration: none;
}

.qatp-app-password-link:hover {
  color: #135e96;
  text-decoration: underline;
}

/* ---------- Selected card state ---------- */
.qatp-ability-card-selected {
  border-color: #2271b1;
  background: #f0f6fc;
  box-shadow: 0 0 0 1px #2271b1;
}

/* ---------- Selection bar ---------- */
.qatp-selection-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f0f6fc;
  border: 1px solid #2271b1;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}

.qatp-selection-count {
  flex: 1;
  font-weight: 600;
  color: #2271b1;
}

.qatp-selection-clear {
  background: none;
  border: 1px solid #2271b1;
  border-radius: 3px;
  color: #2271b1;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 10px;
}

.qatp-selection-clear:hover {
  background: #2271b1;
  color: #fff;
}

/* ---------- Run All button ---------- */
.qatp-run-all-btn {
  margin-top: 8px;
  background: #2271b1;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
}

.qatp-run-all-btn:hover {
  background: #135e96;
}

.qatp-explorer-run-all-msg {
  color: #50575e;
  font-size: 13px;
  margin: 0 0 8px;
}

/* ---------- Responsive — Explorer ---------- */
@media screen and (max-width: 782px) {

  .qatp-ability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .qatp-mode-toggle {
    width: 100%;
  }

  .qatp-mode-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {

  .qatp-tab,
  .qatp-mode-btn,
  .qatp-pill,
  .qatp-ability-card,
  .qatp-command-copy {
    transition: none;
  }
}
