@import url("./design-tokens.css");

/* P0 V2 Core Workspace Convergence
   Keep the writing surface dominant. This layer intentionally avoids changing
   editor engines or SEO-owned page structure. */

body[data-wu-core-workspace] .fb-like,
body[data-wu-core-workspace] .twitter-follow-button,
body[data-wu-core-workspace] .fb-comments,
body[data-wu-core-workspace] #fb-root,
body[data-wu-core-workspace] [data-wu-authoring-share-primary] {
  display: none !important;
}

body[data-wu-core-workspace="basic"][data-wu-canvas-first="true"] .home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 12px;
  overflow: visible;
  border: 1px solid var(--wu-color-border);
  border-radius: var(--wu-radius-lg);
  background: var(--wu-color-surface-soft);
  box-shadow: none;
}

body[data-wu-core-workspace="basic"] .home-actions[hidden] {
  display: none !important;
}

body[data-wu-core-workspace="basic"] .home-actions-group-primary,
body[data-wu-core-workspace="basic"] .home-actions-group-secondary {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body[data-wu-core-workspace="basic"] .home-actions-group-secondary {
  margin-left: auto;
}

body[data-wu-taxonomy-synced] .docs-card-grid {
  align-items: stretch;
}

body[data-wu-taxonomy-synced] [data-wu-capture-path] {
  min-height: 100%;
}

body[data-wu-taxonomy-synced] #work {
  scroll-margin-top: 96px;
}

@media (max-width: 767px) {
  body[data-wu-core-workspace="basic"][data-wu-canvas-first="true"] .home-actions {
    align-items: stretch;
    overflow-x: visible !important;
  }

  body[data-wu-core-workspace="basic"] .home-actions-group-primary,
  body[data-wu-core-workspace="basic"] .home-actions-group-secondary,
  body[data-wu-core-workspace="basic"] .wu-basic-more,
  body[data-wu-core-workspace="basic"] .wu-basic-more.is-open {
    width: auto;
  }

  body[data-wu-core-workspace="basic"] .home-actions-group-secondary {
    margin-left: 0;
  }

  body[data-wu-core-workspace="basic"] .wu-basic-more.is-open,
  body[data-wu-core-workspace="basic"] .wu-basic-more-panel {
    flex-basis: 100%;
    width: 100%;
  }

  /* WU-PLAT-004: keep More and Clear as real, non-overlapping tap targets.
     Their labels can overflow a shrink-to-zero flex item on narrow screens,
     allowing the following group to intercept the pointer. */
  body[data-wu-core-workspace="basic"][data-wu-basic-command-toolbar="true"] .home-actions[data-wu-basic-command-toolbar] .wu-basic-command-primary {
    flex: 1 1 160px !important;
    min-width: 150px;
  }

  body[data-wu-core-workspace="basic"][data-wu-basic-command-toolbar="true"] .home-actions[data-wu-basic-command-toolbar] .wu-basic-command-overflow {
    flex: 0 0 auto !important;
    min-width: max-content;
  }

  body[data-wu-core-workspace="basic"][data-wu-basic-command-toolbar="true"] .home-actions[data-wu-basic-command-toolbar] .wu-basic-command-more {
    flex: 0 0 auto;
    min-width: max-content;
  }
}

/* Desktop first viewport (2026-10-18). At 1366x768 only ~234px of the editor
   was visible: the "Two ways to write Urdu" explainer and the example/Ctrl+G
   strip repeated the hero lede above it. Phones already drop both
   (mobile-home-task-first.css); larger screens now match. The idle panel
   collapses to its working parts, so the long-passage prompt, Convert action
   and status still appear when batch transliteration needs them. */
@media (min-width: 768px) {
  body.wu-v2-shell[data-wu-core-workspace="basic"] .batch-transliteration-panel {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.wu-v2-shell[data-wu-core-workspace="basic"] .batch-transliteration-panel [data-batch-title],
  body.wu-v2-shell[data-wu-core-workspace="basic"] .batch-transliteration-panel [data-batch-guide],
  body.wu-v2-shell[data-wu-core-workspace="basic"] .batch-transliteration-panel [data-batch-note] {
    display: none !important;
  }

  body.wu-v2-shell[data-wu-core-workspace="basic"] .batch-transliteration-panel [data-batch-prompt]:not([hidden]) {
    margin-top: 6px;
  }

  body.wu-v2-shell[data-wu-core-workspace="basic"][data-wu-basic-command-toolbar="true"] .wu-basic-command-helper {
    display: none !important;
  }
}
