.bio-pop-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 99999; padding: 0;
}
.bio-pop-overlay.is-open{ display: flex; }

.bio-pop-modal{
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff; color: #111; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  margin: 0 auto;
  max-height: calc(100vh - 32px);
}

.bio-pop-form input[type="submit"],
.bio-pop-form .wpcf7-submit{
  box-shadow: none !important;
}


.bio-pop-hero{ position: relative; }
.bio-pop-hero img{ display:block; width:100%; height:auto; }

.bio-pop-overlay-content{
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: -45px;             
  width: min(360px, 92%);
  text-align: center;
  z-index: 1;
  pointer-events: auto;
}

.bio-pop-form{ background: transparent; padding: 0; }
.bio-pop-form .wpcf7-form{ display: grid; gap: 0; }

.bio-pop-form input[type="text"],
.bio-pop-form input[type="tel"]{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(229,231,235,.95);
  background: #fff; border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bio-pop-form input[type="submit"],
.bio-pop-form .wpcf7-submit{
  display: block;
  width: 60%; margin: 0 auto;
  border: none; border-radius: 999px;
  padding: 5px 16px !important; 
  font-weight: 900;
  background: linear-gradient(180deg,#ffcc66 0%, #ff9f1a 100%);
  color: #111; cursor: pointer;
  box-shadow: 0 12px 28px rgba(255,159,26,.45);
}

.bio-pop-close{
  position: absolute; top: 10px; right: 12px;
  padding: 0; width: 45px; height: 34px; border-radius: 50%;
  background: #fff; color: #333; border: none;
  font-size: 20px; line-height: 34px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.15); z-index: 2;
}
.bio-pop-close:hover{ background:#ff9f1a; color:#fff; transform:scale(1.05); }

.bio-pop-form .wpcf7 form .wpcf7-response-output,
.bio-pop-form .wpcf7 [role="status"],
.bio-pop-form .wpcf7 .wpcf7-confirmation,
.bio-pop-form .screen-reader-response{
  display: none !important; visibility: hidden !important;
  height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
}

/* ======== INLINE (luôn hiện dưới footer, NHƯNG đè trên ảnh) ======== */
.bio-inline{
  width: 100%;
  padding: 24px 0;
  background: transparent;
}
.bio-inline .bio-pop-modal{
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: none;
  overflow: visible;           
  max-height: none;
  padding-bottom: 0;         
}
.bio-inline .bio-pop-hero{ position: relative; } 
.bio-inline .bio-pop-hero img{
  display: block; width: 100%; height: auto;
}

.bio-inline .bio-pop-modal{
  border-radius: 20px;
}


.bio-inline .bio-pop-overlay-content{
  position: absolute !important;
  left: 50%; transform: translateX(-50%);
  bottom: -50px !important;    
  width: min(360px, 92%);
  text-align: center;
  z-index: 1;
}
.bio-inline .bio-pop-close{ display: none; } 


.bio-inline .bio-pop-form .wpcf7-form{
  gap: 3px;               
}

.bio-inline .bio-pop-form input[type="text"],
.bio-inline .bio-pop-form input[type="tel"]{
  font-size: 10px;       
  padding: 10px 12px;    
}

.bio-inline .bio-pop-form .wpcf7-submit{
  font-size: 12px;         
  padding: 0px 14px !important;
  width: 58%;            
}

/* bo tròn modal và chặn ảnh tràn góc */
.bio-pop-modal {
  border-radius: 30px !important;   /* tăng từ 20 lên 30 */
  overflow: hidden !important;      /* chặn ảnh con vượt ra ngoài */
}

/* Nếu chỉ muốn bo ảnh (trường hợp không muốn overflow) */
.bio-pop-hero img {
  border-radius: 30px !important;
}


@media (max-width: 480px){
  .bio-inline .bio-pop-overlay-content{
    width: min(300px, 86%);
    bottom: -30px !important;
  }
  .bio-inline .bio-pop-form input[type="text"],
  .bio-inline .bio-pop-form input[type="tel"]{
    font-size: 11px;
    padding: 9px 12px;
  }
  .bio-inline .bio-pop-form .wpcf7-submit{
    font-size: 11px;
    padding: 9px 12px !important;
    width: 64%;
  }
}


/* Viewport thấp */
@media (max-height:640px){
  .bio-pop-overlay{ align-items: flex-start; }
  .bio-pop-modal{ margin-top: 16px; }
}
