/**
 * 2025 Rework Agency
 * RW - Alerte retour en stock : styles front (design system léger, sans dépendance).
 */
.rwsa {
  --rwsa-accent: #111827;
  --rwsa-accent-contrast: #ffffff;
  --rwsa-border: #e6e8ec;
  --rwsa-bg: #ffffff;
  --rwsa-muted: #6b7280;
  --rwsa-ok: #0f7b4f;
  --rwsa-err: #c0392b;
  --rwsa-radius: 14px;

  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  margin: 20px 0;
  background: var(--rwsa-bg);
  border: 1px solid var(--rwsa-border);
  border-radius: var(--rwsa-radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 20px rgba(16, 24, 40, 0.06);
  font-size: 15px;
  line-height: 1.5;
  color: #1f2430;
}

/* Icon badge */
.rwsa__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--rwsa-accent);
}

.rwsa__content {
  flex: 1 1 auto;
  min-width: 0;
}

.rwsa__title {
  margin: 2px 0 2px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rwsa__desc {
  margin: 0 0 12px;
  color: var(--rwsa-muted);
  font-size: 14px;
}

.rwsa__desc--ok {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rwsa-ok);
  font-weight: 600;
}

/* Social proof pill */
.rwsa__proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--rwsa-muted);
  font-size: 12.5px;
  font-weight: 600;
}

/* Input + button group */
.rwsa__group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.rwsa__input {
  flex: 1 1 220px;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  color: #1f2430;
  background: #fff;
  border: 1px solid var(--rwsa-border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.rwsa__input::placeholder {
  color: #9aa1ac;
}

.rwsa__input:focus {
  outline: none;
  border-color: var(--rwsa-accent);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.rwsa__btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--rwsa-accent-contrast);
  background: var(--rwsa-accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.06s ease, opacity 0.15s ease, background 0.15s ease;
}

.rwsa__btn:hover {
  opacity: 0.92;
}

.rwsa__btn:active {
  transform: translateY(1px);
}

.rwsa__btn:disabled {
  cursor: default;
  opacity: 0.65;
}

.rwsa__btn.is-loading .rwsa__btn-label {
  visibility: hidden;
}

.rwsa__spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
}

.rwsa__btn.is-loading .rwsa__spinner {
  opacity: 1;
  animation: rwsa-spin 0.6s linear infinite;
}

@keyframes rwsa-spin {
  to { transform: rotate(360deg); }
}

/* Secondary "stop notifying" link */
.rwsa__link {
  margin-top: 4px;
  padding: 0;
  font-size: 13px;
  color: var(--rwsa-muted);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.rwsa__link:hover {
  color: #1f2430;
}

/* Feedback message */
.rwsa__message {
  margin-top: 10px;
  font-size: 13.5px;
  min-height: 0;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.rwsa__message.is-visible {
  opacity: 1;
  transform: none;
}

.rwsa__message--ok { color: var(--rwsa-ok); }
.rwsa__message--err { color: var(--rwsa-err); }

@media (max-width: 480px) {
  .rwsa { padding: 16px; }
  .rwsa__btn { width: 100%; }
}

/* =========================================================================
 * Account page ("My stock alerts")
 * ========================================================================= */
.rwsa-account-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rwsa-account-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eceef1;
}
.rwsa-account-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eceef1;
}
.rwsa-account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.rwsa-account-name {
  font-weight: 600;
  color: #1f2430;
}
.rwsa-account-status {
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
}
.rwsa-account-status--notified {
  background: #e7f6ee;
  color: #0f7b4f;
}
.rwsa-btn {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2430;
  background: #fff;
  border: 1px solid #d7dae0;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rwsa-btn:hover { background: #f6f7f9; }
.rwsa-empty { color: #6b7280; }

/* =========================================================================
 * Confirm / opt-in / unsubscribe result page
 * ========================================================================= */
.rwsa-confirm {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 28px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
}
.rwsa-confirm__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 8px;
}
.rwsa-confirm--success .rwsa-confirm__icon { background: #e7f6ee; color: #0f7b4f; }
.rwsa-confirm--error .rwsa-confirm__icon { background: #fdece9; color: #c0392b; }
.rwsa-confirm__message {
  font-size: 1.05rem;
  color: #1f2430;
  margin: 14px 0 24px;
}
