/* =========================
  ScanWin — my-campaigns.css
========================= */

/* =========================
  Page Header (title + Export CSV) Start
========================= */
.sw-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.sw-page-head__title {
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.44px;
  color: #0f1020;
  margin: 0 0 6px;
}
.sw-page-head__subtitle {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #6b7280;
  margin: 0;
}

.sw-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #0f1020;
  text-decoration: none;
  flex-shrink: 0;
}
.sw-btn-export:hover {
  background: #f9fafb;
  color: #0f1020;
}
.sw-btn-export svg {
  width: 16px;
  height: 16px;
}
/* =========================
  Page Header End
========================= */

/* =========================
  Stat Card (base + simple variant) Start
========================= */
.sw-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.sw-stat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sw-stat__head-l {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sw-stat__iconbox {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sw-stat__iconbox--violet {
  background: #eeedfe;
  color: var(--sw-violet);
}
.sw-stat__iconbox--green {
  background: #d1fae5;
  color: #047857;
}
.sw-stat__iconbox--yellow {
  background: #fef3c7;
  color: #b45309;
}
.sw-stat__label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: #6b7280;
}
.sw-stat__value {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.64px;
  color: #0f1020;
  margin: 0;
  padding-bottom: 4px;
}
.sw-stat--simple {
  gap: 12px;
}
.sw-stat--simple .sw-stat__head {
  padding: 0;
}
.sw-stat__caption {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  line-height: 14px;
  margin: 0;
}
/* =========================
  Stat Card End
========================= */

/* =========================
  Toolbar (filter tabs + view switch) Start
========================= */
.sw-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.sw-toolbar__tabs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

/* Filter tab pills */
.sw-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
}
.sw-tab:hover {
  background: #f9fafb;
  color: #0f1020;
}
.sw-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 16px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}
.sw-tab.is-active {
  background: #0f1020;
  color: #fff;
  border-color: #0f1020;
}
.sw-tab.is-active:hover {
  color: #fff;
  background: #1a1a2e;
}
.sw-tab.is-active .sw-tab__count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Two-button segmented control: List / Grid */
.sw-view-switch {
  display: inline-flex;
  align-items: center;
  background: #F3F4F6;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}
.sw-view-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  text-decoration: none;
}
.sw-view-switch__btn:hover {
  color: #0f1020;
}
.sw-view-switch__btn.is-active {
  background: #fff;
  color: #0f1020;
  box-shadow:
    0 1px 2px rgba(15, 16, 32, 0.08),
    0 0 0 1px #e5e7eb;
}
.sw-view-switch__btn svg {
  width: 14px;
  height: 14px;
}
/* =========================
  Toolbar End
========================= */

/* =========================
  List View — sw-camp-table Start
========================= */
.sw-camp-table {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  overflow-x: auto;
}

.sw-camp-table__head {
  display: grid;
  grid-template-columns:
    minmax(220px, 2.2fr)
    105px
    minmax(120px, 1fr)
    minmax(160px, 1.4fr)
    minmax(140px, 1.2fr)
    140px;
  gap: 16px;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6b7280;
}
.sw-camp-table__head > span:last-child {
  text-align: right;
}

.sw-camp-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 2.2fr)
    105px
    minmax(120px, 1fr)
    minmax(160px, 1.4fr)
    minmax(140px, 1.2fr)
    140px;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.sw-camp-row:last-child {
  border-bottom: 0;
}
.sw-camp-row:hover {
  background: #fafafb;
}

.sw-camp-row__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sw-camp-row__logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: contain;
  background: #f3f4f6;
  flex-shrink: 0;
}
.sw-camp-row__brand-text {
  min-width: 0;
  line-height: 1.3;
}
.sw-camp-row__brand-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #0f1020;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-camp-row__brand-cat {
  display: block;
  font-size: 11px;
  color: #6B7280;
}

/* .sw-verify-badge moved to assets/css/style.css so dashboard,
   my-campaigns and any future campaign-card surface can share it. */

/* Status pill (Live / Pending / Completed) */
.sw-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: 0.6px;
  white-space: nowrap;
  width: fit-content;
}
.sw-pill-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
}
.sw-pill-status--live {
  background: #d1fae5;
  color: #065f46;
}
.sw-pill-status--live::before {
  background: #10b981;
}
.sw-pill-status--pending {
  background: #fef3c7;
  color: #b45309;
}
.sw-pill-status--pending::before {
  background: #f59e0b;
}
.sw-pill-status--completed {
  background: #ede9fe;
  color: #6d28d9;
}
.sw-pill-status--completed::before {
  background: #8b5cf6;
}

