/* ── EsyPoints Frontend Styles ─────────────────────────────────────── */
:root {
  --ep-primary: #4f46e5;
  --ep-success: #16a34a;
  --ep-warn:    #dc2626;
  --ep-gold:    #f59e0b;
  --ep-bg:      #fff;
  --ep-radius:  14px;
  --ep-shadow:  0 8px 32px rgba(0,0,0,.18);
}

/* Floating badge */
#ep-floating-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 18px rgba(79,70,229,.45);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: transform .15s;
}
#ep-floating-badge:hover { transform: scale(1.06); }
.ep-badge-icon { font-size: 20px; }
@keyframes ep-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.25)} }
.ep-badge-pulse { animation: ep-pulse .4s ease; }

/* Modal */
.ep-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
}
.ep-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(3px);
}
.ep-modal-box {
  position: relative; background: var(--ep-bg);
  border-radius: var(--ep-radius); padding: 36px 32px;
  max-width: 420px; width: 90%; text-align: center;
  box-shadow: var(--ep-shadow);
  animation: ep-slideUp .25s ease;
}
@keyframes ep-slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.ep-modal-icon { font-size: 48px; margin-bottom: 12px; }
.ep-modal-box h3 { margin: 0 0 10px; font-size: 1.3rem; }
.ep-modal-box p  { color: #555; margin: 0 0 24px; line-height: 1.5; }
.ep-modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ep-btn { padding: 10px 22px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; font-size: .95rem; transition: opacity .15s; display: inline-block; }
.ep-btn:hover { opacity: .85; }
.ep-btn-primary   { background: var(--ep-primary); color: #fff; }
.ep-btn-secondary { background: #e5e7eb; color: #374151; }
.ep-modal-box.ep-warn    .ep-modal-icon::after { content:'⚠️'; font-size: 48px; }
.ep-modal-box.ep-success { border-top: 4px solid var(--ep-success); }
.ep-modal-box.ep-warn    { border-top: 4px solid var(--ep-warn); }
.ep-modal-box.ep-info    { border-top: 4px solid var(--ep-primary); }

/* Toast */
.ep-toast {
  position: fixed; bottom: 80px; right: 24px; z-index: 100001;
  background: #1e293b; color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: .9rem; max-width: 320px;
  transform: translateY(20px); opacity: 0;
  transition: all .3s ease; pointer-events: none;
  box-shadow: var(--ep-shadow);
}
.ep-toast.ep-toast-show  { transform: translateY(0); opacity: 1; }
.ep-toast.ep-toast-success { border-left: 4px solid var(--ep-success); }
.ep-toast.ep-toast-warn    { border-left: 4px solid var(--ep-warn); }
.ep-toast.ep-toast-info    { border-left: 4px solid var(--ep-primary); }

/* Points balance inline */
.esypoints-balance {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg,#fef3c7,#fde68a);
  border: 1px solid #f59e0b; border-radius: 20px;
  padding: 4px 14px; font-size: .9rem; color: #92400e; font-weight: 700;
}

/* Referral panel */
.ep-referral-panel { max-width: 560px; }
.ep-referral-panel h3 { color: var(--ep-primary); margin-bottom: 6px; }
.ep-referral-panel .ep-link-box {
  background: #f1f5f9; border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  word-break: break-all; font-size: .85rem; color: #475569;
}
.ep-referral-panel .ep-link-box button { flex-shrink: 0; }
.ep-referral-panel input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #d1d5db;
  border-radius: 8px; font-size: .95rem; margin-bottom: 10px;
  outline: none; transition: border .2s;
}
.ep-referral-panel input:focus { border-color: var(--ep-primary); }
.ep-referral-panel .ep-form-row { display: flex; gap: 10px; align-items: center; }
.ep-referral-panel .ep-contact-picker { flex-shrink: 0; padding: 10px 14px; background: #e0e7ff; border: none; border-radius: 8px; cursor: pointer; font-size: .85rem; }

/* Referral history list */
#ep-referral-history { list-style: none; padding: 0; margin: 16px 0 0; }
#ep-referral-history li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .9rem;
}
.ep-status { padding: 2px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600; }
.ep-status-rewarded { background: #d1fae5; color: #065f46; }
.ep-status-joined   { background: #fef3c7; color: #92400e; }
.ep-status-pending  { background: #f1f5f9; color: #64748b; }

/* History table */
.ep-history-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ep-history-table th { background: #4f46e5; color: #fff; padding: 10px 12px; text-align: left; }
.ep-history-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; }
.ep-history-table tr:hover td { background: #f8fafc; }
.ep-points-pos { color: #16a34a; font-weight: 700; }
.ep-points-neg { color: #dc2626; font-weight: 700; }
