/* ============================================================
   WellCare AI — 공용 셸 (헤더 · 내비 · 푸터 · 사이드 CTA)
   설계서 v1.0 W-01

   모든 규칙은 .wc- 접두어로 스코프된다.
   요소 선택자(body, h1, a …)와 전역 리셋을 쓰지 않는다.
   → main.css(#header 27규칙, #nav 16규칙)·w3.css·home-premium.css
     와 절대 충돌하지 않으며, 손대지 않는 페이지에 영향이 없다.
   ============================================================ */

/* ── 스킵 링크 ─────────────────────────────────────────── */
.wc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 10px 18px;
  background: var(--wc-primary);
  color: #fff;
  font-family: var(--wc-font);
  font-size: var(--wc-fs-sm);
  font-weight: var(--wc-fw-semi);
  text-decoration: none;
  border-radius: 0 0 var(--wc-r-md) 0;
}
.wc-skip:focus {
  left: 0;
  color: #fff;
}

/* ── 헤더 ─────────────────────────────────────────────── */
.wc-header {
  position: relative;
  z-index: var(--wc-z-header);
  background: var(--wc-surface);
  border-bottom: 1px solid var(--wc-border);
  font-family: var(--wc-font);
  color: var(--wc-text);
}

.wc-header__inner {
  max-width: var(--wc-container);
  margin: 0 auto;
  padding: 0 var(--wc-gutter);
  min-height: var(--wc-header-h);
  display: flex;
  align-items: center;
  gap: var(--wc-5);
}

/* 브랜드 */
.wc-brand {
  display: flex;
  align-items: center;
  gap: var(--wc-3);
  text-decoration: none;
  color: inherit;
  padding: var(--wc-2) 0;
  flex: none;
}
.wc-brand:hover { color: inherit; }
.wc-brand img {
  height: 34px;
  width: auto;
  display: block;
}
.wc-brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: var(--wc-3);
  border-left: 1px solid var(--wc-border);
  line-height: 1.25;
}
.wc-brand__name {
  font-size: var(--wc-fs-xs);
  font-weight: var(--wc-fw-semi);
  color: var(--wc-text-2);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.wc-brand__tel {
  font-size: var(--wc-fs-label);
  color: var(--wc-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── 내비게이션 ────────────────────────────────────────── */
/* <details> 를 쓰지 않는다 — 최신 Chrome 이 닫힌 details 의 자식을
   ::details-content(content-visibility:hidden)로 감춰서, 데스크톱에서
   display:flex 로 되돌려도 내비게이션이 보이지 않는다.
   버튼 + nav 조합으로 바꾸고 wc.js 가 aria-expanded 를 토글한다. */
.wc-navwrap { margin-left: auto; }

.wc-navtoggle {
  display: inline-flex;
  align-items: center;
  gap: var(--wc-2);
  padding: 9px 14px;
  border: 1px solid var(--wc-border-2);
  border-radius: var(--wc-r-md);
  background: var(--wc-surface);
  font-size: var(--wc-fs-sm);
  font-weight: var(--wc-fw-semi);
  color: var(--wc-text-2);
  min-height: 40px;
  cursor: pointer;
}
.wc-navtoggle:hover { border-color: var(--wc-primary); color: var(--wc-primary); }
.wc-navtoggle:focus-visible {
  outline: none;
  box-shadow: var(--wc-ring);
}

.wc-nav {
  display: flex;
  align-items: center;
  gap: var(--wc-1);
}
.wc-nav__list {
  display: flex;
  align-items: center;
  gap: var(--wc-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.wc-nav__item { position: relative; }

.wc-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--wc-r-md);
  font-size: var(--wc-fs-sm);
  font-weight: var(--wc-fw-medium);
  color: var(--wc-text-2);
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  transition: background var(--wc-t-fast) var(--wc-ease),
              color var(--wc-t-fast) var(--wc-ease);
}
.wc-nav__link:hover {
  background: var(--wc-surface-2);
  color: var(--wc-primary);
}
.wc-nav__link:focus-visible {
  outline: none;
  box-shadow: var(--wc-ring);
}
.wc-nav__link.is-current {
  color: var(--wc-primary);
  font-weight: var(--wc-fw-semi);
  background: var(--wc-primary-subtle);
}
/* 실증사업 — 캠페인 기간 강조 */
.wc-nav__link--feature {
  color: var(--wc-primary);
  font-weight: var(--wc-fw-semi);
}

/* 드롭다운 — hover + focus-within 으로 키보드 접근 보장 */
.wc-nav__menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 176px;
  margin: 0;
  padding: var(--wc-1);
  list-style: none;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
  border-radius: var(--wc-r-lg);
  box-shadow: var(--wc-sh-md);
  z-index: var(--wc-z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--wc-t-fast) var(--wc-ease),
              transform var(--wc-t-fast) var(--wc-ease),
              visibility var(--wc-t-fast);
}
.wc-nav__item:hover > .wc-nav__menu,
.wc-nav__item:focus-within > .wc-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.wc-nav__menu--right { left: auto; right: 0; }

.wc-nav__menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--wc-r-sm);
  font-size: var(--wc-fs-sm);
  color: var(--wc-text-2);
  text-decoration: none;
  white-space: nowrap;
}
.wc-nav__menu a:hover {
  background: var(--wc-primary-subtle);
  color: var(--wc-primary);
}
.wc-nav__menu a:focus-visible {
  outline: none; box-shadow: var(--wc-ring);
  outline-offset: -2px;
}
.wc-nav__menu form { display: contents; }

