/* 팝업 배너 스타일 */

.popup-banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-banner-container {
  position: relative;
  max-width: 600px;
  width: 90%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideUp 0.3s ease-out;
}

@keyframes popupSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-banner-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.popup-banner-close:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.popup-banner-close .material-icons {
  font-size: 20px;
}

/* 캐러셀 스타일 */
.popup-banner-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.popup-banner-slides {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.popup-banner-slide {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f5f5f5;
}

.popup-banner-link,
.popup-banner-image-only {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.popup-banner-link img,
.popup-banner-image-only img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 제목 탭 스타일 */
.popup-banner-tabs {
  display: flex;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-banner-tabs::-webkit-scrollbar {
  display: none;
}

.popup-banner-tab {
  flex: 1;
  min-width: 0;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-banner-tab:not(:last-child) {
  border-right: 1px solid #e0e0e0;
}

.popup-banner-tab:hover {
  background: #f0f0f0;
  color: #333;
}

.popup-banner-tab.active {
  background: #fff;
  color: #333;
  font-weight: 600;
}

.popup-banner-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #333;
}

.popup-banner-tab span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PC/모바일 이미지 전환 */
img.popup-banner-pc {
  display: block;
}

img.popup-banner-mobile {
  display: none;
}

.popup-banner-footer {
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid #eee;
}

.popup-banner-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  user-select: none;
}

.popup-banner-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #333;
}

.popup-banner-checkbox-label span {
  line-height: 1;
}

/* 반응형 - 태블릿 */
@media (max-width: 768px) {
  .popup-banner-container {
    max-width: 90%;
    width: 90%;
    border-radius: 12px;
  }

  img.popup-banner-pc {
    display: none;
  }

  img.popup-banner-mobile {
    display: block;
  }

  .popup-banner-close {
    width: 32px;
    height: 32px;
    top: 10px;
    right: 10px;
  }

  .popup-banner-close .material-icons {
    font-size: 18px;
  }

  .popup-banner-tab {
    padding: 12px 10px;
    font-size: 12px;
  }

  .popup-banner-footer {
    padding: 12px 16px;
  }

  .popup-banner-checkbox-label {
    font-size: 13px;
  }
}

/* 반응형 - 모바일 */
@media (max-width: 480px) {
  .popup-banner-container {
    width: 92%;
    border-radius: 10px;
  }

  .popup-banner-tab {
    padding: 10px 8px;
    font-size: 11px;
  }

  .popup-banner-footer {
    padding: 10px 14px;
  }

  .popup-banner-checkbox-label {
    font-size: 12px;
  }

  .popup-banner-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}
