/* Simplified account page: credits, your tools, a gift code, purchases.
   Things hidden here are repeated elsewhere (header credits pill and account menu, tab bar). */

/* ---------- No profile bar (the header's account menu has the name and sign out) ---------- */
body .account-dashboard-v2 .account-header-v2 {
  display: none !important;
}

/* ---------- Buy credits: the original pack tiles, under a plain heading ---------- */
body .account-credit-dock .credit-store-kicker,
body .account-credit-dock .credit-store-balance {
  display: none !important;
}

body .account-credit-dock .credit-store-heading h3 {
  margin: 0 !important;
}

/* All four corners round (the bottom ones were square) */
body .account-credit-dock {
  border-radius: 14px !important;
}

/* ---------- Library: picture, name, View in Shop, download ---------- */
body .account-library-panel .panel-kicker,
body .account-library-panel .library-count-pill,
body .account-library-panel .library-filter-pills,
body .account-library-panel .library-badge-row,
body .account-library-panel .library-item-desc,
body .account-library-panel .library-devices-toggle-btn,
body .account-library-panel .library-devices-drawer {
  display: none !important;
}

/* Search icon centered in the field (it sat below the text) */
body .account-library-panel .library-search-box svg {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

body .account-library-panel .library-item-card {
  padding: 10px 14px !important;
}

body .account-library-panel .library-card-main-row {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

body .account-library-panel .library-info-col {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body .account-library-panel .library-item-title {
  margin: 0 !important;
  font-size: 15px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .account-library-panel .library-actions-col {
  flex: 0 0 auto !important;
  display: flex !important;
  gap: 8px !important;
}

/* ---------- Gift code and purchases: keep the icons, drop subtitles and empty-state filler ---------- */
body .account-sidebar-panel .sidebar-card-header p,
body .account-sidebar-panel .gift-code-row.is-empty,
body .account-sidebar-panel .purchase-row.is-empty span {
  display: none !important;
}

/* ---------- Phones: one column, nothing wider than the screen ---------- */
@media (max-width: 760px) {
  body .account-dashboard-v2,
  body .account-dashboard-v2 > *,
  body .account-workspace-grid,
  body .account-workspace-grid > *,
  body .account-sidebar-panel > *,
  body .account-library-panel .library-items-list,
  body .account-library-panel .library-item-card {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .account-workspace-grid > *,
  body .account-sidebar-panel > *,
  body .account-library-panel .library-items-list,
  body .account-library-panel .library-item-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body .account-workspace-grid {
    display: flex !important;
    flex-direction: column !important;
  }

  body .account-sidebar-panel {
    align-items: stretch !important;
  }

  body .account-library-panel .library-item-card {
    padding: 10px !important;
  }

  body .account-library-panel .library-card-main-row {
    gap: 10px !important;
  }

  body .account-library-panel .library-thumb-box {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
  }

  /* Download shrinks to an icon on phones so View in Shop still fits */
  body .account-library-panel .library-direct-zip-btn span {
    display: none !important;
  }

  body .account-library-panel .library-direct-zip-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  body .account-library-panel .library-direct-zip-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  body .account-library-panel .library-launch-btn {
    height: 38px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 760px) {
  /* Names get the room: a tighter View in Shop, and long names wrap instead of cutting off */
  body .account-library-panel .library-launch-btn {
    padding: 0 8px !important;
    gap: 4px !important;
  }

  /* "View in Shop" reads "Shop" on phones */
  body .account-library-panel .library-launch-btn span {
    font-size: 0 !important;
  }

  body .account-library-panel .library-launch-btn span::before {
    content: "Shop";
    font-size: 13px;
  }

  body .account-library-panel .library-item-title {
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
  }
}