/* ── 헤더 전용 버튼 ───────────────────────────────────────
   .wc-btn 은 wc-base.css 가 단독 소유한다. 여기서 같은 이름을 쓰면
   wc-shell.css 가 나중에 로드되면서 wc-base 의 버튼을 덮어써
   크기·색이 어긋난다(실제로 발생했던 결함). 이름을 분리한다. */
.wc-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--wc-r-md);
  font-family: var(--wc-font);
  font-size: var(--wc-fs-sm);
  font-weight: var(--wc-fw-semi);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--wc-t-fast) var(--wc-ease),
              border-color var(--wc-t-fast) var(--wc-ease);
}
.wc-navbtn:focus-visible {
  outline: none;
  box-shadow: var(--wc-ring);
}
.wc-navbtn--primary {
  background: var(--wc-primary);
  border-color: var(--wc-primary);
  color: #fff;
}
.wc-navbtn--primary:hover {
  background: var(--wc-primary-active);
  border-color: var(--wc-primary-active);
  color: #fff;
}
.wc-navbtn--outline {
  background: var(--wc-surface);
  border-color: var(--wc-border-2);
  color: var(--wc-text-2);
}
.wc-navbtn--outline:hover {
  border-color: var(--wc-primary);
  background: var(--wc-primary-subtle);
  color: var(--wc-primary);
}

.wc-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--wc-2);
  padding-left: var(--wc-3);
  margin-left: var(--wc-2);
  border-left: 1px solid var(--wc-border);
}

/* ── 반응형 ───────────────────────────────────────────── */
@media (min-width: 1000px) {
  .wc-navtoggle { display: none; }
  .wc-nav { display: flex !important; }
}
@media (max-width: 999px) {
  .wc-header__inner {
    flex-wrap: wrap;
    padding-top: var(--wc-2);
    padding-bottom: var(--wc-2);
    gap: var(--wc-3);
  }
  .wc-navwrap { width: 100%; margin-left: 0; }
  /* 모바일에서는 토글로 여닫는다 */
  .wc-nav { display: none; }
  .wc-navwrap.is-open .wc-nav { display: flex; }
  .wc-navwrap.is-open .wc-navtoggle { margin-bottom: var(--wc-2); }
  .wc-nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--wc-1);
    padding-top: var(--wc-2);
    border-top: 1px solid var(--wc-border);
  }
  .wc-nav__list { flex-direction: column; align-items: stretch; }
  .wc-nav__link { justify-content: flex-start; }
  .wc-nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--wc-border);
    border-radius: 0;
    margin-left: var(--wc-4);
    padding-left: var(--wc-2);
  }
  .wc-nav__actions {
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
    border-top: 1px solid var(--wc-border);
    padding-top: var(--wc-3);
  }
  .wc-nav__actions .wc-navbtn { flex: 1; }
  .wc-brand__text { display: none; }
}
@media (max-width: 480px) {
  .wc-header__inner { padding-left: var(--wc-gutter-sm); padding-right: var(--wc-gutter-sm); }
  .wc-brand img { height: 30px; }
}

/* ── 사이드 CTA ───────────────────────────────────────────
   기존 .pf-side-cta 의 보라 그라디언트를 브랜드 네이비 단색으로 교체.
   링크는 /#apply(존재하지 않는 앵커) → /pilot/apply/ 로 변경됨.

   버튼이 3개(신청하기 · 상담 신청 · 소개자료)로 늘면서 fixed 정렬을
   개별 버튼에서 .wc-side-ctas 래퍼로 올렸다. 버튼마다 fixed 를 걸면
   서로 겹치므로, 래퍼 하나만 고정하고 버튼은 흐름에 둔다. */
