/* SDFood — correção final das abas do perfil no desktop.
   Escopo exclusivo para >= 769px; não altera o layout mobile. */
@media (min-width: 769px) {
  html body.sd-desktop #overlay.sd-profile-overlay > .drawer,
  html body.sd-desktop #overlay.sd-delivery-overlay > .drawer,
  html body.sd-desktop #overlay.sd-order-track-detail-active > .drawer,
  html body.sd-desktop #overlay.sd-ticket-drawer-active > .drawer,
  html body.sd-desktop #overlay > .drawer.profile-drawer,
  html body.sd-desktop #overlay > .drawer.sd-delivery-drawer {
    box-sizing: border-box !important;
    width: min(430px, 100vw) !important;
    min-width: 0 !important;
    max-width: 430px !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .sd-profile-screen,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-subpage,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-notif-page,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-hist-page,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-ref,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-mobile,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen,
  html body.sd-desktop #overlay.sd-order-track-detail-active .sd-order-track-detail-screen {
    display: flex !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 18px 18px 30px !important;
    overflow-x: hidden !important;
    background: #fff !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .sd-profile-screen *,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-subpage *,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-notif-page *,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-hist-page *,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-ref *,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-mobile *,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen *,
  html body.sd-desktop #overlay.sd-order-track-detail-active .sd-order-track-detail-screen * {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .sd-subpage > *,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-notif-page > *,
  html body.sd-desktop #overlay.sd-profile-overlay .sd-hist-page > *,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-ref > *,
  html body.sd-desktop #overlay.sd-profile-overlay .wallet-mobile > *,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen > *,
  html body.sd-desktop #overlay.sd-order-track-detail-active .sd-order-track-detail-screen > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body.sd-desktop #overlay .sd-subpage-head,
  html body.sd-desktop #overlay .sd-hist-head,
  html body.sd-desktop #overlay .sd-delivery-code-head,
  html body.sd-desktop #overlay .sd-profile-head {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 0 4px !important;
  }

  html body.sd-desktop #overlay .sd-hist-tabs,
  html body.sd-desktop #overlay .sd-hist-list-wrap,
  html body.sd-desktop #overlay .sd-notif-body,
  html body.sd-desktop #overlay #deliveryCodeOrdersList,
  html body.sd-desktop #overlay #profileOrdersList,
  html body.sd-desktop #overlay .sd-delivery-orders,
  html body.sd-desktop #overlay .sd-delivery-howto,
  html body.sd-desktop #overlay .sd-delivery-code-body {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  html body.sd-desktop #overlay .sd-hist-tabs {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 4px !important;
    border-radius: 12px !important;
    background: #f2f2f2 !important;
  }

  html body.sd-desktop #overlay .sd-hist-tabs .sd-hist-tab {
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font: 500 13px/1.15 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay .sd-hist-list-wrap > *,
  html body.sd-desktop #overlay .sd-hist-list > *,
  html body.sd-desktop #overlay .sd-delivery-orders > *,
  html body.sd-desktop #overlay #profileOrdersList > *,
  html body.sd-desktop #overlay #deliveryCodeOrdersList > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-hero-card,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-body,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-box,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-store-block,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-tips,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-order-card {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-body {
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-digits {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen .sd-delivery-code-digit {
    flex: 0 1 42px !important;
    min-width: 34px !important;
  }

  html body.sd-desktop #overlay .favorite-address-card,
  html body.sd-desktop #overlay .terms-option,
  html body.sd-desktop #overlay .wallet-card,
  html body.sd-desktop #overlay .wallet-economy-card,
  html body.sd-desktop #overlay .wallet-action,
  html body.sd-desktop #overlay .wallet-history-card,
  html body.sd-desktop #overlay .sd-hist-card,
  html body.sd-desktop #overlay .sd-track-order,
  html body.sd-desktop #overlay .sd-notification-item,
  html body.sd-desktop #overlay .sd-delivery-order-card,
  html body.sd-desktop #overlay .deposit-pix-card,
  html body.sd-desktop #overlay .deposit-user-card,
  html body.sd-desktop #overlay .form-grid,
  html body.sd-desktop #overlay .terms-list,
  html body.sd-desktop #overlay .wallet-history-list,
  html body.sd-desktop #overlay #favoriteAddressesList {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html body.sd-desktop #overlay img,
  html body.sd-desktop #overlay svg {
    max-width: 100% !important;
  }
}

/* Alguns estilos legados usam seletor por ID e limitam a faixa de filtros a 340px. */
@media (min-width: 769px) {
  html body.sd-desktop #overlay #deliveryCodeOrderFilters.sd-hist-tabs,
  html body.sd-desktop #overlay.sd-delivery-overlay #deliveryCodeOrderFilters.sd-hist-tabs,
  html body.sd-desktop #overlay #profileOrdersList .sd-hist-tabs,
  html body.sd-desktop #overlay #profileOrdersList .sd-hist-tabs.sd-hist-tabs {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}
