﻿/* ==================== LINKWA ENROLLMENT MODAL ==================== */

.enroll-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.enroll-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.enroll-modal {
  background: linear-gradient(160deg, rgba(30, 20, 60, 0.98), rgba(15, 15, 35, 0.98));
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 28px;
  padding: 1.5rem;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px rgba(168, 85, 247, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
}

.enroll-modal-backdrop.active .enroll-modal {
  transform: translateY(0) scale(1);
}

.enroll-modal::-webkit-scrollbar { width: 6px; }
.enroll-modal::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 3px;
}

.enroll-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.enroll-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.enroll-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Plan selector */
.enroll-plan-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.enroll-plan-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.enroll-plan-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.enroll-plan-option.selected {
  border-color: rgba(168, 85, 247, 0.7);
  background: rgba(168, 85, 247, 0.12);
}

.enroll-plan-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enroll-plan-option.selected .enroll-plan-radio {
  border-color: #a855f7;
}

.enroll-plan-option.selected .enroll-plan-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
}

/* Tabs */
.enroll-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 0.35rem;
  margin-bottom: 1.25rem;
}

.enroll-tab {
  padding: 0.75rem;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s;
  border: none;
  background: transparent;
  font-family: inherit;
}

.enroll-tab:hover { color: #fff; }

.enroll-tab.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(6, 182, 212, 0.9));
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
}

/* Tab panes */
.enroll-pane { display: none; animation: fadeIn 0.3s ease; }
.enroll-pane.active { display: block; }

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

/* Payment methods grid */
.enroll-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.enroll-method {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s;
}

.enroll-method:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.4);
}

.enroll-method i {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: #a855f7;
}

/* CTA button */
.enroll-cta {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35);
}

.enroll-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(168, 85, 247, 0.5);
}

.enroll-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Voucher input */
.enroll-voucher-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.enroll-voucher-input:focus {
  outline: none;
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
}

/* Status messages */
.enroll-msg {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  display: none;
}

.enroll-msg.show { display: block; }
.enroll-msg.success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: #4ade80; }
.enroll-msg.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }
.enroll-msg.info { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); color: #60a5fa; }

/* Linkwa trust footer */
.enroll-trust {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.75rem;
}

/* Redirect overlay */
.linkwa-redirect-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.linkwa-redirect-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.linkwa-redirect-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spinLinkwa 1s linear infinite;
}

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

/* Mobile */
@media (max-width: 480px) {
  .enroll-modal {
    padding: 1.25rem;
    border-radius: 22px;
    max-height: 95vh;
  }
  .enroll-methods { grid-template-columns: repeat(2, 1fr); }
}
