/* ================================================================
   CJP TOAST NOTIFICATION SYSTEM
   ================================================================ */

.cjp-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 380px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.cjp-toast {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  box-shadow:
    0 4px 6px rgba(0,0,0,.04),
    0 12px 40px rgba(0,0,0,.14),
    0 0 0 1px rgba(0,0,0,.04);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  pointer-events: all;
  animation: toastSlideIn .38s cubic-bezier(.34,1.56,.64,1) forwards;
  position: relative;
  will-change: transform, opacity;
}

.cjp-toast.toast-removing {
  animation: toastSlideOut .24s ease forwards;
}

@keyframes toastSlideIn {
  from { opacity:0; transform: translateX(110%) scale(.94); }
  to   { opacity:1; transform: translateX(0)   scale(1);   }
}

@keyframes toastSlideOut {
  from { opacity:1; transform: translateX(0)   scale(1);   max-height:200px; margin-bottom:0; }
  to   { opacity:0; transform: translateX(60%)  scale(.94); max-height:0;    margin-bottom:-10px; }
}

/* Left accent bar */
.cjp-toast::before {
  content: '';
  width: 4px;
  flex-shrink: 0;
  border-radius: 16px 0 0 16px;
}

/* Icon column */
.toast-icon-col {
  padding: 16px 12px 16px 16px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.toast-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}

/* Body */
.toast-body {
  flex: 1;
  padding: 14px 8px 14px 0;
  min-width: 0;
}
.toast-title {
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Inter', system-ui, sans-serif;
}
.toast-message {
  font-size: .8rem;
  color: #6B7280;
  margin-top: 3px;
  line-height: 1.45;
  font-family: 'Inter', system-ui, sans-serif;
  word-break: break-word;
}

/* Close button */
.toast-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 14px 14px 8px;
  color: #C0C6D0;
  font-size: .8rem;
  display: flex;
  align-items: flex-start;
  transition: color .15s;
  flex-shrink: 0;
}
.toast-close-btn:hover { color: #6B7280; }

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 16px 16px;
  animation: toastProgress linear forwards;
}
@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%;   }
}

/* ── TYPE VARIANTS ────────────────────────────────────────── */

/* ERROR */
.cjp-toast.toast-error::before      { background: #EF4444; }
.cjp-toast.toast-error .toast-icon-wrap { background: #FEF2F2; color: #DC2626; }
.cjp-toast.toast-error .toast-title     { color: #DC2626; }
.cjp-toast.toast-error .toast-progress  { background: linear-gradient(90deg,#EF4444,#F87171); }

/* SUCCESS */
.cjp-toast.toast-success::before     { background: #10B981; }
.cjp-toast.toast-success .toast-icon-wrap { background: #ECFDF5; color: #059669; }
.cjp-toast.toast-success .toast-title     { color: #059669; }
.cjp-toast.toast-success .toast-progress  { background: linear-gradient(90deg,#10B981,#34D399); }

/* WARNING */
.cjp-toast.toast-warning::before     { background: #F59E0B; }
.cjp-toast.toast-warning .toast-icon-wrap { background: #FFFBEB; color: #D97706; }
.cjp-toast.toast-warning .toast-title     { color: #D97706; }
.cjp-toast.toast-warning .toast-progress  { background: linear-gradient(90deg,#F59E0B,#FCD34D); }

/* INFO */
.cjp-toast.toast-info::before        { background: #3B82F6; }
.cjp-toast.toast-info .toast-icon-wrap { background: #EFF6FF; color: #2563EB; }
.cjp-toast.toast-info .toast-title     { color: #2563EB; }
.cjp-toast.toast-info .toast-progress  { background: linear-gradient(90deg,#3B82F6,#60A5FA); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .cjp-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ================================================================
   PAGE LOADER (member space)
   ================================================================ */
#cjp-page-loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: #0F1623;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity .4s ease, visibility .4s ease;
}

#cjp-page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pl-logo-wrap {
  position: relative;
  width: 72px;
  height: 72px;
}
.pl-logo-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.pl-logo-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(255,101,0,.2);
  animation: plPulse 1.6s ease-in-out infinite;
}
.pl-logo-pulse:nth-child(2) {
  inset: -16px;
  background: rgba(255,101,0,.1);
  animation-delay: .4s;
}
@keyframes plPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.2); opacity: 0; }
}

.pl-bar-wrap {
  width: 180px;
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 20px;
  overflow: hidden;
}
.pl-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #FF6500, #FFB300);
  animation: plBar 1.4s ease-in-out infinite;
}
@keyframes plBar {
  0%   { width: 0%;  margin-left: 0%;   }
  50%  { width: 60%; margin-left: 20%;  }
  100% { width: 0%;  margin-left: 100%; }
}

.pl-text {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  font-family: 'Inter', system-ui, sans-serif;
}

/* ================================================================
   LOGIN PAGE LOADER OVERLAY
   ================================================================ */
#cjp-submit-loader {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(15,22,35,.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
#cjp-submit-loader.active {
  opacity: 1;
  visibility: visible;
}
.submit-loader-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 200px;
}
.submit-loader-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,101,0,.15);
  border-top-color: #FF6500;
  border-right-color: #FFB300;
  border-radius: 50%;
  animation: spinFast .65s linear infinite;
}
@keyframes spinFast { to { transform: rotate(360deg); } }
.submit-loader-text {
  font-size: .88rem;
  font-weight: 600;
  color: #374151;
  font-family: 'Inter', system-ui, sans-serif;
}
.submit-loader-sub {
  font-size: .75rem;
  color: #9CA3AF;
  margin-top: -8px;
  font-family: 'Inter', system-ui, sans-serif;
}
