/* ============================================================
   Gaveta lateral desktop — estilo limpo tipo Informações/Compartilhar
   ============================================================ */
@media (min-width: 769px) {

  /* ---- Overlay / drawer ---- */
  html body.sd-desktop #overlay.sd-profile-overlay,
  html body.sd-desktop #overlay.sd-delivery-overlay,
  html body.sd-desktop #overlay.sd-order-track-detail-active,
  html body.sd-desktop #overlay.sd-ticket-drawer-active {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2900 !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: rgba(0, 0, 0, .16) !important;
  }

  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 {
    position: relative !important;
    display: block !important;
    width: min(420px, 100vw) !important;
    min-width: 0 !important;
    max-width: 420px !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 0 !important;
    border-radius: 18px 0 0 18px !important;
    background: #fff !important;
    box-shadow: -12px 0 34px rgba(0, 0, 0, .12) !important;
  }

  /* Quebra regra 100vw do profile-iphone-redesign dentro do drawer */
  html body.sd-desktop #overlay .sd-profile-screen,
  html body.sd-desktop #overlay .sd-profile-screen *,
  html body.sd-desktop #overlay .sd-subpage,
  html body.sd-desktop #overlay .sd-subpage *,
  html body.sd-desktop #overlay .sd-delivery-code-screen,
  html body.sd-desktop #overlay .sd-delivery-code-screen *,
  html body.sd-desktop #overlay .sd-notif-page,
  html body.sd-desktop #overlay .sd-notif-page *,
  html body.sd-desktop #overlay .sd-hist-page,
  html body.sd-desktop #overlay .sd-hist-page *,
  html body.sd-desktop #overlay .wallet-ref,
  html body.sd-desktop #overlay .wallet-mobile {
    max-width: 100% !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen,
  html body.sd-desktop #overlay .sd-subpage,
  html body.sd-desktop #overlay .sd-hist-page,
  html body.sd-desktop #overlay .sd-notif-page,
  html body.sd-desktop #overlay .wallet-ref,
  html body.sd-desktop #overlay .wallet-mobile,
  html body.sd-desktop #overlay .sd-delivery-code-screen,
  html body.sd-desktop #overlay .sd-order-track-detail-screen {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px 18px 28px !important;
    overflow-x: hidden !important;
    background: #fff !important;
    color: #000000 !important;
    font-family: "Inter", sans-serif !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* ---- Cabeçalhos limpos (sem barra roxa / sem borda) ---- */
  html body.sd-desktop #overlay .sd-subpage-head,
  html body.sd-desktop #overlay .sd-hist-head,
  html body.sd-desktop #overlay .sd-profile-head,
  html body.sd-desktop #overlay .sd-delivery-code-head,
  html body.sd-desktop #overlay .sd-delivery-code-screen .sd-delivery-code-head,
  html body.sd-desktop #overlay .sd-order-track-detail-screen .sd-subpage-head {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay .sd-subhead-text,
  html body.sd-desktop #overlay .sd-delivery-code-head .sd-subhead-text {
    color: #000000 !important;
    font: 600 17px/1.25 Inter, sans-serif !important;
  }
  html body.sd-desktop #overlay .sd-delivery-code-head .sd-subhead-text::after {
    content: none !important;
    display: none !important;
  }

  html body.sd-desktop #overlay .sd-subpage-back,
  html body.sd-desktop #overlay .sd-delivery-code-back,
  html body.sd-desktop #overlay .sd-delivery-code-screen .sd-delivery-code-back {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #000000 !important;
    background: #f3f3f3 !important;
    box-shadow: none !important;
  }
  html body.sd-desktop #overlay .sd-subpage-back svg,
  html body.sd-desktop #overlay .sd-delivery-code-back svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    stroke: currentColor !important;
    color: #000000 !important;
  }

  /* ============================================================
     MENU PERFIL — cards estilo Informações/Compartilhar
     ============================================================ */
  html body.sd-desktop #overlay .sd-profile-screen .profile-menu.sd-profile-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #e9e9e9 !important;
    border-bottom: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-align: left !important;
    cursor: pointer !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-menu-item:last-child {
    border-bottom: 1px solid #e9e9e9 !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-menu-item:hover {
    background: #f3f3f3 !important;
  }

  /* Ícones pretos */
  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #000000 !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-icon svg,
  html body.sd-desktop #overlay .sd-profile-screen .sd-profile-icon svg * {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    fill: none !important;
    stroke: #000000 !important;
    stroke-width: 1.7 !important;
    color: #000000 !important;
  }

  html body.sd-desktop #overlay .sd-profile-screen .profile-menu-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  html body.sd-desktop #overlay .sd-profile-screen .profile-menu-copy strong {
    display: block !important;
    color: #000000 !important;
    font: 600 14px/1.25 Inter, sans-serif !important;
  }
  html body.sd-desktop #overlay .sd-profile-screen .profile-menu-copy span {
    display: block !important;
    color: #000000 !important;
    font: 400 12px/1.3 Inter, sans-serif !important;
  }
  html body.sd-desktop #overlay .sd-profile-screen .profile-menu-arrow {
    color: #000000 !important;
    font-size: 18px !important;
  }

  /* Card conta + summary — sem corte, sem borda pesada */
  html body.sd-desktop #overlay .sd-profile-account-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    padding: 12px !important;
    border: 1px solid #e9e9e9 !important;
    border-radius: 14px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  html body.sd-desktop #overlay .sd-profile-summary {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body.sd-desktop #overlay .sd-profile-summary-divider {
    display: none !important;
  }

  html body.sd-desktop #overlay .sd-profile-summary-card {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  /* Game / nível — não cortar */
  html body.sd-desktop #overlay .sd-profile-game {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
    border: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay .sd-profile-game::before,
  html body.sd-desktop #overlay .sd-profile-game::after {
    display: none !important;
    content: none !important;
  }

  /* ============================================================
     CÓDIGO DE ENTREGA
     ============================================================ */
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-screen {
    padding: 16px 18px 28px !important;
  }

  /* Mata qualquer hero roxo full-bleed no desktop */
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-hero-card {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 110px !important;
    min-height: 110px !important;
    max-height: 110px !important;
    margin: 0 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #000000 !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-hero-card::before,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-hero-card::after {
    display: none !important;
    content: none !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-hero-card .sd-delivery-code-art,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-hero-card .sd-delivery-code-lottie {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    margin: 0 auto !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-lottie svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 90px !important;
    max-height: 90px !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-body {
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: -18px 0 0 !important;
    padding: 20px 0 0 !important;
    border: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    background: #fff !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #f6f6f6 !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-digits {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-digit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 46px !important;
    min-width: 38px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #000000 !important;
    font: 700 18px/1 Inter, sans-serif !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05) !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-copy {
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: #000000 !important;
    background: #ebebeb !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-copy svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    stroke: #000000 !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-store-block {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    text-align: center !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-store-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-store-name {
    width: 100% !important;
    color: #000000 !important;
    font: 600 14px/1.3 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-status-pill {
    padding: 4px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #f0f0f0 !important;
    color: #000000 !important;
    font: 500 12px/1 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-howto h3,
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-orders h3 {
    margin: 0 0 10px !important;
    color: #000000 !important;
    font: 600 15px/1.3 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-tips {
    list-style: none !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-code-tips li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin: 0 0 12px !important;
    color: #000000 !important;
    font: 400 13px/1.4 Inter, sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-tip-icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    background: #f3f3f3 !important;
  }
  html body.sd-desktop #overlay.sd-delivery-overlay .sd-delivery-tip-icon svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    fill: none !important;
    stroke: #000000 !important;
    stroke-width: 1.6 !important;
  }

  /* Abas limpas */
  html body.sd-desktop #overlay .sd-hist-tabs {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    padding: 4px !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  html body.sd-desktop #overlay .sd-hist-tabs::before { display: none !important; }
  html body.sd-desktop #overlay .sd-hist-tab {
    flex: 1 1 0 !important;
    min-height: 32px !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #000000 !important;
    font: 500 13px/1 Inter, sans-serif !important;
    box-shadow: none !important;
  }
  html body.sd-desktop #overlay .sd-hist-tab.is-active {
    background: #fff !important;
    color: #000000 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06) !important;
  }

  html body.sd-desktop #overlay .sd-hist-empty,
  html body.sd-desktop #overlay .sd-delivery-orders-empty {
    margin: 8px 0 !important;
    padding: 24px 14px !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 12px !important;
    background: #f6f6f6 !important;
    text-align: center !important;
    box-shadow: none !important;
  }

  /* ============================================================
     STATUS DO PEDIDO
     ============================================================ */
  html body.sd-desktop #overlay .sd-notif-page.sd-status-page .sd-notif-body {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.sd-desktop #overlay .sd-status-section-title {
    margin: 0 0 10px !important;
    color: #000000 !important;
    font: 600 14px/1.3 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay .sd-track-order,
  html body.sd-desktop #overlay .sd-status-page .sd-track-order {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 10px !important;
    padding: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay .sd-order-track-detail-screen {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.sd-desktop #overlay .sd-order-track-progress,
  html body.sd-desktop #overlay .sd-order-track-items,
  html body.sd-desktop #overlay .sd-order-track-store-row {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.sd-desktop #overlay .sd-order-track-progress-step {
    min-width: 0 !important;
  }

  /* Cards genéricos sem borda excessiva */
  html body.sd-desktop #overlay .sd-hist-card,
  html body.sd-desktop #overlay .sd-delivery-order-card,
  html body.sd-desktop #overlay .wallet-history-card {
    border: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
  }

  /* SVG genérico */
  html body.sd-desktop #overlay svg {
    max-width: 48px !important;
    max-height: 48px !important;
  }
  html body.sd-desktop #overlay img {
    max-width: 100% !important;
    height: auto;
  }

  /* Carteira actions empilhadas */
  html body.sd-desktop #overlay .wallet-actions-ref {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  html body.sd-desktop #overlay .wallet-actions-ref .wallet-action {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 16px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid #e9e9e9 !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    box-shadow: none !important;
    text-align: left !important;
  }
  html body.sd-desktop #overlay .wallet-actions-ref .wallet-action::after {
    content: "›" !important;
    color: #000000 !important;
    font: 400 18px/1 Inter, sans-serif !important;
  }

  html body.sd-desktop #overlay .wallet-economy-periods {
    display: grid !important;
    grid-template-columns: 1.15fr 1fr 1fr !important;
    gap: 0 !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid #ececec !important;
  }
  html body.sd-desktop #overlay .wallet-economy-period {
    min-width: 0 !important;
    padding: 0 8px !important;
    border-left: 1px solid #ececec !important;
  }
  html body.sd-desktop #overlay .wallet-economy-period:first-child {
    padding-left: 0 !important;
    border-left: 0 !important;
  }
  html body.sd-desktop #overlay .wallet-economy-period small,
  html body.sd-desktop #overlay .wallet-economy-period strong {
    display: block !important;
    white-space: nowrap !important;
  }

  /* Esconde busca mobile no desktop */
  html body.sd-desktop .sd-category-searchbar,
  html body.sd-desktop .sd-category-accordion,
  html body.sd-desktop .sd-search-page,
  html body.sd-desktop .sd-search-sticky {
    display: none !important;
  }
  html body.sd-desktop .sd-category-accordion-chevron {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
  }
}


/* Perfil desktop: drawer sem scroll externo e tela interna rolável, sem scrollbar visível. */
@media (min-width: 769px) {
  html body.sd-desktop #overlay.sd-profile-overlay > .drawer.profile-drawer:has(> .sd-profile-screen) {
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay > .drawer.profile-drawer:has(> .sd-profile-screen) > .sd-profile-screen {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay > .drawer.profile-drawer:has(> .sd-profile-screen) > .sd-profile-screen::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}
