@charset "utf-8";
/* plugin/popup/style.css (v2025.11.10-balanced)
 * - iOS/Android/PC 완전 대응
 * - 하단 버튼 2개 좌우 배치 + 간격 유지
 * - 전체 높이 축소 (85%)
 */

#happyjung_popup_id {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* ──────────────── 팝업 박스 ──────────────── */
.happyjung_popup_class {
  position: fixed;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  width: 90%;
  max-width: 800px;
  height: auto;
  max-height: 90vh; /* 높이 축소 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  pointer-events: auto;
  box-sizing: border-box;
}

/* ──────────────── 내용 영역 ──────────────── */
.happyjung_popup_con {
  flex: 1;
  overflow-y: auto;
  padding: 5px;
  line-height: 1.6;
  color: #333;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.happyjung_popup_con img {
  display: block;
  width: 100% !important;
  height: auto !important;
  margin: 0 auto;
  max-width: 100%;
}

.happyjung_popup_con a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.happyjung_popup_class .popup_close_top {
  position: absolute;
  top: 6px;
  right: 10px;
  background: transparent;
  border: none;
  color: #333;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease;
}
.happyjung_popup_class .popup_close_top:hover {
  color: #d00;
}

/* ──────────────── 하단 버튼 영역 ──────────────── */
.happyjung_popup_footer {
  background: #000;
  color: #fff;
  font-size: 14px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #111;
  display: flex;
  justify-content: center; /* 가운데 정렬 */
  align-items: center;
  gap: 8px; /* 버튼 간격 추가 */
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 5;
  box-sizing: border-box;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.15);
}

.happyjung_popup_footer button {
  background: #444;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
  transition: all 0.2s ease;
  flex: 1; /* 양쪽 버튼 동일 폭 */
  max-width: 160px;
}

.happyjung_popup_footer button:hover,
.happyjung_popup_footer button:active {
  background: #666;
  transform: scale(1.03);
}

/* ──────────────── 반응형 ──────────────── */
@media (max-width: 768px) {
  .happyjung_popup_class {
    top: 6%;
    width: 92%;
    max-height: 82vh;
    border-radius: 8px;
  }

  .happyjung_popup_footer {
    flex-direction: row; /* 모바일에서도 가로 유지 */
    justify-content: space-between;
    gap: 8px;
  }

  .happyjung_popup_footer button {
    width: 100%;
    max-width: none;
  }

  /* 기본 (모바일 공통) */
  .happyjung_popup_con {
    padding-bottom: calc(0px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  }

  /* iOS Safari / Chrome / Opera */
  body.is-ios-safari .happyjung_popup_con,
  body.is-ios-chrome .happyjung_popup_con,
  body.is-ios-opera .happyjung_popup_con {
    padding-bottom: 0px !important;
  }

  /* iOS Bing / Edge */
  body.is-ios-bing .happyjung_popup_con {
    padding-bottom: 0px !important;
  }

  /* iOS Whale / Naver */
  body.is-ios-whale .happyjung_popup_con,
  body.is-ios-naver .happyjung_popup_con {
    padding-bottom: 0px !important;
  }

  /* Android Chrome / Naver */
  body.is-android-chrome .happyjung_popup_con,
  body.is-android-naver .happyjung_popup_con {
    padding-bottom: 0px !important;
  }

  /* Android Whale  */
  body.is-android-whale .happyjung_popup_con {
    padding-bottom: 0px !important;
  }
  /* Android Firefox */
  body.is-android-firefox .happyjung_popup_con {
    padding-bottom: 0px !important;
  }

}