/* Mobile dashboard presentation. */
@media (max-width: 899px) {
  .merchant-round-badge { overflow: visible; }
  .merchant-round-badge .btn-change-logo-badge {
    width: 18px;
    height: 18px;
    padding: 0;
    right: -4px;
    bottom: 1px;
  }
  .merchant-round-badge .btn-change-logo-badge svg {
    width: 10px !important;
    height: 10px !important;
  }
}
.dashboard-tile-art,
.dashboard-design-heading { display: none; }

@media (max-width: 899px) {
  .dashboard-card-grid,
  .dashboard-content-body .scratch-cards-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 0 !important;
    width: calc(100% - 8px) !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }
  .dashboard-card-grid { margin-bottom: 6px !important; }
  .dashboard-content-body .scratch-cards-row { margin-top: 0 !important; margin-bottom: 12px !important; }
  .dashboard-card-grid > .hero-action-card,
  .dashboard-card-grid > .stat-card-box,
  .dashboard-content-body .scratch-cards-row > .promo-card {
    height: clamp(140px, 36vw, 215px) !important;
    min-height: 0 !important;
    padding: 7px 6px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 5px 14px rgba(20, 55, 100, .12) !important;
    color: #fff !important;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    transition: transform .15s ease !important;
  }
  .dashboard-card-grid > .hero-btn-add { background: linear-gradient(140deg, #009cff, #0067f5) !important; }
  .dashboard-card-grid > #statCardDesigned { background: linear-gradient(140deg, #02ad77, #008958) !important; }
  .dashboard-card-grid > #statCardAssigned { background: linear-gradient(140deg, #ff941c, #ff590e) !important; }
  .dashboard-card-grid > #statCardUsed { background: linear-gradient(140deg, #fa259f, #da0676) !important; }
  .dashboard-content-body .scratch-cards-row > .purple { background: linear-gradient(140deg, #7b2ce0, #4820bc) !important; }
  .dashboard-content-body .scratch-cards-row > .magenta { background: linear-gradient(140deg, #f20b53, #ca0038) !important; }

  /* Equal row tracks align paired icons, headings, captions and action pills. */
  .dashboard-card-grid > .hero-btn-add,
  .dashboard-card-grid > #statCardDesigned {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) 20px 18px 28px !important;
    gap: 2px !important;
    align-content: stretch !important;
    justify-content: stretch !important;
    justify-items: center;
    text-align: center;
  }
  .dashboard-card-grid .hero-btn-add .hero-action-texts { display: contents !important; }
  .dashboard-card-grid .hero-btn-add .hero-action-icon-wrap,
  .dashboard-card-grid #statCardDesigned .dashboard-tile-art {
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
  }
  .dashboard-card-grid .hero-btn-add .hero-action-img-icon,
  .dashboard-card-grid #statCardDesigned .dashboard-tile-art img {
    width: clamp(58px, 18vw, 120px) !important;
    height: 100% !important;
    max-height: 96px;
    object-fit: contain;
  }
  .dashboard-card-grid .hero-btn-add .hero-action-main-text,
  .dashboard-card-grid #statCardDesigned .dashboard-design-heading {
    display: block;
    grid-column: 1 !important;
    grid-row: 2 !important;
    font-size: clamp(14px, 3.8vw, 25px) !important;
    font-weight: 900;
    line-height: 20px !important;
    letter-spacing: -.4px;
    white-space: nowrap !important;
    margin: 0 !important;
  }
  .dashboard-card-grid .hero-btn-add .hero-action-sub-text,
  .dashboard-card-grid #statCardDesigned .stat-title-label {
    grid-column: 1 !important;
    grid-row: 3 !important;
    font-size: clamp(10px, 2.75vw, 18px) !important;
    line-height: 18px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
  }
  .dashboard-card-grid .stat-card-top,
  .dashboard-card-grid .stat-metric-badge,
  .dashboard-card-grid .hero-action-arrow-icon { display: none !important; }
  /* Keep the live design count available to assistive technology. */
  .dashboard-card-grid #statCardDesigned .stat-number-value {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .dashboard-card-grid > #statCardAssigned,
  .dashboard-card-grid > #statCardUsed {
    height: clamp(140px, 36vw, 215px) !important;
    min-height: 0 !important;
    padding: 7px 6px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 20px 42px 28px;
    gap: 2px !important;
    text-align: center;
    justify-items: center;
  }
  .dashboard-card-grid #statCardAssigned .dashboard-tile-art,
  .dashboard-card-grid #statCardUsed .dashboard-tile-art {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1;
    width: 100%;
    min-height: 0;
  }
  .dashboard-tile-art svg { width: 44px; height: 38px; max-height: 100%; filter: drop-shadow(0 3px 3px #0002); }
  .dashboard-card-grid #statCardAssigned .stat-title-label,
  .dashboard-card-grid #statCardUsed .stat-title-label {
    grid-row: 2;
    font-size: clamp(11px, 3.05vw, 21px) !important;
    line-height: 20px !important;
    font-weight: 900 !important;
    letter-spacing: -.4px;
    white-space: nowrap !important;
    margin: 0 !important;
  }
  .dashboard-card-grid #statCardAssigned .stat-number-value,
  .dashboard-card-grid #statCardUsed .stat-number-value {
    grid-row: 3;
    margin: 0 !important;
    font-size: clamp(36px, 10vw, 66px) !important;
    line-height: 42px !important;
    font-weight: 900;
  }
  .dashboard-card-grid .stat-bottom-pill,
  .dashboard-content-body .scratch-cards-row .btn-promo-action {
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 5px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, .22) !important;
    color: #fff !important;
    font-size: clamp(9px, 2.55vw, 16px) !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    text-decoration: none;
    box-shadow: none !important;
    overflow: hidden;
  }
  .dashboard-card-grid .stat-bottom-pill { grid-column: 1 !important; grid-row: 4 !important; }
  .dashboard-card-grid .stat-bottom-pill span:first-child { white-space: nowrap !important; }
  .dashboard-card-grid .stat-bottom-pill span:last-child { flex-shrink: 0; }

  .dashboard-content-body .scratch-cards-row > .promo-card {
    display: grid !important;
    grid-template-columns: 38% minmax(0, 1fr);
    grid-template-rows: 18px minmax(0, 1fr) 26px 28px;
    column-gap: 4px;
    row-gap: 2px;
  }
  .dashboard-content-body .scratch-cards-row .promo-card-content { display: contents; }
  .dashboard-content-body .scratch-cards-row .promo-visual-graphic {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    grid-column: 1;
    grid-row: 1 / 4;
    align-items: center;
    overflow: hidden;
  }
  .dashboard-content-body .scratch-cards-row .promo-card-title,
  .dashboard-content-body .scratch-cards-row .promo-card-number,
  .dashboard-content-body .scratch-cards-row .promo-card-sub { grid-column: 2; grid-row: 1; margin: 0 !important; text-align: left !important; }
  .dashboard-content-body .scratch-cards-row .promo-card-title {
    align-self: start;
    padding-top: 0;
    font-size: clamp(9px, 2.65vw, 19px) !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    letter-spacing: -.4px;
  }
  .dashboard-content-body .scratch-cards-row .promo-card-number {
    grid-row: 2;
    align-self: center;
    font-size: clamp(32px, 10vw, 66px) !important;
    line-height: 1 !important;
  }
  .dashboard-content-body .scratch-cards-row .promo-card-sub {
    grid-row: 3;
    align-self: center;
    padding-bottom: 0;
    font-size: clamp(8px, 2.1vw, 14px) !important;
    line-height: 1.2 !important;
  }
  .dashboard-content-body .scratch-cards-row .btn-promo-action { grid-column: 1 / -1; grid-row: 4; }
  .dashboard-content-body .scratch-cards-row .scratch-mini-card-3d { width: 48px !important; height: 78px !important; transform: rotate(-7deg) !important; }
  .dashboard-content-body .scratch-cards-row .mini-card-header { font-size: 7px !important; }
  .dashboard-content-body .scratch-cards-row .mini-scratch-foil { flex: 1; width: 90%; }
  .dashboard-content-body .scratch-cards-row .magenta .promo-visual-graphic { justify-content: flex-start !important; }
  .dashboard-content-body .scratch-cards-row .unscratch-card-fan { width: 68px !important; height: 86px !important; transform: translateX(-1px); flex-shrink: 0; }
  .dashboard-content-body .scratch-cards-row .fan-card-1 { left: 8px; transform: rotate(-10deg); }
  .dashboard-content-body .scratch-cards-row .fan-card-2 { left: 10px; }
  .dashboard-content-body .scratch-cards-row .fan-card-3 { left: 12px; transform: rotate(10deg); }
  .dashboard-content-body .scratch-cards-row .fan-card-item { width: 46px !important; height: 74px !important; }
  .dashboard-content-body .scratch-cards-row .fan-gift-icon { font-size: 25px !important; }
}

@media (max-width: 380px) {
  .dashboard-content-body .scratch-cards-row .unscratch-card-fan { width: 54px !important; height: 70px !important; }
  .dashboard-content-body .scratch-cards-row .fan-card-item { width: 34px !important; height: 60px !important; }
  .dashboard-content-body .scratch-cards-row .fan-gift-icon { font-size: 20px !important; }
  .dashboard-content-body .scratch-cards-row .scratch-mini-card-3d { width: 38px !important; height: 64px !important; }
}

.dashboard-card-grid #statCardAssigned .stat-number-value.unlimited-value,
.dashboard-card-grid #statCardDesigned .stat-number-value.unlimited-value {
  font-size:clamp(18px,5vw,30px) !important;
  letter-spacing:0;
  white-space:nowrap;
}
