/* =========================
  ScanWin — merchant-dashboard.css
========================= */

/* Recent-activity timestamp (under the amount on the right) */
.sw-activity__time {
  font-size: 11px;
  line-height: 14px;
  margin-top: 2px;
}

/* At the 4-across (xl) stat row, merchant values carry a " pts" suffix
   that is wider than the influencer's short $ values — keep them on one
   line by tightening the value type and sparkline width slightly. */
@media (min-width: 1200px) {
  .sw-stat__value {
    font-size: 26px;
    line-height: 34px;
    white-space: nowrap;
  }
  .sw-stat__spark {
    max-width: 52px;
  }
}

@media (min-width: 1440px) {
  .sw-stat__value {
    font-size: 32px;
    line-height: 40px;
    white-space: nowrap;
  }
}

/* =========================
   Active Campaigns — horizontal carousel (figma 1567:18438)
========================= */
.sw-carousel__track {
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.sw-carousel__track::-webkit-scrollbar {
  display: none;
}
.sw-carousel__item {
  flex: 0 0 86%;
  min-width: 0;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .sw-carousel__item {
    flex-basis: calc((100% - 16px) / 2);
  }
}
@media (min-width: 992px) {
  .sw-carousel__item {
    flex-basis: calc((100% - 32px) / 2);
  }
}
@media (min-width: 1200px) {
  .sw-carousel__item {
    flex-basis: calc((100% - 32px) / 3);
  }
}

/* Prev / next controls (top-right of the section head) */
.sw-carousel__nav {
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
}
/* Bootstrap .btn themed through its variables. Padding is the <button>'s
   own 1px 6px, which .btn would otherwise replace. */
.sw-carousel__btn {
  --bs-btn-padding-y: 1px;
  --bs-btn-padding-x: 6px;
  --bs-btn-color: var(--sw-text-muted);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--sw-border);
  --bs-btn-border-radius: 50%;
  --bs-btn-hover-color: var(--sw-text);
  --bs-btn-hover-bg: #f5f5f7;
  --bs-btn-hover-border-color: var(--sw-border-strong);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-border-color);
  --bs-btn-disabled-color: var(--bs-btn-color);
  --bs-btn-disabled-bg: var(--bs-btn-bg);
  --bs-btn-disabled-border-color: var(--bs-btn-border-color);
  --bs-btn-disabled-opacity: 0.45;
  width: 36px;
  height: 36px;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}
.sw-carousel__btn svg {
  width: 18px;
  height: 18px;
}

/* Campaign card header: brand name + status badge on one row, meta below */
.sw-campaign__brand-row .sw-status {
  align-self: center;
  flex-shrink: 0;
}
.sw-campaign__brand-row .sw-campaign__brand-name {
  white-space: nowrap;
}

/* Earning overview — range dropdown chevron */
.sw-range-select__chev {
  transition: transform 0.18s ease;
}
.sw-range-select.show .sw-range-select__chev {
  transform: rotate(180deg);
}

/* =========================
   Campaign card — actual product photo logo (figma 1567:18451).
   The 3 designed campaigns use a circular product shot instead of a
   flat brand mark; brand-logo cards keep the base contain styling.
========================= */
.sw-campaign__logo--photo {
  width: 44px;
  height: 44px;
  background: #18181b;
}

/* =========================
   Top locations — rank-change trend pill (figma 1567:19149).
   Up = green, down = red, flat = grey dash.
========================= */
/* Bootstrap .badge.rounded-pill (its line-height: 1 is the design's) */
.sw-creator__trend {
  --bs-badge-padding-y: 3px;
  --bs-badge-padding-x: 8px;
  --bs-badge-font-size: 11px;
  display: inline-flex;
  gap: 2px;
  min-width: 40px;
}
.sw-creator__trend svg {
  width: 11px;
  height: 11px;
}
.sw-creator__trend--up {
  --bs-badge-color: #16a34a;
  background: #e7f8ef;
}
.sw-creator__trend--down {
  --bs-badge-color: #dc2626;
  background: #fdecec;
}
.sw-creator__trend--flat {
  --bs-badge-color: #9ca3af;
  background: #f3f4f6;
}

/* Subtitle under the leaderboard title (account-type scope label) */
.sw-leaderboard__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--sw-text-muted);
}

/* Footer: total ranked + the merchant's own rank change */
.sw-leaderboard__foot {
  padding-top: 14px;
  border-top: 1px solid var(--sw-border);
  gap: 12px;
}
.sw-leaderboard__foot-text {
  font-size: 12px;
  color: var(--sw-text-muted);
}
.sw-leaderboard__foot-you {
  gap: 6px;
  font-size: 12px;
}

