/* SmartRiver LoyaltyProgram — styles complémentaires */

/* ── Reset layout (même traitement que les autres pages compte) ── */
body[id^="module-smartriver_loyaltyprogram-"] #wrapper {
  background: #fff;
  box-shadow: none;
  padding-top: 0;
}

body[id^="module-smartriver_loyaltyprogram-"] #wrapper > .container {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

body[id^="module-smartriver_loyaltyprogram-"] #content-wrapper {
  width: 100%;
  max-width: none;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

body[id^="module-smartriver_loyaltyprogram-"] #main .page-content,
body[id^="module-smartriver_loyaltyprogram-"] #main .page-footer {
  margin-bottom: 0;
}

body[id^="module-smartriver_loyaltyprogram-"].page-customer-account #content {
  padding: 0;
}

/* ── Séparateur des sections internes ── */
.srl-form-section-top {
  margin-top: var(--account-space-4, 32px);
  padding-top: var(--account-space-4, 32px);
  border-top: 1px solid var(--account-line, #e7ebf0);
}

/* ── Titre de section RGPD : barre rouge au lieu de verte ── */
.srl-section-title--danger::before {
  background: #c92a2a;
}

/* ── Ligne saisie conversion de points ── */
.srl-redeem-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.srl-redeem-row .form-control {
  width: 160px;
}

.srl-redeem-preview {
  color: var(--account-muted, #6b7480);
  font-size: 1rem;
}

/* ── Solde insuffisant ── */
.srl-locked {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--account-surface, #f7f9fb);
  border: 1px solid var(--account-line, #e7ebf0);
  border-radius: 10px;
  color: var(--account-muted, #6b7480);
  font-size: 0.95rem;
}

/* ── Bon de réduction créé ── */
.srl-voucher-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.srl-voucher-code {
  font-family: monospace;
  font-size: 1.2rem;
  background: #fff;
  border: 2px solid var(--account-brand, #28a745);
  border-radius: 6px;
  padding: 4px 12px;
  letter-spacing: 2px;
  color: var(--account-brand-deep, #1f8a39);
}

/* ── Badges type de transaction ── */
.srl-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.srl-badge--gain   { background: #e8f5e9; color: #2e7d32; }
.srl-badge--redeem { background: #e3f2fd; color: #1565c0; }
.srl-badge--expire { background: #fff3e0; color: #e65100; }
.srl-badge--manual { background: #f3e5f5; color: #6a1b9a; }
.srl-badge--leave  { background: #fce4ec; color: #c62828; }

/* ── Montants colorés ── */
.srl-positive { color: #2e7d32; font-weight: 700; }
.srl-negative { color: #c62828; font-weight: 700; }

/* ── Points gagnés par produit (panier / commande) ── */
.srl-cart-points {
  display: block;
  width: 100%;
  clear: both;
  margin-top: 6px;
  line-height: 1;
}

.srl-cart-points__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff3e0;
  color: #e65100;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
}

.srl-cart-points__badge i {
  font-size: 0.68rem;
}

.srl-cart-points__hint {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  color: #6b7480;
  font-size: 0.7rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  white-space: normal;
}

.srl-cart-points__hint i {
  margin-top: 1px;
  font-size: 0.72rem;
  flex: none;
}

/* ── Points échangeables ── */
.srl-redeemable {
  color: var(--account-brand, #28a745);
  font-weight: 700;
}

/* ── Pagination historique ── */
.srl-pagination {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* ── Checkbox consentement RGPD ── */
.srl-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  cursor: pointer;
}

.srl-consent-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.srl-consent-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--account-line, #e7ebf0);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-size: 0.7rem;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.srl-consent-input:checked + .srl-consent-box {
  border-color: var(--account-brand, #28a745);
  background: var(--account-brand, #28a745);
  color: #fff;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.28);
}

.srl-consent-input:focus-visible + .srl-consent-box {
  outline: 2px solid var(--account-brand, #28a745);
  outline-offset: 2px;
}

.srl-consent-label:hover .srl-consent-box {
  border-color: var(--account-brand, #28a745);
}

.srl-consent-text {
  font-size: 0.9rem;
  color: var(--account-accent, #1a1f29);
  line-height: 1.55;
}

.srl-consent-required {
  color: #c92a2a;
  margin-left: 2px;
  font-weight: 700;
}

/* ── Avantages (inscription) ── */
.srl-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srl-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--account-accent, #1a1f29);
}

.srl-benefits li .fa {
  color: var(--account-brand, #28a745);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Termes & conditions ── */
.srl-terms-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--account-surface, #f7f9fb);
  border: 1px solid var(--account-line, #e7ebf0);
  border-radius: 10px;
}

.srl-terms-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--account-accent, #1a1f29);
}

.srl-terms-text {
  font-size: 0.82rem;
  color: var(--account-muted, #6b7480);
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ── RGPD : bouton "Quitter" (details/summary) ── */
.srl-leave-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #c92a2a;
  border-radius: 6px;
  background: transparent;
  color: #c92a2a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.srl-leave-toggle::-webkit-details-marker { display: none; }

.srl-leave-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff8f8;
  border: 1px solid #f5c2c2;
  border-radius: 10px;
}

.srl-voucher-item button.btn.btn-sm.btn-outline-secondary.srl-copy-btn {
    color: white;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .srl-redeem-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .srl-redeem-row .form-control {
    width: 100%;
  }
}
