@charset "utf-8";

/* 구독·알림 기본 서체. */
:root {
  --pb-subscribe-font: "Pretendard", "Malgun Gothic", sans-serif;
}

/* 구독·알림 전용 스타일 */
.pb-subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 42px;
  padding: 0 15px;
  border: 1px solid #9825ef;
  border-radius: 10px;
  background: #9124e4;
  color: #ffffff;
  font-family: var(--pb-subscribe-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.pb-subscribe-btn:hover,
.pb-subscribe-btn:focus {
  background: #8a22da;
  border-color: #8a22da;
  color: #ffffff;
}

/* 구독중 버튼 */
.pb-subscribe-btn.is-active {
  border-color: transparent;
  background: #264461;
  color: #ffffff;
}

.pb-subscribe-btn.is-loading {
  opacity: .65;
  pointer-events: none;
}

.pb-profile-subscribe {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.pb-profile-subscribe small {
  display: block;
  color: #667085;
  font-family: var(--pb-subscribe-font);
  font-size: 12px;
  text-align: center;
}

.pb-profile-subscribe small b {
  color: #9825ef;
  font-family: var(--pb-subscribe-font);
  font-weight: 400;
}

/* 헤더 구독 알림 버튼과 패널. */
.pb-subscribe-notify {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 헤더 구독 알림 아이콘 크기. */
.pb-subscribe-notify [data-pb-notify-toggle] i {
  font-size: 15px;
  line-height: 1;
}

/* 헤더 구독 알림 배지 위치와 크기. */
.pb-subscribe-notify .pb-header-badge {
  position: absolute;
  top: 5px;
  /* 배지를 위아래로 이동 */
  right: 2px;
  /* 배지를 좌우로 이동 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13px;
  /* 배지 최소 너비 */
  height: 13px;
  /* 배지 높이 */
  padding: 0 4px;
  border-radius: 999px;
  background: #ed5b77;
  color: #ffffff;
  font-family: var(--pb-subscribe-font);
  font-size: 8px;
  /* 배지 숫자 크기 */
  line-height: 15px;
  box-sizing: border-box;
  pointer-events: none;
}

/* 읽지 않은 알림이 없을 때 배지 숨김. */
.pb-subscribe-notify .pb-header-badge.is-hidden {
  display: none !important;
}


/* 구독 확인 레이어 */
.pb-subscribe-confirm-layer {
  position: fixed;
  z-index: 10090;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pb-subscribe-confirm-layer[hidden] {
  display: none !important;
}

.pb-subscribe-confirm-dim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
}

.pb-subscribe-confirm-box {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 26px 24px 22px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
  text-align: center;
}

.pb-subscribe-confirm-box h2 {
  margin: 0 0 12px;
  color: #111827;
  font-family: var(--pb-subscribe-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.pb-subscribe-confirm-box p {
  margin: 0;
  color: #344054;
  font-family: var(--pb-subscribe-font);
  font-size: 14px;
  line-height: 1.55;
}

.pb-subscribe-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
}

.pb-subscribe-confirm-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 0;
  border-radius: 9px;
  font-family: var(--pb-subscribe-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.pb-subscribe-confirm-cancel {
  background: #f2f4f7;
  color: #344054;
}

.pb-subscribe-confirm-ok {
  background: #9825ef;
  color: #ffffff;
}

/* 구독 목록 알림 설정 메뉴 */
.pb-subscribe-action-menu {
  position: fixed;
  z-index: 2147483100;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.pb-subscribe-action-menu[hidden] {
  display: none !important;
}

.pb-subscribe-action-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-family: var(--pb-subscribe-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.pb-subscribe-action-menu button:hover,
.pb-subscribe-action-menu button:focus {
  background: #f2f6fb;
  color: #111827;
}

/* 알림 도착 안내 레이어. */
.pb-subscribe-notify-toast {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 2147482900;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 13px;
  width: min(380px, calc(100vw - 32px));
  min-height: 94px;
  padding: 17px 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(139, 37, 231, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 70px rgba(25, 18, 40, .22), 0 4px 18px rgba(111, 33, 181, .10);
  backdrop-filter: blur(14px);
  font-family: var(--pb-subscribe-font);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 24px, 0) scale(.96);
  transition: opacity .22s ease, transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  pointer-events: auto;
}

.pb-subscribe-notify-toast::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #7d20d6 0%, #a82cf0 52%, #6c5df6 100%);
  content: "";
}

/* 알림 도착 안내 레이어 표시. */
.pb-subscribe-notify-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: 0s;
}

.pb-subscribe-notify-toast-body {
  min-width: 0;
}

.pb-subscribe-notify-toast-body strong,
.pb-subscribe-notify-toast-body span {
  display: block;
}

.pb-subscribe-notify-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4e9ff, #eee9ff);
  color: #8b25e7;
  font-size: 19px;
  box-shadow: inset 0 0 0 1px rgba(139, 37, 231, .08);
}

.pb-subscribe-notify-toast-body strong {
  color: #171c28;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.pb-subscribe-notify-toast-body span {
  margin-top: 6px;
  overflow: hidden;
  color: #687286;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pb-subscribe-notify-toast-close {
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -3px -3px 0 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a0a7b5;
  cursor: pointer;
}

.pb-subscribe-notify-toast-close:hover,
.pb-subscribe-notify-toast-close:focus {
  background: #f3eff8;
  color: #7c20ce;
  outline: 0;
}

.pb-subscribe-notify-toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: #f0e9f7;
}

.pb-subscribe-notify-toast-progress::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #8522dd, #aa39ef);
  transform-origin: left center;
  content: "";
}

.pb-subscribe-notify-toast.is-visible .pb-subscribe-notify-toast-progress::after {
  animation: pb-notify-toast-progress var(--pb-toast-duration, 5000ms) linear forwards;
}

@keyframes pb-notify-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 640px) {
  .pb-subscribe-notify-toast {
    right: 16px;
    bottom: 18px;
    grid-template-columns: 42px minmax(0, 1fr) 26px;
    gap: 11px;
    width: calc(100vw - 32px);
    min-height: 88px;
    padding: 15px 14px 16px;
    border-radius: 16px;
  }

  .pb-subscribe-notify-toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 17px;
  }
}