/* =========================
   Share modal — merchant variant: "Choose a location to share"
   (figma 1852:4394). Reuses the .sw-share-modal shell; this swaps the
   influencer social-platform body for a per-location tracking-link table.
========================= */
.sw-locshare {
  --bs-modal-width: min(720px, calc(100vw - 32px));
}
.sw-locshare .sw-share-modal__head {
  padding: 22px 24px 16px;
}
.sw-locshare .sw-share-modal__title {
  font-size: 18px;
  line-height: 24px;
}
.sw-locshare .sw-share-modal__subtitle {
  font-size: 12.5px;
}
.sw-locshare__head-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sw-violet);
}
.sw-locshare__head-icon svg {
  width: 22px;
  height: 22px;
}

/* Search + division filter */
.sw-locshare__tools {
  gap: 10px;
  padding: 0 24px 14px;
}
.sw-locshare__search {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  background: #f7f7fa;
  border: 1px solid var(--sw-border);
  border-radius: 10px;
  min-width: 0;
}
.sw-locshare__search svg {
  width: 16px;
  height: 16px;
  color: var(--sw-text-faint);
  flex-shrink: 0;
}
.sw-locshare__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
  color: var(--sw-text);
}
/* Division filter — dropdown (matches the app's menu style) */
.sw-locshare__division {
  flex-shrink: 0;
}
/* Bootstrap .btn themed through its variables. It sits in a line box, so
   vertical-align is pinned back from .btn's middle. */
.sw-locshare__division-btn {
  --bs-btn-padding-y: 0px;
  --bs-btn-padding-x: 12px;
  --bs-btn-font-size: 13px;
  --bs-btn-font-weight: 500;
  --bs-btn-color: var(--sw-text);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--sw-border);
  --bs-btn-border-radius: 10px;
  --bs-btn-hover-color: var(--bs-btn-color);
  --bs-btn-hover-bg: var(--bs-btn-bg);
  --bs-btn-hover-border-color: var(--sw-border-strong);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-border-color);
  gap: 6px;
  height: 40px;
}
.sw-locshare__division-chev {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}
.sw-locshare__division-btn.show .sw-locshare__division-chev {
  transform: rotate(180deg);
}
/* Bootstrap paints an open .btn with its active (= hover) border; the
   legacy menu kept the resting border unless the button was hovered. */
.sw-locshare__division-btn.show:not(:hover):not(:active) {
  border-color: var(--bs-btn-border-color);
}

/* Bootstrap Dropdown (data-bs-display="static"); same recipe as the range
   menu above — stays laid out for the fade + slide, .show = open. */
.sw-locshare__division-menu {
  --bs-dropdown-spacer: 6px;
  --bs-dropdown-link-hover-color: var(--sw-text);
  --bs-dropdown-link-hover-bg: transparent;
  --bs-dropdown-link-active-color: var(--sw-text);
  --bs-dropdown-link-active-bg: transparent;
  display: block;
  top: 100%;
  margin-top: var(--bs-dropdown-spacer);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 16, 32, 0.12);
  padding: 6px;
  list-style: none;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s linear 0.15s;
}
.sw-locshare__division-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.sw-locshare__division-opt {
  gap: 10px;
  padding: 8px 10px;
  background: none;
  font-size: 13px;
  color: var(--sw-text);
  white-space: normal;
  cursor: pointer;
  transition: background 0.12s;
}
.sw-locshare__division-opt:hover {
  background: #f3f4f6;
}
.sw-locshare__division-opt.is-selected {
  background: var(--sw-violet-50);
  color: var(--sw-violet);
}
.sw-locshare__division-opt svg {
  width: 14px;
  height: 14px;
  color: var(--sw-violet);
  opacity: 0;
  flex-shrink: 0;
}
.sw-locshare__division-opt.is-selected svg {
  opacity: 1;
}

/* Scrollable location table */
.sw-locshare__table {
  flex: 1;
  min-height: 0;
  border-top: 1px solid var(--sw-border);
}
.sw-locshare__thead,
.sw-locshare__row {
  display: grid;
  grid-template-columns: 200px 1fr 72px 168px;
  gap: 12px;
}
.sw-locshare__thead {
  padding: 10px 24px;
  background: #f9fafb;
}
.sw-locshare__thead span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sw-text-faint);
}
.sw-locshare__thead span:last-child {
  text-align: right;
}
.sw-locshare__row {
  padding: 12px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.sw-locshare__row.is-hidden {
  display: none;
}
.sw-locshare__loc {
  gap: 10px;
  min-width: 0;
}
.sw-locshare__ico {
  width: 34px;
  height: 34px;
  background: var(--sw-violet);
}
.sw-locshare__ico svg {
  width: 18px;
  height: 18px;
}
.sw-locshare__nm {
  gap: 2px;
  min-width: 0;
}
.sw-locshare__store {
  font-size: 13.5px;
  color: #0f0f21;
}
.sw-locshare__city {
  font-size: 11px;
  color: #6b7380;
}
.sw-locshare__link {
  min-width: 0;
}
.sw-locshare__link span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--sw-violet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Bootstrap .badge.rounded-pill */
.sw-locshare__pill {
  --bs-badge-padding-y: 3px;
  --bs-badge-padding-x: 9px;
  --bs-badge-font-size: 10.5px;
  --bs-badge-color: #055e45;
  line-height: inherit;
  background: #d1fae5;
}
/* Bootstrap .btn themed through its variables */
.sw-locshare__copy,
.sw-locshare__share {
  --bs-btn-padding-y: 0px;
  --bs-btn-padding-x: 11px;
  --bs-btn-font-size: 11.5px;
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 8px;
  --bs-btn-hover-color: var(--bs-btn-color);
  --bs-btn-hover-border-color: var(--bs-btn-border-color);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-border-color);
  gap: 5px;
  height: 32px;
}
.sw-locshare__copy {
  --bs-btn-color: #0f0f21;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #e5e5eb;
  --bs-btn-hover-bg: #f7f7fa;
}
.sw-locshare__copy svg {
  width: 14px;
  height: 14px;
}
.sw-locshare__share {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sw-violet);
  --bs-btn-border-color: var(--sw-violet);
  --bs-btn-hover-bg: var(--bs-btn-bg);
}
.sw-locshare__share:hover {
  filter: brightness(1.05);
}
.sw-locshare__share svg {
  width: 15px;
  height: 15px;
}
.sw-locshare__empty {
  padding: 28px 24px;
  font-size: 13px;
  color: var(--sw-text-muted);
}

