/* Cashback Pro V36.8.34 — final cascade for header chip, light filter and touch release. */

/* Header username chip: slightly narrower than V36.8.32.
   The Sáng/Tối switch remains a separate adjacent control. */
@media (max-width: 980px), (orientation: landscape) and (max-height: 820px) {
  html body header.app-header .header-controls .user-pill {
    width: clamp(98px, 25vw, 112px) !important;
    min-width: clamp(98px, 25vw, 112px) !important;
    max-width: clamp(98px, 25vw, 112px) !important;
    flex: 0 0 clamp(98px, 25vw, 112px) !important;
    box-sizing: border-box !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 6px !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  html body header.app-header .header-controls .user-pill #user-name-display {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 2px !important;
    margin: 0 !important;
    text-align: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  html body header.app-header .header-controls .user-pill .user-avatar {
    display: none !important;
  }

  html body header.app-header .header-controls .user-pill.is-guest #btn-auth-trigger {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    font-size: 9.5px !important;
  }
}

/* ROOT CAUSE:
   V36.7.83 explicitly paints .customer-withdrawals-filters #f6f8fc with
   a 1px border, 16px radius and inset shadow in Default Light. Earlier fixes
   used lower/similar specificity. This targeted selector wins in the final
   cascade and clears the wrapper AND its label surfaces. Actual date inputs
   and action buttons are deliberately excluded and keep their own styling. */
html body.theme-default.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters,
html body.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters,
html body.light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  padding: 0 !important;
  margin: 0 0 13px !important;
  min-height: 0 !important;
}

html body.theme-default.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::before,
html body.theme-default.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::after,
html body.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::before,
html body.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::after,
html body.light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::before,
html body.light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body.theme-default.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters > label,
html body.default-light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters > label,
html body.light-mode #tab-finance .customer-withdrawals-card .customer-withdrawals-filters > label {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Remove a possible carried divider on the status chips above the date row.
   The status buttons themselves remain individual controls. */
html body.theme-default.default-light-mode #tab-finance .customer-withdrawals-card > .customer-withdrawals-status-filters,
html body.default-light-mode #tab-finance .customer-withdrawals-card > .customer-withdrawals-status-filters,
html body.light-mode #tab-finance .customer-withdrawals-card > .customer-withdrawals-status-filters {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* After touch release, return non-selected buttons to their base visual state.
   Keep .active/aria-selected/aria-pressed/aria-expanded states intact. */
@media (hover: none), (pointer: coarse) {
  html.v36834-touch-released body :is(button, a[href], [role="button"], input[type="button"], input[type="submit"], summary):hover:not(:active):not(.active):not([aria-selected="true"]):not([aria-pressed="true"]):not([aria-expanded="true"]):not(:disabled) {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    outline: none !important;
  }

  html.v36834-touch-released body .btn-convert:hover:not(:active):not(.active):not([aria-pressed="true"]):not(:disabled) {
    background: linear-gradient(135deg,
      color-mix(in srgb, var(--v3686-cta, var(--scene-accent, #8b82df)) 82%, white),
      var(--v3686-cta, var(--scene-accent, #8b82df))) !important;
    border-color: color-mix(in srgb, var(--v3686-cta, var(--scene-accent, #8b82df)) 74%, white) !important;
    color: var(--v3686-cta-ink, #fff) !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  html.v36834-touch-released body .btn-copy:hover:not(:active):not(.active):not([aria-pressed="true"]):not([aria-expanded="true"]):not(:disabled) {
    background: var(--bg-card, var(--bg-surface, #fff)) !important;
    background-image: none !important;
    border-color: var(--border-light, var(--border-color, rgba(130,150,180,.3))) !important;
    color: var(--text-main, #263449) !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  html.v36834-touch-released body .customer-withdrawals-refresh:hover:not(:active):not(:disabled) {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  html.v36834-touch-released body button:focus:not(:focus-visible),
  html.v36834-touch-released body a[href]:focus:not(:focus-visible),
  html.v36834-touch-released body [role="button"]:focus:not(:focus-visible) {
    outline: none !important;
  }
}


/* V36.8.35 — make the account chip distinctly narrower.
   Explicitly size both the flex item and its button; the adjacent Sáng/Tối
   control is not a descendant and therefore keeps its existing dimensions. */
@media (max-width: 980px), (orientation: landscape) and (max-height: 820px) {
  html body header.app-header .header-controls .user-pill {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    flex: 0 0 82px !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  html body header.app-header .user-pill #user-name-display,
  html body header.app-header .user-pill .user-name-trigger {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    flex: 0 0 82px !important;
    box-sizing: border-box !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
  }
}

/* Keep the name trigger above decorative header layers and reliably tappable. */
html body header.app-header .user-pill {
  position: relative !important;
  pointer-events: auto !important;
}
html body header.app-header #user-name-display {
  position: relative !important;
  z-index: 30011 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
}
html body header.app-header #header-actions-menu {
  pointer-events: auto !important;
  z-index: 30020 !important;
}
html body header.app-header #header-actions-menu[hidden] {
  display: none !important;
}
