/* Final responsive sizing for every signed-in account section. */
body.storefront.account-page.account-is-authenticated {
  overflow-x: clip;
}

body.storefront.account-page.account-is-authenticated :is(
  .account-main, .account-dashboard, .account-shell, .account-sidebar,
  .account-workspace-content, .account-view, .account-panel,
  .account-balance-view, .account-settings-layout, .account-support-layout
) {
  min-width: 0;
}

@media (min-width: 601px) and (max-width: 900px) {
  body.storefront.account-page.account-is-authenticated .account-main:has(.account-dashboard:not([hidden])) {
    width: min(calc(100% - 36px), 760px);
    padding: 24px 0 64px;
  }

  body.storefront.account-page.account-is-authenticated .account-shell {
    display: block;
  }

  body.storefront.account-page.account-is-authenticated .account-sidebar {
    position: static;
    padding: 0 0 20px;
  }

  body.storefront.account-page.account-is-authenticated :is(
    .account-sidebar-brand, .account-nav-group, .account-sidebar-person
  ) {
    display: none;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    overflow: visible;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-nav a {
    grid-column: span 2;
    min-width: 0;
    min-height: 58px;
    padding: 9px;
    white-space: normal;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-nav a:nth-of-type(n+4) {
    grid-column: span 3;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-nav a span:nth-child(2) {
    min-width: 0;
    font-size: 11px;
    line-height: 1.25;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-content,
  body.storefront.account-page.account-is-authenticated .account-view {
    width: 100%;
  }

  body.storefront.account-page.account-is-authenticated .account-balance-grid,
  body.storefront.account-page.account-is-authenticated .account-support-layout,
  body.storefront.account-page.account-is-authenticated .account-settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.storefront.account-page.account-is-authenticated .account-balance-grid > .account-panel {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  body.storefront.account-page.account-is-authenticated .account-main:has(.account-dashboard:not([hidden])) {
    width: min(calc(100% - 24px), 560px);
    min-height: 0;
    height: auto;
    margin: 0 auto;
    padding: 16px 0 max(48px, env(safe-area-inset-bottom));
    overflow: visible;
  }

  body.storefront.account-page.account-is-authenticated .account-dashboard,
  body.storefront.account-page.account-is-authenticated .account-shell,
  body.storefront.account-page.account-is-authenticated .account-workspace-content,
  body.storefront.account-page.account-is-authenticated .account-view {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.storefront.account-page.account-is-authenticated .account-workspace-nav {
    overflow: visible;
  }

  body.storefront.account-page.account-is-authenticated .account-balance-grid,
  body.storefront.account-page.account-is-authenticated .account-settings-layout,
  body.storefront.account-page.account-is-authenticated .account-support-layout,
  body.storefront.account-page.account-is-authenticated .account-support-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  body.storefront.account-page.account-is-authenticated :is(
    .account-balance-hero, .account-balance-grid > .account-panel,
    .account-orders-list-section, .account-favorites-banner,
    .account-settings-cover, .account-support-hero, .account-hub-card
  ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.storefront.account-page.account-is-authenticated :is(
    .account-topup form, .account-settings-form,
    .account-support-form, .account-support-reply
  ) {
    min-width: 0;
  }

  body.storefront.account-page.account-is-authenticated :is(
    .account-topup input, .account-settings-form input,
    .account-support-form input, .account-support-form textarea,
    .account-support-reply textarea
  ) {
    max-width: 100%;
    font-size: 16px;
  }

  body.storefront.account-page.account-is-authenticated .account-provider {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  body.storefront.account-page.account-is-authenticated .account-provider label,
  body.storefront.account-page.account-is-authenticated .account-provider label span {
    min-width: 0;
    max-width: 100%;
  }

  body.storefront.account-page.account-is-authenticated .account-provider img {
    max-width: 100%;
  }

  body.storefront.account-page.account-is-authenticated .account-topup-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.storefront.account-page.account-is-authenticated .account-topup-presets button {
    min-width: 0;
    touch-action: manipulation;
  }

  body.storefront.account-page.account-is-authenticated .account-wallet-topup,
  body.storefront.account-page.account-is-authenticated .account-topup .account-primary {
    max-width: 100%;
    min-height: 48px;
  }

  body.storefront.account-page.account-is-authenticated .account-hub-favorites {
    grid-template-columns: minmax(0, 1fr);
  }

  body.storefront.account-page.account-is-authenticated .account-row,
  body.storefront.account-page.account-is-authenticated .account-favorite-card,
  body.storefront.account-page.account-is-authenticated .account-support-topics a {
    min-width: 0;
  }
}

@media (max-width: 360px) {
  body.storefront.account-page.account-is-authenticated .account-main:has(.account-dashboard:not([hidden])) {
    width: calc(100% - 20px);
  }

  body.storefront.account-page.account-is-authenticated .account-balance-grid > .account-panel,
  body.storefront.account-page.account-is-authenticated .account-hub-card {
    padding: 17px;
  }

  body.storefront.account-page.account-is-authenticated .account-topup-preset-value strong {
    font-size: 15px;
  }

  body.storefront.account-page.account-is-authenticated .account-provider label span {
    padding-inline: 4px;
  }
}

