.listings-mine__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.listings-tabs.sales-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Fail closed during rollout. ads_ui_guard.js reveals the entrypoint only
   after the authenticated overview confirms PROMOTION_ENGINE_ENABLED=true. */
#adsCenterOpen { display: none; }
html.ads-ui-enabled #adsCenterOpen { display: inline-flex; }

body.is-ads-center-open {
  overflow: hidden;
}

.ads-center {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ads-center.is-open { display: flex; }

.ads-center__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, .58);
}

.ads-center__card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(860px, calc(100dvh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #dfe3e8;
  border-radius: 24px;
  background: #f5f6f8;
  color: #101828;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .20);
}

.ads-center__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}

.ads-center__heading {
  min-width: 0;
}

.ads-center__title {
  margin: 0;
  color: #101828;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.ads-center__subtitle {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.45;
}

.ads-center__balance {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 14px;
  padding: 0 11px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f2f4f7;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.ads-center__close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f2f4f7;
  color: #475467;
  cursor: pointer;
  box-shadow: none;
}

.ads-center__close .material-symbols-outlined {
  font-size: 21px;
}

.ads-center__close:hover,
.ads-center__close:focus-visible {
  background: #e4e7ec;
  color: #101828;
  outline: none;
}

.ads-center__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .48fr);
  gap: 18px;
  padding: 22px 24px 0;
}

.ads-center__field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.ads-center__field--wide {
  grid-column: 1 / -1;
}

.ads-center__label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.ads-center__select,
.ads-center__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  color: #101828;
  font: inherit;
  outline: none;
  box-shadow: none;
}

.ads-center__select:hover,
.ads-center__input:hover {
  border-color: #b8bec8;
}

.ads-center__select:focus,
.ads-center__input:focus {
  border-color: #7f56d9;
  box-shadow: 0 0 0 1px #7f56d9;
}

.ads-center__tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ads-center__tier {
  min-height: 48px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
  transition: background-color .15s ease, color .15s ease;
}

.ads-center__tier:hover {
  border-color: #d0d5dd;
  background: #eaecf0;
  color: #101828;
}

.ads-center__tier.is-active,
.ads-center__tier.is-active:hover {
  border-color: transparent;
  background: #7f56d9;
  color: #fff;
}

.ads-center__quote,
.ads-center__fund,
.ads-center__history {
  margin: 18px 24px 0;
  padding: 18px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
}

.ads-center__quote {
  display: grid;
  gap: 0;
}

.ads-center__quote-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
  padding: 9px 0;
  border-bottom: 1px solid #eaecf0;
  color: #667085;
  font-size: 14px;
}

.ads-center__quote-row:first-child {
  padding-top: 0;
}

.ads-center__quote-row:last-child {
  min-height: 29px;
  padding-bottom: 0;
  border-bottom: 0;
}

.ads-center__quote strong {
  color: #101828;
  font-weight: 700;
  text-align: right;
}

.ads-center__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 16px 24px 0;
}

.ads-center__actions .btn,
.ads-center__fund-row .btn {
  min-height: 48px;
  border-radius: 14px;
  box-shadow: none;
  transform: none;
}

.ads-center__actions #adsActivate {
  border-color: transparent;
  background: #7f56d9;
  color: #fff;
}

.ads-center__actions #adsActivate:hover,
.ads-center__actions #adsActivate:focus-visible {
  border-color: transparent;
  background: #6941c6;
  color: #fff;
}

.ads-center__actions #adsRefreshQuote,
.ads-center__fund-row #adsFund {
  border: 1px solid #e4e7ec;
  background: #fff;
  color: #344054;
}

.ads-center__actions #adsRefreshQuote:hover,
.ads-center__fund-row #adsFund:hover {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #101828;
}

.ads-center__status {
  min-height: 18px;
  margin: 10px 24px 0;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.ads-center__status:empty {
  min-height: 0;
  margin-top: 0;
}

.ads-center__status.is-error { color: #b42318; }
.ads-center__status.is-success { color: #067647; }

.ads-center__fund {
  margin-top: 18px;
}

.ads-center__fund-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 10px;
}

.ads-center__history {
  margin-bottom: 24px;
}

.ads-center__history-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.ads-center__history-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eaecf0;
  color: #344054;
  font-size: 13px;
}

.ads-center__history-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ads-center__muted {
  padding: 8px 0 2px;
  color: #667085;
  font-size: 13px;
}

.listing-owner-actions #adsCenterOpen { display: none; }
html.ads-ui-enabled .listing-owner-actions #adsCenterOpen { display: flex; }

@media (max-width: 640px) {
  .ads-center {
    align-items: flex-end;
    padding: 0;
  }

  .ads-center__card {
    width: 100%;
    max-height: 94dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .ads-center__head {
    padding: 20px 16px 16px;
  }

  .ads-center__title {
    font-size: 21px;
  }

  .ads-center__subtitle {
    font-size: 13px;
  }

  .ads-center__grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 18px 16px 0;
  }

  .ads-center__field--wide {
    grid-column: auto;
  }

  .ads-center__quote,
  .ads-center__fund,
  .ads-center__history {
    margin-right: 16px;
    margin-left: 16px;
    padding: 16px;
  }

  .ads-center__actions {
    grid-template-columns: 1fr;
    margin-right: 16px;
    margin-left: 16px;
  }

  .ads-center__actions #adsActivate {
    order: 1;
  }

  .ads-center__actions #adsRefreshQuote {
    order: 2;
  }

  .ads-center__status {
    margin-right: 16px;
    margin-left: 16px;
  }

  .ads-center__fund-row {
    grid-template-columns: 1fr;
  }

  .ads-center__history {
    margin-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
