/**
 * [한글 주석] 우측 상단 폰트 설정 버튼과 우측 하단 유틸리티 버튼 스타일입니다.
 * 위치: /theme/assets/css/buttons.css
 */
/**
 * 기능: +/−/↺/T 버튼, 웹폰트 선택 패널, ◐ 및 ↑↓←→ 버튼의 공통 디자인을 정의합니다.
 * 위치: /theme/assets/css/buttons.css
 */

.zyss-theme__utility-top,
.zyss-theme__utility-bottom {
  position: fixed;
  right: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.zyss-theme__utility-top {
  top: 14px;
}

.zyss-theme__utility-bottom {
  bottom: 20px;
}

.zyss-theme__utility-group {
  display: flex;
  gap: 6px;
}

.zyss-theme__utility-group--font {
  position: relative;
}

.zyss-theme__utility-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(16, 16, 16, 0.82);
  color: #ffffff;
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", Tahoma, Verdana, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
}

.zyss-theme__utility-button:hover,
.zyss-theme__utility-button:focus-visible {
  transform: translateY(-2px);
  background: rgba(38, 38, 38, 0.95);
  border-color: rgba(255, 255, 255, 0.26);
  outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.zyss-theme__utility-button--small,
.zyss-theme__utility-button--icon {
  width: 42px;
  height: 42px;
}

:root[data-zyss-color-mode="light"] .zyss-theme__utility-button {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #1d2433;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}

:root[data-zyss-color-mode="light"] .zyss-theme__utility-button:hover,
:root[data-zyss-color-mode="light"] .zyss-theme__utility-button:focus-visible {
  background: rgba(242, 242, 242, 0.98);
  border-color: rgba(0, 0, 0, 0.18);
}

.zyss-theme__font-family-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 144px;
  max-height: 60vh;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  z-index: 70;
}

.zyss-theme__font-family-panel[hidden] {
  display: none !important;
}

.zyss-theme__font-family-option {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.zyss-theme__font-family-option:hover,
.zyss-theme__font-family-option:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
  outline: none;
}

.zyss-theme__font-family-option.is-active { background: #000000 !important; color: #ffffff !important; font-weight: 700; }

:root[data-zyss-color-mode="light"] .zyss-theme__font-family-panel {
  border-color: rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

:root[data-zyss-color-mode="light"] .zyss-theme__font-family-option {
  color: #1d2433;
}

:root[data-zyss-color-mode="light"] .zyss-theme__font-family-option:hover,
:root[data-zyss-color-mode="light"] .zyss-theme__font-family-option:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

:root[data-zyss-color-mode="light"] .zyss-theme__font-family-option.is-active { background: #000000 !important; color: #ffffff !important; font-weight: 700; }

[data-zyss-font-family-option="nanum"] {
  font-family: "Nanum Gothic", "나눔고딕", sans-serif;
}

[data-zyss-font-family-option="nanumserif"] {
  font-family: "Nanum Myeongjo", "나눔명조", serif;
}

[data-zyss-font-family-option="notosans"] {
  font-family: "Noto Sans KR", sans-serif;
}

[data-zyss-font-family-option="notoserif"] {
  font-family: "Noto Serif KR", serif;
}

[data-zyss-font-family-option="pretendard"] {
  font-family: Pretendard, sans-serif;
}

[data-zyss-font-family-option="gmarket"] {
  font-family: "GmarketSans", sans-serif;
}

@media (max-width: 768px) {
  .zyss-theme__utility-top {
    top: 12px;
    right: 12px;
  }

  .zyss-theme__utility-bottom {
    right: 12px;
    bottom: 12px;
  }

  .zyss-theme__utility-button--small,
  .zyss-theme__utility-button--icon {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .zyss-theme__font-family-panel {
    min-width: 132px;
  }
}
