/* ════════════════════════════════════════════════════
   account_common.css
   account.php 와 account_host.php 공통 스타일
   ════════════════════════════════════════════════════ */

/* ── 기본 ── */
:root {
  --wehome-color: #671175;
  --wh-brand: #671175;
  --wh-brand-tint: rgba(103, 17, 117, 0.08);
  --wh-brand-light: rgba(103, 17, 117, 0.12);
}

html,
body,
body#body,
body#body.bgr-for-mobile-only-mode {
  background: #d1d5db !important;
  background-color: #d1d5db !important;
}

.body-bgr-cover {
  display: none !important;
  background: transparent !important;
}

.wh-page-nav-wrap,
.acc-wrap {
  border-left: 1px solid var(--bottom-naverbar-border-side-color, rgba(158,160,163,.12));
  border-right: 1px solid var(--bottom-naverbar-border-side-color, rgba(158,160,163,.12));
}

.wh-page-nav-wrap {
  background: var(--wh-bg, #f2f2f7);
}

.acc-wrap {
  background: var(--wh-bg);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-naverbar-height, 66px) + var(--safe-b, 0px));
  -webkit-font-smoothing: antialiased;
}

.acc-wrap * {
  box-sizing: border-box;
}

/* backdrop-filter 활성화 */
div#content.acc-wrap {
  overflow: visible !important;
  overflow-x: visible !important;
  padding-top: 110px !important;
}

/* ── 페이드인 애니메이션 ── */
@-webkit-keyframes wh-fadeUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(18px);
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes wh-fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.acc-profile-card {
  -webkit-animation: wh-fadeUp .5s .00s cubic-bezier(.22, .68, 0, 1.15) both;
  animation: wh-fadeUp .5s .00s cubic-bezier(.22, .68, 0, 1.15) both;
}

.acc-quick-grid {
  -webkit-animation: wh-fadeUp .5s .09s cubic-bezier(.22, .68, 0, 1.15) both;
  animation: wh-fadeUp .5s .09s cubic-bezier(.22, .68, 0, 1.15) both;
}

.acc-card {
  -webkit-animation: wh-fadeUp .5s .17s cubic-bezier(.22, .68, 0, 1.15) both;
  animation: wh-fadeUp .5s .17s cubic-bezier(.22, .68, 0, 1.15) both;
}

.acc-channeltalk {
  -webkit-animation: wh-fadeUp .5s .24s cubic-bezier(.22, .68, 0, 1.15) both;
  animation: wh-fadeUp .5s .24s cubic-bezier(.22, .68, 0, 1.15) both;
}

.acc-footer {
  -webkit-animation: wh-fadeUp .5s .30s cubic-bezier(.22, .68, 0, 1.15) both;
  animation: wh-fadeUp .5s .30s cubic-bezier(.22, .68, 0, 1.15) both;
}

/* 애니메이션 비활성화 환경 대응 — 요소가 invisible 상태로 남지 않도록 */
@media (prefers-reduced-motion: reduce) {

  .acc-profile-card,
  .acc-quick-grid,
  .acc-card,
  .acc-channeltalk,
  .acc-footer {
    -webkit-animation: none !important;
    animation: none !important;
    opacity: 1 !important;
    -webkit-transform: none !important;
    transform: none !important;
  }
}

/* ── 상단 네비 - wh-page-nav 기반, mode-btn (역할전환) 확장 ── */
/* 영어 등 긴 언어에서 우측 mode-btn과 겹침 방지 */
.wh-page-nav .wh-nav-title {
  max-width: calc(100% - 200px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.wh-page-nav .mode-btn {
  position: absolute;
  right: 16px;
  flex-shrink: 0;
  background: #f0e6ff;
  border: none;
  color: var(--wh-brand, #671175);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}

.wh-page-nav .mode-btn:hover {
  background: #e4d3ff;
  text-decoration: none;
  color: var(--wh-brand, #671175);
}

.wh-page-nav .mode-btn:active {
  opacity: 0.75;
}

/* ── 프로필 카드 ── */
.acc-profile-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  /* Safari: backdrop-filter + border-radius 조합으로 overflow:hidden 묵시적 적용 방지 */
  overflow: visible;
  padding: 22px 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--acc-card-shadow);
}

/* 사진 TIP 말풍선 */
.acc-photo-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-20%);
  background: var(--wh-label);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 10;
  letter-spacing: -0.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-photo-tip .tip-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  font-style: normal;
  line-height: 1;
}

.acc-photo-tip .tip-close .material-symbols-rounded {
  font-size: 11px;
  color: #fff;
  font-variation-settings: 'FILL' 0, 'wght' 600;
}

.acc-photo-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 20%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--wh-label);
}

.acc-photo-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 44px;
  /* 말풍선 공간 확보 — TIP 없을 때 JS로 제거 */
}