.wc-side-ctas {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--wc-z-sidecta);
  display: flex;
  flex-direction: column;
  /* stretch — 버튼 텍스트 길이가 달라도 폭을 가장 넓은 것에 맞춰
     왼쪽 모서리를 가지런히 맞춘다. flex-end 면 들쭉날쭉해진다. */
  align-items: stretch;
  gap: 2px;
}
.wc-side-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wc-2);
  min-width: 84px;
  padding: var(--wc-4) var(--wc-3);
  background: var(--wc-primary);
  color: #fff;
  font-family: var(--wc-font);
  font-size: var(--wc-fs-xs);
  font-weight: var(--wc-fw-semi);
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  word-break: keep-all;
  border: 0;
  border-radius: var(--wc-r-lg) 0 0 var(--wc-r-lg);
  box-shadow: var(--wc-sh-md);
  transition: background var(--wc-t-base) var(--wc-ease),
              transform var(--wc-t-base) var(--wc-ease);
}
.wc-side-cta:hover {
  background: var(--wc-primary-active);
  color: #fff;
  /* 세로 중앙 정렬은 이제 래퍼가 담당 → translateY(-50%) 불필요 */
  transform: translateX(-3px);
}
.wc-side-cta:focus-visible {
  outline: none;
  box-shadow: var(--wc-ring);
  color: #fff;
}
.wc-side-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--wc-r-full);
  background: rgba(255, 255, 255, .18);
  font-size: 15px;
}
@media (max-width: 900px) {
  .wc-side-cta { min-width: 64px; padding: var(--wc-3) var(--wc-2); font-size: var(--wc-fs-label); }
  .wc-side-cta__icon { width: 28px; height: 28px; font-size: 13px; }
}

/* ── 푸터 ─────────────────────────────────────────────── */
.wc-footer {
  background: var(--wc-bg);
  border-top: 1px solid var(--wc-border);
  font-family: var(--wc-font);
  color: var(--wc-text-2);
  font-size: var(--wc-fs-sm);
  line-height: var(--wc-lh-body);
}
.wc-footer__inner {
  max-width: var(--wc-container);
  margin: 0 auto;
  padding: var(--wc-7) var(--wc-gutter) var(--wc-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--wc-6);
  align-items: start;
}
.wc-footer__main { display: grid; gap: var(--wc-4); }