.sw-camp-row__earnings {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sw-camp-row__earnings-amt {
  font-size: 14px;
  font-weight: 600;
  color: #0f1020;
}
.sw-camp-row__earnings-note {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

.sw-camp-row__perf {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.sw-camp-row__perf-text {
  font-size: 13px;
  font-weight: 500;
  color: #0f1020;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-camp-row__perf-bar {
  height: 6px;
  background: #f3f4f6;
  border-radius: 32px;
  overflow: hidden;
}
.sw-camp-row__perf-bar-fill {
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 4px,
      rgba(255, 255, 255, 0) 4px 8px
    ),
    linear-gradient(180deg, #6e5ef7 0%, #9c8ff7 100%);
}

.sw-camp-row__period {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sw-camp-row__period-range {
  font-size: 13px;
  font-weight: 500;
  color: #0f1020;
  white-space: nowrap;
}
.sw-camp-row__period-note {
  font-size: 11px;
  color: #9ca3af;
}

.sw-camp-row__action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.sw-row-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-violet);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.sw-row-link:hover {
  color: var(--sw-violet-600);
}
.sw-row__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  padding: 0;
  border: 0;
  color: #000000;
  cursor: pointer;
}
.sw-row__more:hover {
  color: #6B7280;
}
.sw-row__more svg {
  width: 20px;
  height: 20px;
}

.sw-camp-row__logo-letter {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sw-camp-row__logo-letter--7up {
  background: #d8232a;
}
.sw-camp-row__logo-letter--lays {
  background: #fbbf24;
  color: #b45309;
}
.sw-camp-row__logo-letter--gatorade {
  background: #f97316;
}
/* =========================
  List View End
========================= */

/* =========================
  Grid View — sw-campaign Card Start
========================= */
.sw-campaign {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sw-campaign__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f3f4f6;
}
.sw-campaign__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}
.sw-campaign__brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sw-campaign__brand-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #0f1020;
}
.sw-campaign__brand-meta {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

/* LIVE green pill */
.sw-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #d1fae5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #065f46;
}
.sw-pill-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}

.sw-campaign__middle {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px;
}
.sw-campaign__earned-label {
  font-size: 12px;
  line-height: 16px;
  color: #9ca3af;
}
.sw-campaign__earned-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sw-campaign__earned {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.32px;
  color: #0f1020;
  margin: 0;
}
.sw-campaign__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
}
.sw-campaign__delta-icon {
  width: 14px;
  height: 14px;
}

.sw-campaign__progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sw-campaign__scans {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.sw-campaign__scans-l {
  font-weight: 600;
  color: #0f1020;
}
.sw-campaign__scans-r {
  font-weight: 400;
  color: #6b7280;
}

.sw-campaign__bar {
  height: 12px;
  background: #f3f4f6;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}
.sw-campaign__bar-fill {
  height: 100%;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 6px,
      rgba(255, 255, 255, 0) 6px 12px
    ),
    linear-gradient(180deg, #6e5ef7 0%, #9c8ff7 100%);
}
.sw-campaign__pdi {
  font-size: 12px;
  line-height: 16px;
  color: #9ca3af;
  margin: 0;
}

.sw-campaign__actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
}
.sw-btn-soft,
.sw-btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  height: 40px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.sw-btn-soft {
  background: var(--sw-violet);
  border: 0;
  color: #fff;
}
.sw-btn-soft:hover {
  background: var(--sw-violet-600);
  color: #fff;
}
.sw-btn-ghost {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #0f1020;
}
.sw-btn-ghost:hover {
  background: #f9fafb;
  color: #0f1020;
}
/* =========================
  Grid View End
========================= */

/* =========================
  View visibility helpers
  Driven by data-view="list|grid" on the main element
  (set by the sw-view-switch__btn click handler in JS).
========================= */
[data-view="grid"] .sw-view-list {
  display: none;
}
[data-view="list"] .sw-view-grid {
  display: none;
}

/* =========================
  Responsive Start
========================= */

/* Tablet (≤991.98px): stack page-head, scroll filter tabs */
@media (max-width: 991.98px) {
  .sw-page-head {
    flex-direction: column;
  }
  .sw-btn-export {
    width: 100%;
    justify-content: center;
  }

  .sw-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 16px;
    gap: 8px;
  }
  .sw-toolbar__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .sw-toolbar__tabs::-webkit-scrollbar {
    display: none;
  }
  .sw-toolbar__tabs > * {
    flex-shrink: 0;
  }
  .sw-view-switch {
    align-self: flex-start;
  }
}

/* Phone (≤767.98px): stack rows into cards */
@media (max-width: 767.98px) {
  .sw-camp-table {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .sw-camp-table__head {
    display: none;
  }

  .sw-camp-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    gap: 10px 12px;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand    brand   more"
      "earnings period   period"
      "perf     perf     action";
  }
  .sw-camp-row__brand {
    grid-area: brand;
    min-width: 0;
  }
  .sw-camp-row__status {
    grid-area: more;
    justify-self: start;
    align-self: center;
    margin-right: 26px;
    display: flex;
  }
  .sw-camp-row__earnings {
    grid-area: earnings;
  }
  .sw-camp-row__period {
    grid-area: period;
    text-align: right;
    align-items: flex-end;
  }
  .sw-camp-row__perf {
    grid-area: perf;
    align-self: center;
  }
  .sw-camp-row__action {
    display: contents;
  }
  .sw-camp-row__action .sw-row__more {
    grid-area: more;
    justify-self: end;
    align-self: center;
  }
  .sw-camp-row__action .sw-row-link {
    grid-area: action;
    justify-self: end;
    align-self: center;
  }
}

/* Phone (≤575.98px): tighten stat number */
@media (max-width: 575.98px) {
  .sw-stat {
    padding: 12px;
  }
  
  .sw-stat__iconbox {
    width: 32px;
    height: 32px;
  }

  .sw-stat__iconbox svg {
    width: 16px;
    height: 16px;
  }

  .sw-stat__label {
    font-size: 12px;
    line-height: 16px;
  }

  .sw-campaign__earned {
    font-size: 24px;
  }
}
/* =========================
  Responsive End
========================= */


/* .sw-share-modal moved to assets/css/style.css so any page with
   a #swShareModal markup block + main.js loaded will get the
   share-link popup automatically. */
