/* CSS Reset & 基礎設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.fig-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  container-type: inline-size;
}

.fig-frame__layer {
  position: absolute;
}

.fig-frame__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* RWD設定 */
.desktop-view {
  display: block;
  --container-width: 1920;
}

.mobile-view {
  display: none;
  --container-width: 800;
  padding-bottom: var(--mobile-menu-height);
}

@media (max-width: 1000px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
  }
}

:root {
  --web-breakpoint: 1000;
  /* 響應式斷點基準值（桌機/手機切換），需與 @media (max-width) 及 window.__webBreakpoint 同步修改，見 docs/02-html-structure.md 2-B */
  /* Menu */
  --desktop-menu-height: 80px;
  --mobile-menu-height: 80px;
  /* 依設計稿實際高度覆寫此值，見 docs/02-html-structure.md mobile-menu.html 客製化 */
  --theme-bg-color: #e25f2a;
  /* Fallback theme color，純手機版模式時由 docs/01-setup.md 依設計稿主色調覆寫此值 */
}

/* 選單樣式 */
.desktop-menu,
.mobile-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 2.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
}

.desktop-menu {
  padding-right: 0;
  height: var(--desktop-menu-height);
  background: url("../images/desktop/menu-bg.webp") center center;
  --menu-font-size: clamp(
    14px,
    calc(16 / var(--container-width, 1920) * 100cqi),
    20px
  );
}
.mobile-menu {
  height: var(--mobile-menu-height);
  /* background: url("../images/mobile/menu-bg.webp") center center; */
  background-color: #412114;
  font-size: clamp(
    10px,
    calc(16 / var(--container-width, 1920) * 100cqi),
    18px
  );
}

.desktop-menu--logo {
  width: clamp(180px, calc(180 / var(--container-width, 1920) * 100cqi), 220px);
}
.mobile-menu--logo {
  width: clamp(100px, 35%, 180px);
}

.desktop-menu--container,
.mobile-menu--container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(12px, 1.5%, 28px);
  width: 30%;
}

.mobile-menu--item {
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  flex-grow: 1;
}

.desktop-menu--item::before,
.mobile-menu--item::before {
  position: absolute;
  content: "";
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  left: clamp(-6px, -0.75%, -28px);
}

.desktop-menu--item {
  position: relative;
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding-block: 12px;
}

.desktop-menu--item svg {
  width: clamp(14px, 4vw, 24px);
  height: clamp(14px, 4vw, 24px);
}

.mobile-menu--item svg {
  width: clamp(16px, 5vw, 20px);
  height: clamp(16px, 5vw, 20px);
}

.desktop-menu--item span,
.mobile-menu--item span {
  color: #fff;
  text-align: center;
}

/* 只有手機版時額外樣式 */
body.mobile-only-layout {
  background-color: var(--theme-bg-color);
}

body.mobile-only-layout .mobile-view {
  display: block;
  max-width: 1000px;
  /* 與 breakpoint 相同 */
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

body.mobile-only-layout .mobile-menu {
  max-width: 1000px;
  left: 50%;
  transform: translateX(-50%);
}

/* Swiper Overrides */
.swiper-container-wrapper {
  overflow: hidden;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
}

/* Custom Swiper Pagination */
.swiper-pagination {
  position: absolute;
  z-index: 10;
  display: flex;
  --swiper-pagination-bottom: 0;
}

.swiper-pagination-bullet {
  width: clamp(10px, calc(16 / var(--container-width, 1920) * 100cqi), 14px);
  height: clamp(10px, calc(16 / var(--container-width, 1920) * 100cqi), 14px);
  background-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
  border-radius: 50%;
  /* border: 1px solid #fff; */
  margin: 0 6px !important;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  background-color: #ffffff;
}

.justify-center {
  justify-content: center;
}
.justify-start {
  justify-content: start;
}
.justify-end {
  justify-content: end;
}

/* Custom Swiper Arrows */
.custom-arrows-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.custom-prev,
.custom-next {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-prev::after,
.custom-next::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.custom-prev::after {
  border-right: 12px solid #926127;
  margin-right: 4px;
}

.custom-next::after {
  border-left: 12px solid #926127;
  margin-left: 4px;
}

/* Form Styles */
.form-layer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reservation-form {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: calc(16 / var(--container-width, 1920) * 100cqi);
  padding: 0;
}

.desktop-view .reservation-form {
  --form-font-size: clamp(
    14px,
    calc(16 / var(--container-width, 1920) * 100cqi),
    20px
  );
}
.mobile-view .reservation-form {
  --form-font-size: clamp(
    12px,
    calc(16 / var(--container-width, 1920) * 100cqi),
    18px
  );
}

.reservation-form * {
  font-size: var(--form-font-size);
}

/* 單選 */
.radio-group {
  display: flex;
  gap: calc(20 / var(--container-width, 1920) * 100cqi);
  margin-bottom: calc(20 / var(--container-width, 1920) * 100cqi);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: calc(8 / var(--container-width, 1920) * 100cqi);
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: calc(16 / var(--container-width, 1920) * 100cqi);
  height: calc(16 / var(--container-width, 1920) * 100cqi);
  margin: 0;
}

/* 文字輸入 */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: calc(12 / var(--container-width, 1920) * 100cqi)
    calc(16 / var(--container-width, 1920) * 100cqi);
  font-family: "NotoSansHans", sans-serif;
  outline: none;
  /* 字色 */
  color: #333;
  /* 底色 */
  /* background-color: rgba(255, 255, 255, 0.75); */
  /* 邊框 */
  /* border-radius: calc(4 / var(--container-width, 1920) * 100cqi); */
  /* border: 1px solid #ddd; */
  background: transparent;
  border: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #555;
}

.reservation-form .form-control {
  flex: 1;
  /* margin-left: 20px; */
  display: flex;
}

.form-container-wrapper {
  width: 30vw;
  max-width: 780px;
  margin: 0 auto;
}
.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.reservation-form .form-label {
  display: flex;
  align-items: center;
  width: 90px;
  flex-shrink: 0;
  color: #192532;
  font-size: clamp(14px, 4vw, 16px);
}
@media screen and (min-width: 1000px) {
  .reservation-form .form-label {
    width: 100px;
  }
}
.reservation-form .form-label .label-text {
  flex: 1;
  text-align: justify;
  text-align-last: justify;
}
.reservation-form .req {
  color: #ff0000;
  margin-left: 5px;
}
.reservation-form .form-terms {
  color: #ffffff;
  text-align: center;
  margin-block: 10px;
}
.form-group {
  display: flex;
  align-items: center;
  border: 1px solid #ffffff;
  background: rgba(255, 255, 234, 0.7);
  border-radius: 8px;
  padding: 8px 15px;
}

@media screen and (max-width: 800px) {
  .form-row {
    flex-direction: column;
  }
}

.select-wrapper {
  position: relative;
}
.select-wrapper select {
  height: 100%;
}

.select-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 16px;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.select-icon svg {
  width: 100%;
  height: 100%;
}

.checkbox-label {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 10%;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.radio-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px !important;
  color: #555;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: calc(8 / var(--container-width, 1920) * 100cqi);
  cursor: pointer;
}
.radio-group input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: calc(24 / var(--container-width, 1920) * 100cqi);
  height: calc(24 / var(--container-width, 1920) * 100cqi);
  background-color: #ffffff;
  border-radius: calc(6 / var(--container-width, 1920) * 100cqi);
  border: none;
  cursor: pointer;
  position: relative;
}
.radio-group input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(12 / var(--container-width, 1920) * 100cqi);
  height: calc(12 / var(--container-width, 1920) * 100cqi);
  background-color: #4c7a6d;
  border-radius: calc(3 / var(--container-width, 1920) * 100cqi);
}

