/* اشتراک‌های راسا اکوسیستم — buy button + in-place buy flow */

.rasa-buy-wrap { text-align: center; }

.rasa-buy-btn {
  --ra-accent: #1e4fd6;
  --ra-secondary: #0b1b3a;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1.6rem;
  font-family: "RasaYekan", "IRANYekanX", Tahoma, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ra-accent), color-mix(in srgb, var(--ra-accent) 70%, var(--ra-secondary)));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--ra-accent) 30%, transparent);
  transition: transform 0.15s ease;
}

.rasa-buy-btn:hover { transform: translateY(-2px); }

.rasa-buy-price {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.rasa-buy-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(6, 12, 30, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  direction: rtl;
  font-family: "RasaYekan", "IRANYekanX", Tahoma, sans-serif;
  animation: rasa-buy-fade 0.28s ease both;
}

@keyframes rasa-buy-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rasa-buy-modal {
  background: #fff;
  color: #0f172a;
  border-radius: 22px;
  padding: 1.6rem;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(6, 12, 30, 0.35);
  animation: rasa-buy-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  font-family: "RasaYekan", "IRANYekanX", Tahoma, sans-serif;
}

@keyframes rasa-buy-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.rasa-buy-modal h3 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.rasa-buy-modal .rasa-buy-sub { margin: 0 0 1.1rem; color: #64748b; font-size: 0.9rem; }

.rasa-buy-field { display: grid; gap: 0.35rem; margin-bottom: 0.85rem; }
.rasa-buy-field label { font-size: 0.82rem; font-weight: 700; color: #475569; }
.rasa-buy-field input {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}
.rasa-buy-field input:focus { outline: none; border-color: var(--ra-accent, #1e4fd6); }
.rasa-buy-field .rasa-buy-hint { font-size: 0.75rem; color: #94a3b8; direction: ltr; text-align: left; }
.rasa-buy-field .rasa-buy-hint.err { color: #dc2626; }
.rasa-buy-field .rasa-buy-hint.ok { color: #059669; }

.rasa-buy-choice { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.rasa-buy-choice button {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  text-align: right;
  font: inherit;
  cursor: pointer;
}
.rasa-buy-choice button:hover { border-color: var(--ra-accent, #1e4fd6); }
.rasa-buy-choice b { display: block; font-size: 0.98rem; }
.rasa-buy-choice span { color: #64748b; font-size: 0.82rem; }

.rasa-buy-summary {
  background: #f4f7fb;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rasa-buy-summary b { color: var(--ra-accent, #1e4fd6); }

.rasa-buy-primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.9rem;
  font: inherit;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ra-accent, #1e4fd6), var(--ra-secondary, #0b1b3a));
  margin-top: 0.4rem;
}
.rasa-buy-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.rasa-buy-ghost {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.75rem;
  font: inherit;
  background: #fff;
  cursor: pointer;
  margin-top: 0.5rem;
}

.rasa-buy-alert {
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

@media (max-width: 600px) {
  .rasa-buy-overlay { align-items: flex-end; padding: 0; }
  .rasa-buy-modal { max-width: 100%; border-radius: 24px 24px 0 0; }
}
