/* ============================================
   SUBSCRIPTION FLOW STYLES
   ============================================ */

:root {
  --primary-color: #007bff;
  --primary-dark: #0056b3;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --border-color: #dee2e6;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ============================================
   STEP FORMS - CONTAINERS
   ============================================ */

.step-form {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.step-form.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.step-form.fade-out {
  animation: fadeOut 0.3s ease-in forwards;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 30px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .form-container {
    padding: 30px 20px;
    margin: 20px;
  }
}

/* ============================================
   FORM HEADERS
   ============================================ */

.step-form h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 10px;
  margin-top: 0;
}

.form-subtitle {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 30px;
  line-height: 1.5;
}

.form-subtitle strong {
  color: var(--dark-color);
  font-weight: 600;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   INPUT FIELDS
   ============================================ */

.phone-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.country-code {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background-color: var(--light-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-color);
  min-width: 70px;
}

.phone-input,
.form-select {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-family: inherit;
  background-color: white;
}

.phone-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.phone-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  background-color: #f0f7ff;
}

.form-select {
  cursor: pointer;
  appearance: none;
  padding-right: 35px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 35px;
}

.phone-input::placeholder {
  color: #999;
}

.form-select option {
  padding: 10px;
}

/* Input States */
.phone-input.error,
.form-select.error {
  border-color: var(--danger-color);
  background-color: #fff5f5;
}

.phone-input.error:focus,
.form-select.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.phone-input.success,
.form-select.success {
  border-color: var(--success-color);
  background-color: #f5fff5;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.error-message {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: var(--danger-color);
  font-weight: 500;
  animation: slideInLeft 0.3s ease-out;
}

.error-message::before {
  content: "âš  ";
  margin-right: 4px;
}

.global-error-message {
  display: none;
  padding: 16px 20px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: var(--border-radius);
  color: #721c24;
  font-weight: 500;
  margin-bottom: 20px;
  animation: slideInLeft 0.3s ease-out;
}

.global-error-message::before {
  content: "âœ• ";
  margin-right: 8px;
  font-weight: bold;
}

/* ============================================
   SUCCESS MESSAGES
   ============================================ */

.success-message {
  padding: 14px 16px;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: var(--border-radius);
  color: #155724;
  font-weight: 500;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-out;
}

.success-message::before {
  content: "âœ“ ";
  margin-right: 8px;
  font-weight: bold;
}

/* ============================================
   PAYMENT SUMMARY
   ============================================ */

.payment-summary {
  background-color: var(--light-color);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  animation: fadeIn 0.4s ease-out;
}

.payment-summary h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: var(--dark-color);
  font-weight: 600;
}

.payment-summary p {
  margin: 10px 0;
  font-size: 14px;
  color: var(--secondary-color);
  display: flex;
  justify-content: space-between;
}

.payment-summary strong {
  color: var(--dark-color);
  font-weight: 600;
}

.payment-summary p:last-child {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 18px;
  color: var(--primary-color);
  font-weight: 700;
}

