/* ==========================================
   CANDIBEAN BEAUTIFUL UI COMPONENTS
   ========================================== */

/* 1. CARDS & GLASSMORPHISM */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-inset);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:active {
  transform: scale(0.98);
}

.card-glowing {
  background: var(--grad-card);
  border: var(--border-glass);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-glowing:hover, .card-glowing:active {
  border-color: rgba(191, 28, 139, 0.3);
  box-shadow: 0 4px 25px rgba(191, 28, 139, 0.15);
}

/* Wallet Balances Card (Double Premium Gradient) */
.wallet-card {
  background: var(--grad-wallet);
  border-radius: 24px;
  padding: 24px;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 15px 35px rgba(19, 12, 183, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.wallet-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}

.wallet-card .wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wallet-card h3 {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

.wallet-card .balance {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -1px;
  margin-top: 4px;
}

.wallet-card .details {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* 2. BUTTONS & ACTIONS */
.btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
  transform: scale(0.95);
  background: var(--primary-dark);
  box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
  border: var(--border-glass);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.96);
}

.btn-teal {
  background: var(--teal);
  color: #01010a;
  box-shadow: 0 6px 20px var(--teal-glow);
  font-weight: 800;
}

.btn-teal:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 12px;
  width: auto;
}

/* 3. INPUT FIELDS & FORMS */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-glow {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(18, 16, 35, 0.8);
  border: var(--border-glass);
  color: var(--text-white);
  font-size: 15px;
  font-weight: 400;
  transition: all 0.25s ease;
  outline: none;
}

.input-glow:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  background: rgba(18, 16, 35, 0.9);
}

/* 4. CHIPS & STATUS CHIPS */
.status-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-pending {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.status-active, .status-approved, .status-delivered {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green);
}

.status-rejected {
  background: rgba(244, 67, 54, 0.15);
  color: var(--red);
}

/* 5. TABS & SWITCHES */
.tabs-container {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
  border: var(--border-glass);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* 6. MODALS & DIALOGS */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #0f0d22;
  border: var(--border-glass);
  border-radius: 28px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 19px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

/* 7. REWARD COUNTDOWN PROCESS OVERLAY */
.reward-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 1, 5, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.reward-card {
  width: 100%;
  background: rgba(16, 13, 31, 0.95);
  border-radius: 28px;
  border: var(--border-glass);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(191, 28, 139, 0.1);
  animation: pulseNeon 3s infinite;
}

/* Central Orb Graphics */
.central-orb {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--teal);
  border-bottom-color: var(--primary);
  border-left-color: var(--gold);
  animation: spin 2.5s linear infinite;
}

.orb-core {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 28, 139, 0.25) 0%, rgba(191, 28, 139, 0) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: pulseOrb 1s ease-in-out infinite alternate;
}

.orb-number {
  font-size: 38px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -1px;
}

.orb-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: -2px;
}

/* Orb pulsing animation */
@keyframes pulseOrb {
  0% { transform: scale(0.93); opacity: 0.85; }
  100% { transform: scale(1.07); opacity: 1; }
}

.progress-track {
  width: 70%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin: 20px auto 0 auto;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 30%;
  border-radius: 3px;
  animation: progressPulse 1.5s ease-in-out infinite alternate;
}

@keyframes progressPulse {
  0% { opacity: 0.5; width: 25%; }
  100% { opacity: 1; width: 75%; }
}

/* ==========================================
   8. SAVINGS POT GROUP CHAT COMPONENTS
   ========================================== */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 45vh;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  border: var(--border-glass);
  margin-bottom: 16px;
  scroll-behavior: smooth;
}

.chat-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: fadeIn 0.25s ease;
}

.chat-bubble-wrapper.left {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble-wrapper.right {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-sender-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 2px;
  margin-left: 4px;
}

.chat-bubble {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.chat-bubble-wrapper.left .chat-bubble {
  background: #2E2E2E; /* Charcoal glass-gray */
  border: var(--border-glass);
  border-radius: 16px 16px 16px 4px;
}

.chat-bubble-wrapper.right .chat-bubble {
  background: var(--primary); /* Official Teal */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 4px 16px;
}

.chat-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
  margin-right: 4px;
}

.chat-input-bar {
  display: flex;
  gap: 10px;
}

/* ==========================================
   9. INTERACTIVE NOTIFICATIONS CENTER
   ========================================== */
.notification-card {
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background-color 0.2s ease;
}

.notification-card.unread {
  background: rgba(0, 137, 123, 0.08);
  border-color: rgba(0, 137, 123, 0.25);
}

.notification-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-date {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-notif-accept {
  flex: 1;
  background: var(--green);
  color: white;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-notif-accept:active {
  opacity: 0.8;
}

.btn-notif-decline {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: var(--border-glass);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-notif-decline:active {
  background: rgba(255, 255, 255, 0.12);
}

/* ==========================================
   10. INTERACTIVE CANVAS SCRATCH CARD
   ========================================== */
.scratch-card-container {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  background: #1e1e1e;
  border: 2px solid var(--gold);
}

.scratch-card-reward-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.scratch-card-reward-bg h3 {
  font-size: 15px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scratch-card-reward-bg .reward-coins {
  font-size: 42px;
  font-weight: 900;
  color: var(--gold);
  margin: 10px 0;
  text-shadow: 0 0 12px rgba(201, 162, 39, 0.3);
}

.scratch-card-reward-bg p {
  font-size: 12px;
  color: var(--text-secondary);
}

#scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: grab;
  touch-action: none; /* Prevents scrolling when scratching on mobile */
}

#scratch-canvas:active {
  cursor: grabbing;
}

/* ==========================================
   11. SUB-VIEW HEADERS (POTS / VIBECOINS BACK NAVIGATION)
   ========================================== */
.sub-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 24px;
  border-bottom: var(--border-glass);
}

.sub-view-header .header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sub-view-header .btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glass);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-view-header .btn-back:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.92);
}

.sub-view-header .btn-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.sub-view-header .sub-view-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
}

/* ==========================================
   12. GOOGLE AUTHENTICATION COMPONENTS
   ========================================== */

/* Custom Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
  margin-right: 12px;
}

.auth-divider:not(:empty)::after {
  margin-left: 12px;
}

/* Premium Google Sign-In Button */
.btn-google {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-google:hover, .btn-google:active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(0.97);
}

.btn-google svg {
  vertical-align: middle;
}

/* Redesigned Wallet Card: QR Code Clickable Column Trigger */
.wallet-qr-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.wallet-qr-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.12) !important;
}

.wallet-qr-btn:active {
  transform: scale(0.95) translateY(0) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4) !important;
}
