.ai-enquiry,
.ai-enquiry * {
  font-family: 'Poppins', sans-serif;
}

.ai-enquiry {
  position: fixed;
  inset: 0;
  /* background: rgba(24,106,200,0.6); */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow-y: hidden;
  padding: 20px;
}

.ai-enquiry-box {
  width: 92%;
  max-width: 1050px;
  background: #fff;
  display: flex;
  border-radius: 18px;
  position: relative;
  max-height: 90vh;
  animation: slideDown 1.2s ease;
  overflow: hidden; /* desktop safe */
}


.ai-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

/* Left Side */
.ai-left {
  flex: 1;
  padding: 40px;
  color: #ffffff;

  background-image:
    linear-gradient(135deg, rgba(0,29,61,0.7), rgba(74,0,224,0.7)),
    url("../images/free-demo-class-enquiry-in-hyderabad-inspanner.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center;

  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* content bottom */
  align-items: flex-start;   /* desktop left */
  min-height: 380px;
  border-radius: 18px 0 0 18px;
}

/* left content */
.ai-left-content h2 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 18px;
}

/* Badges*/
.ai-feature-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-badge {
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
}

/* Right Side Form */
.ai-right {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ai-right h3 {
  margin-bottom: 18px;
  color: #1e293b;
}

.ai-right input,
.ai-right select,
.ai-right button {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}

.ai-right button {
  background: #f97316;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Hidden */
.hidden {
  display: none;
}

/*Animation*/
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
  .ai-left {
    min-height: 320px;
    padding: 30px;
  }

  .ai-left-content h2 {
    font-size: 28px;
  }
}

/* Mobile & Tablet  */
@media (max-width: 768px) {

  .ai-enquiry-box{
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto; /* safe scroll */
  }

  .ai-left {
    width: 100%;
    min-height: 260px;
    padding: 24px;
    border-radius: 18px 18px 0 0;

    /*FINAL BEHAVIOR */
    background-position: top center; 
    justify-content: flex-end;        
    align-items: center;       
    text-align: center;
  }

  .ai-left-content {
    width: 100%;
  }

  .ai-left-content h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 14px;
  }

  .ai-feature-badges {
    justify-content: center;
  }

  .ai-right {
    width: 100%;
    padding: 24px;
  }

  .ai-right input,
  .ai-right select,
  .ai-right button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 10px;
  }
}



/* Reserve scrollbar space */
.ai-enquiry-box {
  scrollbar-gutter: stable;
}

/* Mobile safe padding */
@media (max-width: 768px) {

  .ai-right {
    padding: 24px 20px; /* equal padding both sides */
  }

  .ai-enquiry-box,
  .ai-right {
    overflow-x: hidden; /* prevent horizontal cut */
  }

  .ai-right input,
  .ai-right select,
  .ai-right button {
    max-width: 100%;
    box-sizing: border-box;
  }
}