/* ============================================
   FORM ACTIONS (BUTTONS)
   ============================================ */

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.form-actions button {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.btn-primary:disabled {
  background-color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-secondary {
  background-color: white;
  color: var(--secondary-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--light-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  z-index: -1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  flex: 1;
}

.progress-step::after {
  content: attr(data-step);
  position: absolute;
  bottom: -30px;
  font-size: 12px;
  color: var(--secondary-color);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--secondary-color);
  transition: var(--transition);
  z-index: 1;
}

.progress-step.active .progress-indicator {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.progress-step.completed .progress-indicator {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.progress-step.completed .progress-indicator::after {
  content: 'âœ“';
  font-size: 20px;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--light-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.btn-primary.loading {
  position: relative;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .step-form h2 {
    font-size: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .payment-summary p {
    flex-direction: column;
    gap: 5px;
  }

  .progress-steps {
    margin-bottom: 50px;
  }

  .progress-step::after {
    bottom: -35px;
    font-size: 11px;
  }

  .progress-indicator {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 20px 15px;
    border-radius: 12px;
  }

  .step-form h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .form-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .country-code {
    min-width: 60px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .phone-input,
  .form-select {
    padding: 10px 12px;
    font-size: 14px;
  }

  .phone-input-wrapper {
    gap: 8px;
  }

  .form-actions {
    gap: 8px;
  }

  .form-actions button {
    padding: 12px 16px;
    font-size: 14px;
  }

  .payment-summary {
    padding: 15px;
    margin-bottom: 20px;
  }

  .payment-summary h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .payment-summary p {
    font-size: 13px;
    margin: 8px 0;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
.phone-input:focus-visible,
.form-select:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .phone-input,
  .form-select {
    border-width: 3px;
  }

  .btn-primary,
  .btn-secondary {
    font-weight: 700;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .step-form,
  .step-form.fade-in,
  .step-form.fade-out,
  .error-message,
  .success-message,
  .payment-summary {
    animation: none;
  }

  .phone-input:focus,
  .form-select:focus,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --dark-color: #e0e0e0;
    --light-color: #2d2d2d;
    --border-color: #444;
  }

  .form-container {
    background-color: #1e1e1e;
    color: var(--dark-color);
  }

  .phone-input,
  .form-select,
  .country-code {
    background-color: #2d2d2d;
    color: var(--dark-color);
    border-color: #444;
  }

  .phone-input:focus,
  .form-select:focus {
    background-color: #333;
  }

  .payment-summary {
    background-color: #2d2d2d;
    border-color: #444;
  }

  .btn-secondary {
    background-color: #2d2d2d;
    color: var(--dark-color);
  }

  .btn-secondary:hover {
    background-color: #3d3d3d;
  }

  .progress-steps::before {
    background-color: #444;
  }

  .progress-indicator {
    background-color: #1e1e1e;
    border-color: #444;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--secondary-color);
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Monnify Payment Module */
.mnf-payment {
  max-width: 360px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  padding: 16px;
  font-family: Arial, Helvetica, sans-serif;
}

/* Header */
.mnf-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
  margin-bottom: 14px;
}

.mnf-merchant {
  font-weight: bold;
}

/* Amount box */
.mnf-amount-box {
  background: #e8f6f4;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.mnf-amount-box h2 {
  margin: 0;
  font-size: 26px;
}

.mnf-amount-box p {
  margin-top: 6px;
  font-size: 12px;
  color: #555;
}

/* TEST badge */
.mnf-badge {
  text-align: center;
  margin: 14px 0;
}

.mnf-badge span {
  background: #ffe8b5;
  color: #b07000;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: bold;
}

/* Instruction */
.mnf-instruction {
  text-align: center;
  font-size: 13px;
  margin-bottom: 12px;
}

/* Bank details */
.mnf-bank-box {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.mnf-bank-name {
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 1px;
  color:#b07000;
}

.mnf-account-number {
  font-size: 20px;
  color: #0a8f8f;
  font-weight: bold;
  margin: 6px 0;
}

.mnf-warning {
  color: #d9534f;
  font-size: 12px;
  margin-bottom: 8px;
}

.mnf-account-name {
  font-size: 13px;
  color: #777;
}

/* Expiry */
.mnf-expiry {
  font-size: 12px;
  color: #777;
  text-align: center;
  margin: 14px 0;
}

/* USSD link */
.mnf-ussd {
  display: block;
  text-align: center;
  color: #0a8f8f;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 14px;
}

/* Button */
.mnf-confirm-btn {
  width: 100%;
  background: #f57c00;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.mnf-confirm-btn:hover {
  background: #e66f00;
}

.crypto-payment {
  max-width: 420px;
  margin: auto;
  font-family: Arial, sans-serif;
  text-align: center;
}

.crypto-header {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-weight: bold;
  margin-bottom: 20px;
}

.crypto-icon {
  font-size: 22px;
}

.crypto-amount-box {
  background: #f0f7ff;
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.crypto-amount-box h2 {
  margin: 0;
}

.crypto-instruction {
  font-size: 14px;
  margin-bottom: 14px;
}

.crypto-qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.crypto-wallet-box {
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.crypto-network {
  font-size: 13px;
  margin-bottom: 8px;
}

.crypto-address {
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 10px;
}

.crypto-copy-btn {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}


#btc-payment-widget {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  max-width: 360px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  overflow: hidden;
}

#btc-payment-widget .header {
  background: #1f4fbf;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
}

#btc-payment-widget .details {
  padding: 16px;
}

#btc-payment-widget .merchant {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

#btc-payment-widget .description {
  color: #555;
  font-size: 14px;
  margin-top: 4px;
}

#btc-payment-widget .currency {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

#btc-payment-widget .rate {
  color: #777;
  margin-left: 6px;
}

#btc-payment-widget .qr-box {
  display: flex;
  justify-content: center;
  padding: 16px;
}

#btc-payment-widget .link {
  display: block;
  text-align: center;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
}

#btc-payment-widget .wallet-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  background: #4f83f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 15px;
  cursor: pointer;
}

#btc-payment-widget .wallet-btn:hover {
  background: #3c6fe0;
}

#btc-payment-widget .feedback {
  text-align: center;
  font-size: 13px;
  color: #16a34a;
  padding-bottom: 12px;
}



/* ðŸ”¥ Flashing Banner */
#promo-banner {
  margin: 15px auto;
  padding: 14px 20px;
  background: linear-gradient(90deg, #ff9800, #ff5722);
  color: #fff;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  animation: flashGlow 1.2s infinite;
  max-width: 900px;
}

#promo-banner:hover {
  transform: scale(1.01);
}

/* Glow animation */
@keyframes flashGlow {
  0% { box-shadow: 0 0 5px rgba(255,87,34,0.4); }
  50% { box-shadow: 0 0 18px rgba(255,87,34,0.9); }
  100% { box-shadow: 0 0 5px rgba(255,87,34,0.4); }
}

.promo-brand {
  text-decoration: underline;
}

/* ðŸªŸ Modal */
.promo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.promo-modal.hidden {
  display: none;
}

.promo-modal-content {
  background: #fff;
  padding: 30px;
  max-width: 420px;
  width: 90%;
  border-radius: 10px;
  text-align: center;
  position: relative;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.promo-modal-content h2 {
  margin-bottom: 10px;
}

.promo-modal-content ul {
  text-align: left;
  margin: 15px auto;
  max-width: 260px;
}

.promo-cta {
  margin-top: 20px;
  padding: 12px 22px;
  background: #ff5722;
  border: none;
  color: white;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.promo-cta:hover {
  background: #e64a19;
}

.promo-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
}

.promo-modal-content li{
    color:black;
}

/* ===== RAFFLE OVERLAY ===== */
#raffleOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Modal */
.raffle-modal {
  width: 800px;
  max-width: 95%;
  display: flex;
  background: linear-gradient(135deg, #7b1fa2, #ffca28);
  border-radius: 16px;
  overflow: hidden;
  color: white;
  position: relative;
}

/* Pop animation */
.pop-in {
  animation: popIn .45s ease-out;
}

@keyframes popIn {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.raffle-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

/* Left */
.raffle-left {
  flex: 1;
  padding: 40px;
  background: #7b1fa2;
}

.raffle-left h1 {
  font-size: 48px;
  line-height: 1;
}

.raffle-left span {
  color: #ffeb3b;
}

/* Right */
.raffle-right {
  flex: 1;
  padding: 40px;
  background: #ffca28;
  color: #222;
  text-align: center;
}

.raffle-right h2 span {
  color: #7b1fa2;
}

.raffle-right input {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  margin: 15px 0;
}

.raffle-right button {
  padding: 14px;
  width: 100%;
  border: none;
  background: #7b1fa2;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

/* 🎊 Confetti */
.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  animation: fall linear forwards;
  z-index: 100000;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

.pop-in {
  animation: popIn .6s cubic-bezier(.2,1.5,.5,1);
}

@keyframes popIn {
  from {transform: scale(.7); opacity: 0}
  to {transform: scale(1); opacity: 1}
}

.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  animation: fall linear forwards;
  z-index: 100000;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}





