/* 웹 T-033 — 잠김 상태(백엔드 T-018b·T-020, 웹 T-029). mobile.css 뒤에 로드(index.html) — Sass 빌드가 없어 별도 파일(T-011)
   숨긴 값 자리는 데이터 모양 그대로 흐린 막대(ghost)로, 자물쇠는 선 아이콘 하나로. 문구는 STOCK9330.paywallText 만(D-024) */
:root {
  --pw-ghost: #e8e9f0;
  --pw-ghost-dark: rgba(255, 255, 255, 0.08);
  --pw-line-dark: rgba(255, 255, 255, 0.12);
}

/* 자물쇠 — 색은 currentColor(마스크) */
.pw-lock {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url(../img/ico_lock.svg) center / contain no-repeat;
  mask: url(../img/ico_lock.svg) center / contain no-repeat;
}

.pw-lockbadge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--colour-lightblack);
  border: 1px solid var(--pw-line-dark);
  color: rgba(255, 255, 255, 0.7);
}

.pw-lockbadge .pw-lock {
  width: 40px;
  height: 40px;
}

/* ── 잠김 모달 (js/paywall.js) ── */
#paywall_modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

#paywall_modal .pw-box {
  width: 560px;
  padding: 64px 48px 48px;
  border-radius: 30px;
  background-color: var(--colour-darkgrey);
  color: var(--colour-white);
  text-align: center;
  animation: pw-in 0.18s ease-out;
}

#paywall_modal .pw-lockbadge {
  margin: 0 auto 36px;
}

#paywall_modal .pw_desc {
  font-size: var(--xsmall);
  line-height: 1.5;
  word-break: keep-all;
  text-wrap: balance;
  color: rgba(255, 255, 255, 0.85);
}

#paywall_modal .pw_hint {
  margin-top: 20px;
  font-size: var(--xxsmall);
  line-height: 1.6;
  white-space: pre-line;
  word-break: keep-all;
  color: rgba(255, 255, 255, 0.6);
}

#paywall_modal .pw-btns {
  margin-top: 48px;
  display: flex;
  gap: 20px;
}

#paywall_modal .pw-btns button {
  flex: 1;
  height: 90px;
  border-radius: 30px;
  font-size: var(--xxsmall);
  font-weight: 700;
  color: var(--colour-white);
}

#paywall_modal .pw_link {
  border: 0;
  background-color: var(--colour-orange);
}

#paywall_modal .pw_ok {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

#paywall_modal .pw-btns button:focus-visible,
.aipicks .aipicklink button:focus-visible {
  outline: 3px solid var(--colour-blue);
  outline-offset: 3px;
}

@keyframes pw-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  #paywall_modal .pw-box {
    animation: none;
  }
}

/* ── AI Picks 잠김 — 그래프 3개(갭·고점·종가상승률) 자리를 흐린 막대로 ── */
.aipicks .aipicklock {
  position: relative;
  width: 640px;
  margin: 60px auto 0;
}

.aipicks .pw-ghostchart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  height: 340px;
  padding: 48px 40px 40px;
  border-radius: 30px;
  background-color: var(--colour-darkgrey);
}

.aipicks .pw-ghostchart > div {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.aipicks .pw-ghostchart b {
  display: block;
  width: 70%;
  height: 20px;
  border-radius: 10px;
  background-color: var(--pw-ghost-dark);
}

.aipicks .pw-ghostchart span {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.aipicks .pw-ghostchart i {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background-color: var(--pw-ghost-dark);
}

.aipicks .pw-ghostchart i:nth-child(1) { height: 30%; }
.aipicks .pw-ghostchart i:nth-child(2) { height: 48%; }
.aipicks .pw-ghostchart i:nth-child(3) { height: 40%; }
.aipicks .pw-ghostchart i:nth-child(4) { height: 66%; }
.aipicks .pw-ghostchart i:nth-child(5) { height: 58%; }
.aipicks .pw-ghostchart i:nth-child(6) { height: 82%; }
.aipicks .pw-ghostchart > div:nth-child(2) i:nth-child(odd) { height: 54%; }
.aipicks .pw-ghostchart > div:nth-child(3) i:nth-child(even) { height: 36%; }

.aipicks .aipicklock .pw-lockbadge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 잠김일 때만 안내 여백을 그래프 아래로 줄인다(준비 중 안내는 mobile.css 그대로) */
.aipicks.pw-locked .empty {
  width: 560px;
  padding: 0;
  margin: 56px auto 0;
  color: rgba(255, 255, 255, 0.75);
  word-break: keep-all;
  text-wrap: balance;
}

.aipicks.pw-locked .aipicklink {
  margin: 48px auto 80px;
}

.aipicks.pw-locked .aipicklink button {
  width: 280px;
  height: 90px;
  border: 0;
  border-radius: 30px;
  font-weight: 700;
  background-color: var(--colour-orange);
}

/* ── 랭킹 1~5위 — 이름·증권사·퍼포먼스 자리를 흐린 막대로, 퍼포먼스 칸에 자물쇠 ── */
.rank .list .pw-ranknote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: var(--xxsmall);
  color: var(--colour-grey);
  word-break: keep-all;
}

.rank .list .table .box.pw-locked :nth-of-type(2) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.rank .list .table .box.pw-locked :nth-of-type(2) span {
  display: block;
  height: 22px;
  margin: 0;
  border-radius: 11px;
  background-color: var(--pw-ghost);
}

.rank .list .table .box.pw-locked :nth-of-type(2) span:first-child {
  width: 92px;
}

.rank .list .table .box.pw-locked :nth-of-type(2) span:last-child {
  width: 118px;
  margin-left: 0;
}

.rank .list .table .box.pw-locked :nth-of-type(2) span:last-child:before {
  content: none;
}

.rank .list .table .box.pw-locked :nth-of-type(3) {
  display: flex;
  justify-content: center;
  color: var(--colour-grey);
}

.rank .list .table .box.pw-locked :nth-of-type(3)::after {
  content: "";
  width: 28px;
  height: 28px;
  background-color: currentColor;
  -webkit-mask: url(../img/ico_lock.svg) center / contain no-repeat;
  mask: url(../img/ico_lock.svg) center / contain no-repeat;
}

/* ── 애널 상세 — 지표 칸 5개를 흐린 막대로 ── */
.analyst .details.pw-locked .list .table .box .rate::before {
  content: "";
  display: block;
  width: 84px;
  height: 22px;
  margin: 0 auto;
  border-radius: 11px;
  background-color: var(--pw-ghost);
}

.sectiontitle span.metricsnotice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-wrap: balance;
}

/* mobile.css `.sectiontitle span { width: 50px }` 이 자물쇠에도 걸린다 */
.sectiontitle span.metricsnotice .pw-lock {
  width: 26px;
  color: var(--colour-grey);
}