.wc-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wc-3);
  padding-bottom: var(--wc-4);
  border-bottom: 1px solid var(--wc-border);
}
.wc-footer__legal button {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-weight: var(--wc-fw-semi);
  color: var(--wc-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.wc-footer__legal button:hover { color: var(--wc-primary); }
.wc-footer__legal button:focus-visible {
  outline: none;
  box-shadow: var(--wc-ring);
}
.wc-footer__sep { color: var(--wc-border-2); }

.wc-footer__info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: var(--wc-fs-xs);
  color: var(--wc-text-muted);
}
.wc-footer__info b {
  color: var(--wc-text-2);
  font-weight: var(--wc-fw-semi);
}
.wc-footer__contact {
  font-size: var(--wc-fs-sm);
  color: var(--wc-text);
  font-variant-numeric: tabular-nums;
}
.wc-footer__contact a {
  color: var(--wc-primary);
  font-weight: var(--wc-fw-semi);
  text-decoration: none;
}
.wc-footer__contact a:hover { text-decoration: underline; }
.wc-footer__copy {
  font-size: var(--wc-fs-xs);
  color: var(--wc-text-subtle);
  padding-top: var(--wc-2);
}
.wc-footer__mark img { max-width: 132px; height: auto; display: block; }

@media (max-width: 720px) {
  .wc-footer__inner {
    grid-template-columns: 1fr;
    padding: var(--wc-6) var(--wc-gutter-sm) var(--wc-5);
    gap: var(--wc-5);
  }
}

/* ── 레거시 페이지 방어 ──────────────────────────────────────
   legacy_css 를 끄지 않은 미개편 페이지(management/dailycaredetail
   등 24면)에는 wc-base.css 가 없어 리셋이 없고, main.css 의 요소
   선택자가 셸 안쪽까지 그대로 들어온다. 같은 마크업인데 개편 완료
   페이지와 헤더가 다르게 보이는 원인이다.

   여기서는 셸 스코프 안에서만 개편 완료 페이지와 같은 값으로 되돌린다.
     · 전부 .wc-header / .wc-footer 로 스코프 → 본문에 영향 0
     · 값이 wc-base.css 와 동일 → 개편 완료 페이지는 변화 0
     · wc-shell.css 는 레거시보다 뒤에 로드되고 0-1-1 이
       레거시의 0-0-1(a·b·i·form·p)·0-0-2(ul li)를 이긴다

   ※ .wc-footer 에 font-size 를 다시 걸지 말 것 — 위에서 이미
     --wc-fs-sm 을 지정했는데 여기서 덮으면 푸터가 커진다.
   ※ ul 은 방어하지 않는다 — 셸의 ul 은 .wc-nav__list ·
     .wc-nav__menu · .wc-footer__info 가 전부 자체 규칙을 갖고
     있고, .wc-header ul (0-1-1) 로 덮으면 드롭다운 패딩이 죽는다.
   ─────────────────────────────────────────────────────────── */

/* main.css `body { font-size:16pt; font-weight:300;
   line-height:1.65em; letter-spacing:-0.015em }` 상속 차단 */
.wc-header {
  font-size: var(--wc-fs-body);
  font-weight: var(--wc-fw-regular);
  line-height: var(--wc-lh-body);
  letter-spacing: normal;
}
.wc-footer {
  font-weight: var(--wc-fw-regular);
  letter-spacing: normal;
}

/* main.css `a { border-bottom: dotted 1px }` — 링크마다 점선 밑줄

   :not(.wc-navbtn) 이 반드시 필요하다. .wc-navbtn 은 자기 테두리를
   가진 링크인데(`border: 1px solid` — 217행), `.wc-header a`(0-1-1)가
   `.wc-navbtn`(0-1-0)을 이기므로 아랫변만 width:0/style:none 이 되어
   '로그인' 아웃라인 버튼의 하단 테두리가 잘려 보였다.
   --primary 버튼은 배경이 단색이라 증상이 드러나지 않았을 뿐 같은 상태였다.
   푸터에는 테두리를 가진 a 가 없어 그대로 둔다. */
.wc-header a:not(.wc-navbtn),
.wc-footer a { border-bottom: 0; }

/* main.css `ul li { padding-left: .5em }` — 내비 항목이 밀린다 */
.wc-header li,
.wc-footer li { margin: 0; padding: 0; }

/* main.css `strong, b { color:#646464; font-weight:400 }` — 계정명 */
.wc-header b, .wc-header strong,
.wc-footer b, .wc-footer strong { color: inherit; font-weight: var(--wc-fw-bold); }

/* main.css `em, i { font-style: italic }` 은 방어하지 않는다 —
   셸의 <i> 는 전부 FontAwesome 이고 CDN 의 `.fas`(0-1-0) 가 이미
   font-style:normal 을 걸어 main.css(0-0-1)를 이긴다. 확인함. */

/* main.css `form { margin: 0 0 2em }` — 계정 드롭다운의 로그아웃 폼 */
.wc-header form,
.wc-footer form { margin: 0; }

/* main.css `p { margin: 0 0 2em }` — 푸터 연락처·저작권 줄 */
.wc-header p,
.wc-footer p { margin: 0; }

/* main.css `#page-wrapper { padding-top: 3em }` (2883행)
   — 위 규칙들과 달리 셸 스코프 밖이라 예외로 둔다.

   이 padding 은 삭제된 `position:fixed` 인 #header 의 자리를 비워두기
   위한 것이었다. 지금 #header 를 렌더링하는 템플릿은 하나도 없고
   (`grep -rn 'id="header"' --include=*.html` → 0건) 그 자리를 대신하는
   .wc-header 는 position:relative 라 자리 확보가 필요 없다.
   즉 헤더 위 빈 공간만 남기는 죽은 규칙이다.

   3em 은 상속된 body font-size 기준이라 유격이 뷰포트마다 달랐다.
     ≥1681px 16pt → 64px · 1281~1680px 13pt → 52px
     981~1280px 11pt → 44px · ≤980px 0 (main.css 3435행이 이미 0으로 덮음)

   selector 는 main.css 와 동일한 0-1-0 이지만 wc-shell.css 가 뒤에
   로드되어 이긴다. `body.landing #page-wrapper`(0-1-1)는 값이 이미 0
   이라 홈은 변화 없고, 개편 완료 페이지는 main.css 자체를 안 불러
   영향이 없다. 레거시 페이지 전체에서 유격이 사라진다. */
#page-wrapper { padding-top: 0; }