.acc-photo-wrap img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.acc-photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 50%;
  border: none;
  display: block;
  cursor: pointer;
}

/* 카메라 뱃지 — 우하단 고정 */
.acc-camera-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: var(--wh-sep-opaque);
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.acc-camera-badge .material-symbols-rounded {
  font-size: 12px;
  color: var(--wh-label);
  font-variation-settings: 'FILL' 1;
}

/* 프로필 텍스트 영역 */
.acc-info {
  flex: 1;
  min-width: 0;
  align-self: center;
}

.acc-info .acc-role {
  font-size: 13px;
  color: var(--wh-label-3);
  margin: 0 0 3px;
}

.acc-info .acc-name {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-info .acc-name a .material-symbols-rounded {
  font-size: 16px;
  color: var(--wh-label-4);
}

.acc-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  color: var(--wh-label-2);
  font-weight: 500;
  width: fit-content;
}

.acc-id-chip .material-symbols-rounded {
  font-size: 14px;
  color: var(--wh-label-4);
  cursor: pointer;
}

/* 소셜 로그인 행 */
.acc-sns-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  cursor: pointer;
}

.acc-sns-row .sns-email {
  font-size: 12px;
  color: var(--wh-label-3);
}

.acc-sns-row .sns-arrow .material-symbols-rounded {
  font-size: 16px;
  color: var(--wh-label-4);
}

/* ── 퀵 그리드 ── */
.acc-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.acc-quick-item {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 14px;
  text-decoration: none;
  gap: 8px;
  transition: transform .2s cubic-bezier(.22, .68, 0, 1.2), box-shadow .2s ease;
  box-shadow: var(--acc-card-shadow);
}

.acc-quick-item:hover {
  text-decoration: none;
}

.acc-quick-item:active {
  transform: scale(0.94);
}

.acc-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-quick-icon .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: 'FILL' 1;
}

.acc-quick-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wh-label);
  text-align: center;
}

/* 퀵 아이콘 공통 색상 */
.qi-purple {
  background: none;
}

.qi-purple .material-symbols-rounded {
  color: var(--wh-brand, #671175);
}

.qi-green {
  background: none;
}

.qi-green .material-symbols-rounded {
  color: #28a745;
}

/* ── 섹션 라벨 ── */
.acc-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--wh-label-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 6px;
}

/* ── 카드 & 행 ── */
.acc-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--acc-card-radius);
  margin: 0;
  overflow: hidden;
  box-shadow: var(--acc-card-shadow);
}

.acc-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  gap: 16px;
  text-decoration: none;
  color: #000;
  min-height: 50px;
  border-bottom: 1px solid var(--wh-bg);
  transition: background .15s;
  cursor: pointer;
}

.acc-row:last-child {
  border-bottom: none;
}

.acc-row:hover {
  text-decoration: none;
  color: #000;
  background: #fafafa;
}

.acc-row:active {
  background: var(--wh-bg);
}

.acc-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-row-icon svg {
  color: var(--wh-label-3);
}

.acc-row-icon .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 1;
  width: 1em;
  height: 1em;
  overflow: hidden;
}

.acc-row-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  letter-spacing: -0.3px;
}

.acc-row-arrow .material-symbols-rounded {
  font-size: 18px;
  color: var(--wh-label-4);
  font-variation-settings: 'FILL' 0, 'wght' 600;
}

/* 아이콘 색상 공통 */
.ri-purple,
.ri-green,
.ri-orange,
.ri-blue,
.ri-gray {
  background: none;
}

.ri-purple .material-symbols-rounded,
.ri-green .material-symbols-rounded,
.ri-orange .material-symbols-rounded,
.ri-blue .material-symbols-rounded,
.ri-gray .material-symbols-rounded {
  color: var(--wh-label-3);
}

/* ── 채널톡 버튼 ── */
.acc-channeltalk {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  color: #000;
  min-height: 50px;
  box-shadow: var(--acc-card-shadow);
}

.acc-channeltalk:hover {
  text-decoration: none;
  color: #000;
}

.acc-channeltalk:active {
  opacity: .7;
}

.acc-channeltalk .ct-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.3px;
}

.acc-channeltalk .acc-row-arrow {
  margin-left: auto;
}

/* ── 복사 토스트 ── */
.copy-toast {
  position: fixed;
  z-index: 9999;
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  font-family: 'Pretendard', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.2px;
  padding: 7px 13px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
}

.copy-toast.hide {
  opacity: 0;
  transform: translateY(-4px) scale(.96);
}

/* ── 하단 영역 ── */
.acc-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0 24px;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--wehome-color);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.logout-btn:hover {
  text-decoration: none;
  color: var(--wehome-color);
}

.deactivate-btn {
  color: var(--wh-label-4);
  font-size: 11px;
  text-decoration: underline;
}

.deactivate-btn:hover {
  color: var(--wh-label-4);
}
