/* X-treme Smile customer-facing presentation layer.
   Loaded after the original Affiliate/Loyalty styles and scoped to module UI. */
:root {
  --xs-aff-accent: #ff0077;
  --xs-aff-dark: #1e2b2f;
  --xs-aff-soft: #fff4f9;
  --xs-aff-border: #eceff0;
  --xs-aff-text: #3d3d3d;
  --xs-aff-muted: #737b7f;
  --xs-aff-radius: 12px;
}

.xs-program-page-heading {
  margin: 0 0 18px;
  padding: 20px 22px;
  border-radius: var(--xs-aff-radius);
  background: var(--xs-aff-dark);
  color: #fff;
}
.xs-program-page-heading__eyebrow {
  display:block;
  margin-bottom:4px;
  color:var(--xs-aff-accent);
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.xs-program-page-heading h1,
.xs-program-page-heading h2 {
  margin:0 0 5px !important;
  color:#fff !important;
  font-size:26px !important;
  line-height:1.25 !important;
  font-weight:700 !important;
}
.xs-program-page-heading p {
  margin:0 !important;
  color:rgba(255,255,255,.76) !important;
  font-size:14px !important;
  line-height:1.55 !important;
}

/* Loyalty overview */
.card.card-loyalty {
  position:relative;
  margin:0 0 16px;
  padding:22px !important;
  overflow:hidden;
  border:1px solid var(--xs-aff-border) !important;
  border-radius:var(--xs-aff-radius) !important;
  background-color:#fff !important;
  background-image:none !important;
  box-shadow:0 6px 20px rgba(30,43,47,.05) !important;
}
.card.card-loyalty:after {
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  right:-65px;
  top:-70px;
  border-radius:50%;
  background:var(--xs-aff-soft);
  pointer-events:none;
}
.card-loyalty .card-body-loyalty { position:relative; z-index:1; }
.card-loyalty .coinspromotionheader { margin:0 0 10px !important; color:var(--xs-aff-accent) !important; font-size:11px !important; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.card-loyalty .icon-loyalty { width:24px !important; height:24px !important; animation:none !important; }
.card-loyalty h1.inline-content { margin:0 7px 0 0 !important; color:var(--xs-aff-dark) !important; font-size:54px !important; line-height:1 !important; font-weight:700 !important; }
.card-loyalty .inline-content { color:var(--xs-aff-text); }
.card-loyalty .text-muted-loyalty { margin:8px 0 0 !important; color:var(--xs-aff-muted) !important; }

.loyaltycoinscss-container {
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border-radius:0 !important;
}
.loyaltycoinscss-heading {
  margin:24px 0 12px !important;
  color:var(--xs-aff-dark) !important;
  font-size:20px !important;
  text-align:left !important;
}
.loyaltycoinscss-nav-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 12px !important;
  padding:6px !important;
  border:1px solid var(--xs-aff-border) !important;
  border-radius:calc(var(--xs-aff-radius) - 2px);
  background:#fff;
  list-style:none;
}
.loyaltycoinscss-nav-tabs li { margin:0 !important; }
.loyaltycoinscss-nav-tabs li a {
  display:block;
  padding:9px 13px !important;
  border-radius:7px !important;
  color:#5c6569 !important;
  font-size:13px;
  font-weight:600;
}
.loyaltycoinscss-nav-tabs li.active a,
.loyaltycoinscss-nav-tabs li a:hover {
  background:var(--xs-aff-soft) !important;
  color:var(--xs-aff-accent) !important;
}
.loyaltycoinscss-tab-content { margin:0 !important; }
.loyaltycoinscss-tab-pane {
  padding:18px !important;
  border:1px solid var(--xs-aff-border);
  border-radius:var(--xs-aff-radius) !important;
  background:#fff !important;
  box-shadow:0 5px 16px rgba(30,43,47,.035);
}
.loyaltycoinscss-table { margin:0 !important; }
.loyaltycoinscss-table th,
.loyaltycoinscss-table td { padding:11px 10px !important; border-bottom:1px solid #f0f1f2 !important; vertical-align:middle; }
.loyaltycoinscss-table th { background:#fafafa !important; color:#677074 !important; }
.loyaltycoinscss-table tbody tr:nth-child(even),
.loyaltycoinscss-table tbody tr:hover { background:transparent !important; }
.loyaltycoinscss-table h3 { margin:5px 0 !important; color:var(--xs-aff-dark) !important; font-size:14px !important; }
.blackwarningalertaffiliate { width:100% !important; border:1px solid #ffd5e8 !important; border-radius:8px !important; background:var(--xs-aff-soft) !important; color:#6a4b59 !important; }

/* Affiliate modern dashboard: preserve markup/behaviour, only reskin. */
.affiliate_modern_dashboard_page .container { width:100% !important; max-width:1280px; }
.affiliate_modern_dashboard_page .block_bg,
.affiliate_modern_dashboard_page .side_bar {
  border:1px solid var(--xs-aff-border);
  border-radius:var(--xs-aff-radius) !important;
  box-shadow:0 5px 16px rgba(30,43,47,.04);
}
.affiliate_modern_dashboard_page .side_bar { padding:20px !important; }
.affiliate_modern_dashboard_page .navigation .item { border-bottom-color:#eef0f1 !important; }
.affiliate_modern_dashboard_page .navigation .item.selected {
  background:var(--xs-aff-soft) !important;
  color:var(--xs-aff-accent) !important;
}
.affiliate_modern_dashboard_page .navigation .item.selected a,
.affiliate_modern_dashboard_page .navigation .item.selected svg { color:var(--xs-aff-accent) !important; fill:var(--xs-aff-accent) !important; stroke:var(--xs-aff-accent) !important; }
.affiliate_dashboard_theme_mod .primary_cta,
.affiliate_modern_dashboard_page .btn-primary,
.affiliate_modern_dashboard_page .btn-success {
  background:var(--xs-aff-accent) !important;
  border-color:var(--xs-aff-accent) !important;
  color:#fff !important;
  border-radius:8px !important;
}
.affiliate_dashboard_theme_mod .primary_cta:hover { filter:brightness(.94); background:var(--xs-aff-accent) !important; }
.affiliate_modern_dashboard_page .side_bar .side_bar_header .user_title .level { color:var(--xs-aff-accent) !important; background:var(--xs-aff-soft) !important; }
.affiliate_modern_dashboard_page input[type="radio"] { border-color:var(--xs-aff-accent) !important; }
.affiliate_modern_dashboard_page input[type="radio"]:checked { background-color:var(--xs-aff-accent) !important; border-color:var(--xs-aff-accent) !important; }
.affiliate_dashboard_theme_mod .bg_primary { background:var(--xs-aff-accent) !important; }

/* My-account tiles */
#my-account .myaccount-link-list a:has(.xs-loyalty-account-label),
#my-account .myaccount-link-list a:has(.xs-affiliate-account-label) {
  text-decoration:none;
}
.xs-loyalty-account-label,
.xs-affiliate-account-label { font-weight:600; }
.xs-loyalty-account-balance {
  display:block;
  margin-top:5px;
  font-size:13px;
  line-height:1.25;
  font-weight:600;
  color:var(--xs-aff-accent) !important;
}

/* Product and cart coin UI */
.product-information .card-loyalty,
.product-additional-info .card-loyalty {
  margin-top:12px !important;
  padding:15px 17px !important;
  box-shadow:none !important;
  background:var(--xs-aff-soft) !important;
  border-color:#ffd7e9 !important;
}
.product-information .card-loyalty:after,
.product-additional-info .card-loyalty:after { display:none; }
.cart-summary-line .switch input:checked + .slider { background-color:var(--xs-aff-accent) !important; }
.cart-summary-line .switch input:focus + .slider { box-shadow:0 0 1px var(--xs-aff-accent) !important; }

@media (max-width: 991px) {
  .affiliate_modern_dashboard_page .section_body { display:block !important; }
  .affiliate_modern_dashboard_page .side_bar,
  .affiliate_modern_dashboard_page .main_content { width:100% !important; }
  .affiliate_modern_dashboard_page .side_bar { margin-bottom:12px; }
  .xs-program-page-heading { padding:17px 18px; }
  .xs-program-page-heading h1,.xs-program-page-heading h2 { font-size:22px !important; }
}
@media (max-width: 575px) {
  .loyaltycoinscss-nav-tabs { display:block; }
  .loyaltycoinscss-nav-tabs li { display:block !important; margin:3px 0 !important; }
  .card-loyalty h1.inline-content { font-size:42px !important; }
  .loyaltycoinscss-tab-pane { padding:12px !important; overflow-x:auto; }
}
@media (max-width: 319px) {
  body { display: block !important; }
}

/* Loyalty coins page enhancements (3.0.7) */
.xs-loyalty-page {
  display:block;
}
.xs-loyalty-stats {
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
  margin:0 0 16px;
}
.xs-loyalty-stat {
  padding:18px 18px 16px;
  border:1px solid var(--xs-aff-border);
  border-radius:var(--xs-aff-radius);
  background:#fff;
  box-shadow:0 5px 16px rgba(30,43,47,.035);
}
.xs-loyalty-stat--primary {
  background:linear-gradient(135deg, rgba(255,0,119,.08), rgba(255,244,249,.9));
  border-color:#ffd2e4;
}
.xs-loyalty-stat__label {
  display:block;
  margin:0 0 8px;
  color:var(--xs-aff-muted);
  font-size:12px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.xs-loyalty-stat__value {
  display:block;
  margin:0 0 6px;
  color:var(--xs-aff-dark);
  font-size:34px;
  line-height:1.05;
  font-weight:700;
}
.xs-loyalty-stat__value--small {
  font-size:20px;
  line-height:1.3;
}
.xs-loyalty-stat__meta {
  display:block;
  color:var(--xs-aff-text);
  font-size:13px;
  line-height:1.55;
}
.xs-loyalty-note {
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid #ffd6e8;
  border-radius:10px;
  background:var(--xs-aff-soft);
  color:var(--xs-aff-text);
  font-size:14px;
  line-height:1.6;
}
.xs-loyalty-note strong { color:var(--xs-aff-dark); }

.xs-loyalty-page .card.card-loyalty {
  display:none !important;
}

.xs-loyalty-section-intro {
  margin:-4px 0 14px !important;
  color:var(--xs-aff-muted) !important;
  font-size:14px !important;
  line-height:1.6 !important;
}

.xs-loyalty-page .loyaltycoinscss-table {
  width:100%;
  border-collapse:collapse;
}
.xs-loyalty-page .loyaltycoinscss-table td:last-child,
.xs-loyalty-page .loyaltycoinscss-table th:last-child {
  text-align:right;
  white-space:nowrap;
  font-weight:700;
  color:var(--xs-aff-dark);
}
.xs-loyalty-page .loyaltycoinscss-table td img.icon-loyalty {
  width:18px !important;
  height:18px !important;
  margin-right:6px;
  vertical-align:middle;
}
.xs-loyalty-page .loyaltycoinscss-table h5.text-muted {
  color:var(--xs-aff-muted) !important;
  font-size:12px !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .panel,
.xs-loyalty-page .loyaltycoinscss-tab-pane .table-responsive,
.xs-loyalty-page .loyaltycoinscss-tab-pane .table,
.xs-loyalty-page .loyaltycoinscss-tab-pane .well,
.xs-loyalty-page .loyaltycoinscss-tab-pane .panel-payments {
  border-color:var(--xs-aff-border) !important;
  border-radius:10px !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .table {
  margin-bottom:0 !important;
  background:#fff;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .table thead th {
  background:#fafbfd !important;
  color:var(--xs-aff-muted) !important;
  font-weight:600;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .table td,
.xs-loyalty-page .loyaltycoinscss-tab-pane .table th {
  border-color:#eef1f2 !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane input[type="text"],
.xs-loyalty-page .loyaltycoinscss-tab-pane input[type="email"],
.xs-loyalty-page .loyaltycoinscss-tab-pane input[type="number"],
.xs-loyalty-page .loyaltycoinscss-tab-pane select,
.xs-loyalty-page .loyaltycoinscss-tab-pane textarea {
  border:1px solid #dfe5e7 !important;
  border-radius:8px !important;
  box-shadow:none !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .btn,
.xs-loyalty-page .loyaltycoinscss-tab-pane .button,
.xs-loyalty-page #request-payment,
.xs-loyalty-page #submit-payment-request {
  border-radius:8px !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .btn-primary,
.xs-loyalty-page .loyaltycoinscss-tab-pane .btn-success,
.xs-loyalty-page #request-payment,
.xs-loyalty-page #submit-payment-request {
  background:var(--xs-aff-accent) !important;
  border-color:var(--xs-aff-accent) !important;
  color:#fff !important;
}
.xs-loyalty-page .loyaltycoinscss-tab-pane .btn-primary:hover,
.xs-loyalty-page .loyaltycoinscss-tab-pane .btn-success:hover,
.xs-loyalty-page #request-payment:hover,
.xs-loyalty-page #submit-payment-request:hover {
  filter:brightness(.95);
}
.xs-loyalty-page .hint_affiliate,
.xs-loyalty-page .alert-info.hint_affiliate {
  border-radius:10px !important;
  border-color:#d8ebff !important;
  background:#f4f9ff !important;
  color:#34506a !important;
}

@media (max-width: 1199px) {
  .xs-loyalty-stats {
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}
@media (max-width: 767px) {
  .xs-loyalty-stats {
    grid-template-columns:1fr;
  }
  .xs-loyalty-stat__value {
    font-size:28px;
  }
  .xs-loyalty-stat__value--small {
    font-size:18px;
  }
}