.zipcode3 {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}
@media screen and (min-width: 1000px) {
  .zipcode3 {
    flex-direction: row;
  }
}
.zipcode3 .form-label {
  display: none !important;
}
.zipcode3 select {
  flex: 1;
}
.zipcode3 > *:not(select) {
  display: none !important;
}

/* 提交按鈕 */
.submit-btn-wrapper {
  position: relative;
  display: inline-block;
  margin-top: calc(10 / var(--container-width, 1920) * 100cqi);
  width: fit-content;
}
.submit-btn {
  display: block;
  cursor: pointer;
  /* 寬度、距 */
  width: 100%;
  margin: 0 auto;
  letter-spacing: calc(2 / var(--container-width, 1920) * 100cqi);
  padding: calc(20 / var(--container-width, 1920) * 100cqi)
    calc(32 / var(--container-width, 1920) * 100cqi);
  /* 顏色 */
  background-color: #1a222b;
  color: #debf66;
  /* 邊框 */
  border: 1px solid #1a222b;
  border-radius: calc(12 / var(--container-width, 1920) * 100cqi);
}
.submit-btn-wrapper .pointer-icon {
  position: absolute;
  right: calc(-20 / var(--container-width, 1920) * 100cqi);
  bottom: calc(-20 / var(--container-width, 1920) * 100cqi);
  width: calc(40 / var(--container-width, 1920) * 100cqi);
  pointer-events: none;
}

/* Swipe Hint Overlay */
.swipe-hint-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
  z-index: 10;
}
.swipe-hint-overlay.hidden {
  opacity: 0 !important;
}
.swipe-hint-circle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  color: white;
}
.swipe-icon-container {
  animation: swipeHandAnim 2.5s infinite ease-in-out;
}
.swipe-icon-container svg {
  width: 45px;
  height: 45px;
}
.swipe-hint-text {
  margin-top: 8px;
  font-size: 1rem;
  letter-spacing: 2px;
  font-weight: bold;
}

@keyframes swipeHandAnim {
  0%,
  100% {
    transform: translateX(8px);
  }

  50% {
    transform: translateX(-8px);
  }
}

/* Privacy Modal Styles */
.privacy-modal-trigger {
  text-decoration: underline;
  cursor: pointer;
  color: #1a222b;
  padding-inline: 4px;
}

.privacy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.privacy-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.privacy-modal-container {
  background-color: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.privacy-modal-overlay.is-open .privacy-modal-container {
  transform: translateY(0);
}

.privacy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.privacy-modal-title {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.privacy-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s;
}

.privacy-modal-close:hover {
  color: #333;
}

.privacy-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* Custom Click Animation */
@keyframes click-diagonal {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-5px, -5px);
  }
}

.anim-click-diagonal {
  animation: click-diagonal 1.5s infinite ease-in-out;
}

@keyframes infinite-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.anim-infinite-rotate {
  animation: infinite-rotate 20s infinite linear;
}

.anim-infinite-rotate-reverse {
  animation: infinite-rotate 20s infinite reverse linear;
}
