/* ═══════════════════════════════════════════════════════════════
   BEST ACADEMY — GLOBAL BRANDED MODALS, POPUPS & TOAST ALERTS
   Official Palette: Navy #061B3A | Deep Navy #031226 | Gold #F4BE32
═══════════════════════════════════════════════════════════════ */

/* Modal Backdrop */
.ba-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 27, 58, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity .25s ease-out;
}

.ba-modal-backdrop.ba-open {
  display: flex;
  opacity: 1;
}

/* Modal Dialog Card */
.ba-modal {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(6, 27, 58, 0.45), 0 0 0 1px rgba(244, 190, 50, 0.25);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), opacity .25s ease-out;
}

.ba-modal-backdrop.ba-open .ba-modal {
  transform: scale(1) translateY(0);
}

/* Modal Header (Navy with Gold Accent Trim) */
.ba-modal__header {
  background: #061B3A;
  background-image: linear-gradient(135deg, #061B3A 0%, #0B254E 100%);
  color: #FFFFFF;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #F4BE32;
  position: relative;
}

.ba-modal__header-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.ba-modal__icon-badge {
  width: 36px;
  height: 36px;
  background: rgba(244, 190, 50, 0.18);
  border: 1px solid rgba(244, 190, 50, 0.4);
  color: #F4BE32;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ba-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.ba-modal__subtitle {
  font-size: .75rem;
  color: #F4BE32;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  margin-top: 2px;
}

.ba-modal__close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.ba-modal__close:hover {
  background: #F4BE32;
  color: #061B3A;
  border-color: #F4BE32;
  transform: rotate(90deg);
}

/* Modal Body */
.ba-modal__body {
  padding: 1.75rem;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.65;
  color: #1E293B;
  background: #FFFFFF;
}

/* Modal Footer */
.ba-modal__footer {
  padding: 1rem 1.75rem;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

/* Branded Modal Buttons */
.ba-btn-navy {
  background: #061B3A;
  color: #FFFFFF;
  border: 1px solid #061B3A;
  padding: .65rem 1.5rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.ba-btn-navy:hover {
  background: #0B254E;
  box-shadow: 0 4px 12px rgba(6, 27, 58, 0.25);
}

.ba-btn-gold {
  background: #F4BE32;
  color: #061B3A;
  border: 1px solid #E5A812;
  padding: .65rem 1.5rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.ba-btn-gold:hover {
  background: #E5A812;
  box-shadow: 0 4px 12px rgba(244, 190, 50, 0.35);
}

.ba-btn-cancel {
  background: #FFFFFF;
  color: #64748B;
  border: 1px solid #CBD5E1;
  padding: .65rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
}

.ba-btn-cancel:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION ENGINE
═══════════════════════════════════════════════════════════════ */
#ba-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 420px;
  pointer-events: none;
}

.ba-toast {
  pointer-events: auto;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(6, 27, 58, 0.18), 0 8px 10px -6px rgba(6, 27, 58, 0.1);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  border-left: 4px solid #061B3A;
  border-top: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  animation: baToastSlideIn .3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform .25s ease, opacity .25s ease;
  position: relative;
  overflow: hidden;
}

@keyframes baToastSlideIn {
  from { transform: translateX(100%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

.ba-toast--success {
  border-left-color: #22C55E;
}

.ba-toast--error {
  border-left-color: #EF4444;
}

.ba-toast--warning {
  border-left-color: #F59E0B;
}

.ba-toast--info {
  border-left-color: #F4BE32;
}

.ba-toast__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: #F1F5F9;
}

.ba-toast--success .ba-toast__icon {
  background: #DCFCE7;
  color: #166534;
}

.ba-toast--error .ba-toast__icon {
  background: #FEE2E2;
  color: #991B1B;
}

.ba-toast--warning .ba-toast__icon {
  background: #FEF3C7;
  color: #92400E;
}

.ba-toast--info .ba-toast__icon {
  background: rgba(244, 190, 50, 0.2);
  color: #061B3A;
}

.ba-toast__content {
  flex: 1;
}

.ba-toast__title {
  font-weight: 800;
  font-size: .88rem;
  color: #061B3A;
  margin-bottom: 2px;
}

.ba-toast__msg {
  font-size: .82rem;
  color: #475569;
  line-height: 1.45;
}

.ba-toast__close {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin-left: .5rem;
  line-height: 1;
}

.ba-toast__close:hover {
  color: #061B3A;
}
