/* ===== POPUP OVERLAY ===== */
.popup{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.6);
  z-index:9999;

  /* CENTER POPUP */
  display:flex;
  align-items:center;
  justify-content:center;

  padding:15px;
  box-sizing:border-box;
  overflow-y:auto;
}

/* ===== POPUP BOX ===== */
.popup-content{
  background:#fff;
  width:850px;
  max-width:100%;
  border-radius:12px;
  overflow:hidden;
  position:relative;

  display:flex;
  flex-direction:row;

  max-height:95vh;
}

/* ===== LEFT IMAGE ===== */
.popup-left{
  width:50%;
  min-height:100%;
}

.popup-left img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ===== RIGHT FORM ===== */
.popup-right{
  width:50%;
  padding:25px;
  overflow-y:auto;
  box-sizing:border-box;
}

.popup-right h3{
  margin-bottom:20px;
  font-size:28px;
}

/* ===== FORM ELEMENTS ===== */
.popup-right input,
.popup-right textarea{
  width:100%;
  padding:12px;
  margin-bottom:15px;
  border:1px solid #ccc;
  border-radius:6px;
  font-size:15px;
  box-sizing:border-box;
}

.popup-right textarea{
  min-height:100px;
  resize:vertical;
}

/* ===== BUTTON ===== */
.popup-right button{
  width:100%;
  padding:12px;
  background:#007bff;
  border:none;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  font-size:16px;
}

/* ===== CLOSE BUTTON ===== */
.close-btn{
  position:absolute;
  top:10px;
  right:15px;
  font-size:30px;
  cursor:pointer;
  z-index:10;
  color:#000;
}

/* ===== CAPTCHA ===== */
.captcha-group{
  margin-bottom:15px;
}

.captcha-box{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.captcha-box img{
  height:45px;
  border:1px solid #ccc;
  border-radius:5px;
}

.refresh-captcha{
  font-size:14px;
  color:#007bff;
  text-decoration:none;
}

/* ===== SCROLLBAR ===== */
.popup-right::-webkit-scrollbar{
  width:5px;
}

.popup-right::-webkit-scrollbar-thumb{
  background:#bbb;
  border-radius:10px;
}

/* ================================================= */
/* ================= MOBILE VIEW =================== */
/* ================================================= */

@media (max-width:768px){

  .popup{
    align-items:flex-start;
    padding:10px;
  }

    .popup-content {
        flex-direction: column;
        width: 112%;
        max-height: none;
        margin-top: 20px;
        margin-right: 7px;}

  /* IMAGE */
  .popup-left{
    width:100%;
    height:220px;
  }

  .popup-left img{
    height:220px;
  }

  /* FORM */
  .popup-right{
    width:100%;
    padding:20px;
    overflow:visible;
  }

  .popup-right h3{
    font-size:24px;
    text-align:center;
  }

  .popup-right input,
  .popup-right textarea,
  .popup-right button{
    font-size:16px;
  }

  /* CAPTCHA MOBILE */
  .captcha-box{
    flex-direction:column;
    align-items:flex-start;
  }

  .captcha-box img{
    max-width:100%;
    height:auto;
  }

  /* CLOSE BUTTON */
  .close-btn{
    top:8px;
    right:12px;
    font-size:28px;
  }
}

/* ===== SMALL MOBILE ===== */

@media (max-width:480px){

  .popup-left{
    height:180px;
  }

  .popup-left img{
    height:180px;
  }

  .popup-right{
    padding:15px;
  }

  .popup-right h3{
    font-size:22px;
  }

  .popup-right input,
  .popup-right textarea{
    padding:10px;
  }

  .popup-right button{
    padding:11px;
  }
}