/*
 * 이벤트 07 «웨딩 스타일링 페어» 상세 — 2026-11-03 Figma «07.Event»(1280 1429:15151 · 768 1429:15476 · 360 1429:15752).
 *   그림 조각 + HTML(고정 탭 .sfd-tabs · 방문 희망일 .sfd-form · 유의사항). 포스터 판 전환·조각 규칙 = event-detail-figma.css.
 *   크기는 «그 판의 프레임 px × --u»(--u = 포스터 폭 / 프레임 폭) — 그림 조각과 함께 늘고 줄어 자리가 맞는다.
 *   앱 components/event/figma/StyleFairDetail.tsx · final event/style-fair.html(같은 파일).
 */

.sfd-poster {
  container-type: inline-size;
  --u: calc(min(100cqw, var(--sfd-w) * 1px) / var(--sfd-w));
}

/* 768·360 판은 포스터가 화면 폭을 꽉 채운다(event-detail-figma.css 의 max-width:none) — 상한 없이 늘린다 */
.sfd-poster--tab,
.sfd-poster--mo {
  --u: calc(100cqw / var(--sfd-w));
}

.sfd-poster--tab .sfd-tabs ul,
.sfd-poster--mo .sfd-tabs ul {
  max-width: none;
}

.sfd-anchor {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.sfd-rest {
  position: relative;
}

/* ── 고정 탭(Figma TABS — 활성 #9a6752 면·흰 굵은 글자 · 그 밖 #b5b5b5 · 아래 선 5) ── */

.sfd-tabs {
  position: sticky;
  top: 80px;
  z-index: 20;
  background: #fff;
}

.sfd-tabs ul {
  display: flex;
  max-width: calc(var(--sfd-w) * 1px);
  height: calc(65 * var(--u));
  margin: 0 auto;
  padding: 0;
  align-items: flex-end;
  justify-content: center;
  gap: calc(5 * var(--u));
  border-bottom: calc(5 * var(--u)) solid #9a6752;
  list-style: none;
}

.sfd-tabs li {
  flex: 1 1 0;
  min-width: 0;
}

.sfd-tabs button {
  display: flex;
  width: 100%;
  height: calc(60 * var(--u));
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-right: calc(2 * var(--u)) solid #b5b5b5;
  border-radius: calc(10 * var(--u)) calc(10 * var(--u)) 0 0;
  background: #fff;
  color: #b5b5b5;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: calc(24 * var(--u));
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.sfd-tabs li:last-child button {
  border-right: 0;
}

.sfd-tabs button.is-active {
  border-right-color: transparent;
  background: #9a6752;
  color: #fff;
  font-size: calc(30 * var(--u));
  font-weight: 700;
}

.sfd-tabs button:focus-visible,
.sfd-option:focus-visible,
.sfd-form__cta:focus-visible {
  outline: 3px solid #81d8d0;
  outline-offset: 2px;
}

/* ── 방문 희망일(Figma «invite (비회원)» 652×228 — 배경 무늬는 그림 조각과 이어진다) ── */

.sfd-form {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding: 0 calc(314 * var(--u));
  flex-direction: column;
  gap: calc(15 * var(--u));
  background-position: center top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-family: 'SUIT', 'Noto Sans KR', sans-serif;
}

.sfd-form__title {
  margin: 0;
  color: #000;
  font-size: calc(18 * var(--u));
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.sfd-form__options {
  display: flex;
  gap: calc(8 * var(--u));
}

.sfd-option {
  display: flex;
  min-width: 0;
  height: calc(84 * var(--u));
  padding: 0 calc(8 * var(--u));
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(2 * var(--u));
  border: 0;
  background: #f9ece2;
  color: #b5b5b5;
  cursor: pointer;
}

.sfd-option.is-selected {
  background: #f5d6be;
  color: #000;
}

.sfd-option__day {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.sfd-option__date {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: calc(22 * var(--u));
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.sfd-form__note {
  margin: 0;
  color: #555;
  font-size: calc(14 * var(--u));
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-align: center;
}

.sfd-form__cta {
  display: flex;
  width: 100%;
  height: calc(56 * var(--u));
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: calc(10 * var(--u));
  background: #9a6752;
  color: #fff;
  font-family: inherit;
  font-size: calc(17 * var(--u));
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
}

/* 768 판 — 탭 55(50 + 선 5) · 글자 20/24 · 방문 희망일 x 58 */
.sfd-poster--tab .sfd-tabs ul { height: calc(55 * var(--u)); }
.sfd-poster--tab .sfd-tabs button { height: calc(50 * var(--u)); background: #fcf8f5; font-size: calc(20 * var(--u)); }
.sfd-poster--tab .sfd-tabs button.is-active { background: #9a6752; font-size: calc(24 * var(--u)); }
.sfd-poster--tab .sfd-form { padding: 0 calc(58 * var(--u)); }

/* 360 판 — 탭 27(25 + 선 2) · 글자 12 · 방문 희망일 258 폭(x 51) */
@media (max-width: 767px) {
  .sfd-tabs { top: 64px; }
}

.sfd-poster--mo .sfd-tabs ul {
  height: calc(27 * var(--u));
  gap: calc(2 * var(--u));
  border-bottom-width: calc(2 * var(--u));
}

.sfd-poster--mo .sfd-tabs button {
  height: calc(25 * var(--u));
  border-right-width: calc(2 * var(--u));
  border-radius: calc(5 * var(--u)) calc(5 * var(--u)) 0 0;
  background: #fcf8f5;
  font-size: calc(12 * var(--u));
}

.sfd-poster--mo .sfd-tabs button.is-active { background: #9a6752; font-size: calc(12 * var(--u)); }

.sfd-poster--mo .sfd-form { padding: 0 calc(51 * var(--u)); gap: calc(15 * var(--u)); }
.sfd-poster--mo .sfd-form__title { font-size: calc(14 * var(--u)); text-align: center; }
.sfd-poster--mo .sfd-option { height: calc(77 * var(--u)); }
.sfd-poster--mo .sfd-option__day { font-size: calc(10 * var(--u)); }
.sfd-poster--mo .sfd-option__date { font-size: calc(18 * var(--u)); }
.sfd-poster--mo .sfd-form__note { font-family: 'Noto Sans KR', sans-serif; font-size: calc(11 * var(--u)); }
.sfd-poster--mo .sfd-form__cta { height: calc(45 * var(--u)); font-size: calc(16 * var(--u)); font-weight: 500; }

/* ── 유의사항(Figma 768·360 판 — 1280 판에는 없지만 같은 내용을 모든 폭에) ── */

.sfd-notice ul {
  margin-top: 6px;
}

.sfd-notice h3 {
  margin: 0;
  color: #b5b5b5;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

.sfd-notice__group + .sfd-notice__group {
  margin-top: 14px;
}

@media (max-width: 767px) {
  .sfd-notice h3 { font-size: 12px; }
}

/* 2026-11-03 요청 — 태블릿 이하(768·360 판) 탭 = 옆으로 넘기는 Swiper · 글자 크게 · 좌우 여백 작게(칸 폭 = 글자 + 여백).
   아래 갈색 선은 nav 가 긋는다(Swiper 의 ul 은 옆으로 움직여서) */
.sfd-tabs--swipe { border-bottom: calc(5 * var(--u)) solid #9a6752; }
.sfd-poster--mo .sfd-tabs--swipe { border-bottom-width: calc(2 * var(--u)); }
.sfd-tabs--swipe .sfd-tabs__swiper { overflow: hidden; }
.sfd-tabs--swipe ul.swiper-wrapper { justify-content: flex-start; max-width: none; margin: 0; border-bottom: 0; }
.sfd-tabs--swipe .sfd-tabs__slide { width: auto; flex: none; margin-right: calc(5 * var(--u)); }
.sfd-poster--mo .sfd-tabs--swipe .sfd-tabs__slide { margin-right: calc(2 * var(--u)); }
.sfd-tabs--swipe .sfd-tabs__slide:last-child { margin-right: 0; }
.sfd-tabs--swipe button { width: auto; }
.sfd-poster--tab .sfd-tabs button { padding: 0 calc(18 * var(--u)); font-size: calc(20 * var(--u)); }
.sfd-poster--tab .sfd-tabs button.is-active { font-size: calc(20 * var(--u)); }
.sfd-poster--mo .sfd-tabs button { padding: 0 calc(8 * var(--u)); font-size: calc(13 * var(--u)); letter-spacing: -0.02em; }
.sfd-poster--mo .sfd-tabs button.is-active { font-size: calc(13 * var(--u)); }
.sfd-poster--mo .sfd-tabs ul { height: calc(30 * var(--u)); }
.sfd-poster--mo .sfd-tabs button { height: calc(28 * var(--u)); }

/* 2026-11-03 요청 — 탭과 아래 선이 떨어지지 않게: Swiper 줄 높이 = 탭 높이, 탭을 아래쪽에 붙인다 */
.sfd-tabs--swipe .sfd-tabs__swiper,
.sfd-tabs--swipe ul.swiper-wrapper { height: auto; }
.sfd-tabs--swipe ul.swiper-wrapper { align-items: flex-end; }
.sfd-tabs--swipe .sfd-tabs__slide { display: flex; height: auto; align-items: flex-end; }
.sfd-tabs--swipe { padding-top: calc(5 * var(--u)); }
.sfd-poster--mo .sfd-tabs--swipe { padding-top: calc(2 * var(--u)); }
.sfd-tabs--swipe button { display: flex; }

/* 2026-11-03 요청 — 고정 전(스크롤 위치가 소수점)에는 탭 아래와 갈색 선 사이에 실선 틈이 비쳤다(고정되면 정수 위치라 안 보임).
   탭 아래로 1px 갈색을 겹쳐 틈을 덮고, 선 굵기는 2px 아래로 내려가지 않게 */
.sfd-tabs button { box-shadow: 0 1px 0 #9a6752; }
.sfd-poster--mo .sfd-tabs--swipe { border-bottom-width: max(2px, calc(2 * var(--u))); }
.sfd-poster--mo .sfd-tabs:not(.sfd-tabs--swipe) ul { border-bottom-width: max(2px, calc(2 * var(--u))); }
