/**
 * EduFuture Smart Consultation Popup Styles
 * Bố cục 2 cột chuẩn tỉ lệ: Poster/Banner thương hiệu bên trái + Form đăng ký bên phải
 */

:root {
  --edu-pop-navy-900: #06152d;
  --edu-pop-navy-800: #0b1f3f;
  --edu-pop-navy-700: #102a54;
  --edu-pop-accent-red: #ea1d24;
  --edu-pop-accent-red-hover: #c9141a;
  --edu-pop-cyan: #00d2ff;
  --edu-pop-radius: 18px;
}

/* Modal Backdrop */
.edu-pop-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 24, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.edu-pop-backdrop.edu-pop-active {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog Window */
.edu-pop-modal {
  position: relative;
  background: var(--edu-pop-navy-800);
  width: 100%;
  max-width: 900px;
  border-radius: var(--edu-pop-radius);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 48% 52%;
  overflow: hidden;
  transform: scale(0.95) translateY(24px);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 92vh;
}
.edu-pop-backdrop.edu-pop-active .edu-pop-modal {
  transform: scale(1) translateY(0);
}

/* Close Button (Top Right) */
.edu-pop-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}
.edu-pop-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.08);
  color: #ffffff;
}
.edu-pop-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* ===================================================
   LEFT COLUMN: Promotional Poster / Banner
   =================================================== */
.edu-pop-banner {
  position: relative;
  background: linear-gradient(145deg, #02122c 0%, #08295a 60%, #031b3e 100%);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hỗ trợ chế độ ảnh poster toàn phần */
.edu-pop-banner.has-custom-img {
  padding: 0;
  background: #06152d;
}
.edu-pop-banner.has-custom-img .edu-pop-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ambient Glow & Tech Background Pattern */
.edu-pop-banner::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.25) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.edu-pop-banner::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(234, 29, 36, 0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.edu-pop-banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Brand Header in Poster */
.edu-pop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.edu-pop-logo-badge {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #0d2b5c;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-family: 'Montserrat', sans-serif;
}
.edu-pop-brand-text h4 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}
.edu-pop-brand-text span {
  font-size: 11px;
  color: var(--edu-pop-cyan);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Course / Promo Badge */
.edu-pop-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* Main Poster Headline */
.edu-pop-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  background: linear-gradient(180deg, #ffffff 0%, #e0f2fe 70%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 16px rgba(0, 210, 255, 0.3);
}
.edu-pop-subheading {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 14px 0;
  border-left: 2px solid var(--edu-pop-cyan);
  padding-left: 10px;
}

/* Value Proposition Points */
.edu-pop-values {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edu-pop-values li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
}
.edu-pop-values li svg {
  width: 16px;
  height: 16px;
  color: #4ade80;
  flex-shrink: 0;
}

/* Speaker / Mentor Feature */
.edu-pop-speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.edu-pop-speaker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--edu-pop-cyan);
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
}
.edu-pop-speaker-info h5 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 2px 0;
}
.edu-pop-speaker-info p {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
}

/* Banner Footer (Hotline & Website) */
.edu-pop-banner-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  font-size: 11px;
  color: #94a3b8;
}
.edu-pop-banner-foot a {
  color: #38bdf8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.edu-pop-banner-foot a:hover {
  text-decoration: underline;
}

/* ===================================================
   RIGHT COLUMN: Registration Form
   =================================================== */
.edu-pop-form-col {
  background: var(--edu-pop-navy-800);
  padding: 24px 24px 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

/* Inner White Card */
.edu-pop-form-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.edu-pop-form-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #0c2340;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}
.edu-pop-form-card .edu-pop-subtitle {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin: 0 0 16px 0;
}

/* Form Fields */
.edu-pop-field {
  position: relative;
  margin-bottom: 10px;
}
.edu-pop-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  transition: all 0.2s ease;
  overflow: hidden;
}
.edu-pop-input-wrap:focus-within {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.edu-pop-input-wrap.has-error {
  border-color: #ef4444;
  background: #fff5f5;
}
.edu-pop-icon {
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}
.edu-pop-icon svg {
  width: 17px;
  height: 17px;
}
.edu-pop-input {
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 9px 12px 9px 0 !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  box-shadow: none !important;
}
.edu-pop-input::placeholder {
  color: #94a3b8;
}
.edu-pop-select {
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 9px 12px 9px 0 !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
}
.edu-pop-select-wrap {
  position: relative;
}
.edu-pop-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  display: flex;
}
.edu-pop-textarea-wrap {
  align-items: flex-start;
}
.edu-pop-textarea-wrap .edu-pop-icon {
  padding-top: 10px;
}
.edu-pop-textarea {
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 10px 12px 10px 0 !important;
  font-size: 13px !important;
  color: #1e293b !important;
  resize: none;
  min-height: 52px;
  box-shadow: none !important;
}

/* Submit Button */
.edu-pop-submit-btn {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, #f02d34 0%, #d90429 100%);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(217, 4, 41, 0.4);
  transition: all 0.2s ease;
  line-height: 1.2;
}
.edu-pop-submit-btn:hover {
  background: linear-gradient(135deg, #ff3b42 0%, #b80020 100%);
  box-shadow: 0 6px 18px rgba(217, 4, 41, 0.5);
  transform: translateY(-1px);
}
.edu-pop-submit-btn:active {
  transform: translateY(1px);
}
.edu-pop-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Loading Spinner */
.edu-pop-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: edu-spin 0.8s linear infinite;
}
@keyframes edu-spin {
  to { transform: rotate(360deg); }
}
.is-submitting .edu-pop-spinner {
  display: inline-block;
}
.is-submitting .edu-pop-btn-text {
  display: none;
}

/* Form Status Messages */
.edu-pop-msg {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.edu-pop-msg.is-success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-weight: 600;
}
.edu-pop-msg.is-error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ===================================================
   FLOATING RE-OPEN BADGE
   =================================================== */
.edu-pop-badge-reopen {
  position: fixed;
  bottom: 95px; /* Nằm ngay trên nút Zalo/Gọi thoại nổi của EduFuture */
  right: 25px;
  background: linear-gradient(135deg, #0d2b5c 0%, #1e40af 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(13, 43, 92, 0.4),
              0 0 0 2px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}
.edu-pop-badge-reopen:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px rgba(13, 43, 92, 0.55);
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}
.edu-pop-badge-reopen span.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: edu-pulse 1.8s infinite;
}
@keyframes edu-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ===================================================
   RESPONSIVE (Mobile & Tablet)
   =================================================== */
@media (max-width: 768px) {
  .edu-pop-modal {
    grid-template-columns: 1fr;
    max-width: 440px;
    max-height: 94vh;
    overflow-y: auto;
  }
  .edu-pop-banner {
    padding: 20px 20px 14px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .edu-pop-heading {
    font-size: 20px;
  }
  .edu-pop-values {
    display: none;
  }
  .edu-pop-speaker {
    margin-bottom: 6px;
    padding: 8px 10px;
  }
  .edu-pop-banner-foot {
    display: none;
  }
  .edu-pop-form-col {
    padding: 16px;
  }
  .edu-pop-form-card {
    padding: 18px 16px;
  }
  .edu-pop-form-card h3 {
    font-size: 16px;
  }
  .edu-pop-close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
  }
  .edu-pop-badge-reopen {
    bottom: 85px;
    right: 15px;
    padding: 8px 14px;
    font-size: 12px;
  }
}