/* Footer */
.sw-locshare__foot {
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--sw-border);
}
.sw-locshare__csv {
  font-size: 13px;
  color: var(--sw-violet);
  text-decoration: none;
}
.sw-locshare__csv:hover {
  text-decoration: underline;
}
/* Bootstrap .btn themed through its variables */
.sw-locshare__done {
  --bs-btn-padding-y: 0px;
  --bs-btn-padding-x: 22px;
  --bs-btn-font-size: 13px;
  --bs-btn-font-weight: 600;
  --bs-btn-color: #fff;
  --bs-btn-bg: #0f1020;
  --bs-btn-border-width: 0px;
  --bs-btn-border-radius: 10px;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1f2030;
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  height: 40px;
}

.sw-ac-card__head {
  margin-bottom: 20px;
}

.sw-ac__title {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.02em;
}

.sw-ac__subtitle {
  font-size: 13px;
  line-height: 100%;
  color: var(--sw-text-secondary);
}

/* Phones: rows stack, panel is a bottom sheet (shell already handles that) */
@media (max-width: 575px) {
  .sw-locshare__thead {
    display: none;
  }
  .sw-locshare__tools {
    flex-wrap: wrap;
  }
  .sw-locshare__division {
    flex: 1;
  }
  .sw-locshare__division-btn {
    width: 100%;
    justify-content: center;
  }
  /* left-aligned on phones; [data-bs-popper] beats Bootstrap's
     .dropdown-menu-end right alignment while the menu is open */
  .sw-locshare__division-menu,
  .sw-locshare__division-menu[data-bs-popper] {
    left: 0;
    right: auto;
    width: 100%;
  }
  .sw-locshare__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "loc   scans"
      "link  link"
      "acts  acts";
    gap: 8px 12px;
  }
  .sw-locshare__loc {
    grid-area: loc;
  }
  .sw-locshare__scans {
    grid-area: scans;
    justify-self: end;
  }
  .sw-locshare__link {
    grid-area: link;
  }
  .sw-locshare__acts {
    grid-area: acts;
  }
  .sw-locshare__copy,
  .sw-locshare__share {
    flex: 1;
    justify-content: center;
  }
  
  .sw-carousel__nav {
    margin-left: auto;
    margin-top: 12px;
  }

  .sw-ac__title {
    font-size: 18px;
    line-height: 24px;    
  }
  .sw-ac__subtitle {
    font-size: 12px;
  }
  .sw-carousel__nav {
    padding: 8px 10px;
  }
  .sw-carousel__btn  {
    width: 26px;
    height: 26px;
  }
  .sw-campaign__top {
    --bs-card-cap-padding-x: 14px;
    gap: 10px;
  }
  .sw-campaign__logo--photo {
    width: 40px;
    height: 40px;
  }

  .sw-campaign__brand-name {
    font-size: 14px;
  }
  .sw-campaign__brand-meta,
  .sw-campaign__earned-label,
  .sw-campaign__pdi {
    font-size: 11px;
  }
  .sw-pill-live, .sw-status {
    --bs-badge-font-size: 9px;
  }
  .sw-campaign {
    --bs-card-spacer-y: 14px;
    --bs-card-spacer-x: 14px;
  }
  .sw-campaign__middle {
    padding-bottom: 14px;
  }
  .sw-campaign__actions {
    --bs-card-cap-padding-y: 14px;
    --bs-card-cap-padding-x: 14px;
    padding-bottom: 14px;
  }
  .sw-campaign__earned-row {
    justify-content: space-between;
  }
  .sw-campaign__delta {
    --bs-badge-font-size: 10px;
  }
  .sw-creator__trend {
    display: none;
  }
}
