/* ============================================================
 * Scent Domino — styles
 * global.css 에 합치거나 <link>로 별도 로드
 * ============================================================ */

/* ---------- 공통: 노트 카드 ---------- */
.sd-note {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid;
  border-radius: 12px;
}
.sd-note__icon {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sd-note__body { flex: 1; min-width: 0; }
.sd-note__name { margin: 0; font-weight: 600; }
.sd-note__cat  { margin: 0; opacity: .7; }

.sd-note--full { padding: 12px 14px; margin-bottom: 8px; }
.sd-note--full .sd-note__name { font-size: 15px; }
.sd-note--full .sd-note__cat  { font-size: 12px; }

.sd-note--mini { padding: 7px 10px; margin-bottom: 6px; gap: 8px; }
.sd-note--mini .sd-note__name { font-size: 13px; font-weight: 500; }

/* ---------- phase 헤더 ---------- */
.sd-phase {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 2px 8px;
}
.sd-phase__label { font-size: 12px; font-weight: 600; color: #888; letter-spacing: .02em; }
.sd-phase__hint  { font-size: 11px; color: #b4b2a9; }

/* ---------- 도미노 등장 애니메이션 ---------- */
.sd-enter {
  opacity: 0;
  transform: translateY(-14px) scale(.96);
  transition: opacity .45s cubic-bezier(.34,1.56,.64,1),
              transform .45s cubic-bezier(.34,1.56,.64,1);
}
.sd-enter--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .sd-enter { transition: opacity .25s ease; transform: none; }
  .sd-enter--in { transform: none; }
}

/* ============================================================
 * 모드 1: 모달
 * ============================================================ */
.sd-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 18, 16, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background .22s ease;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
}
.sd-overlay--in {
  background: rgba(20, 18, 16, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.sd-modal {
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  -webkit-overflow-scrolling: touch;
}
.sd-overlay--in .sd-modal { transform: translateY(0); }

/* 데스크톱은 가운데 카드형 */
@media (min-width: 768px) {
  .sd-overlay { align-items: center; }
  .sd-modal {
    max-width: 420px;
    border-radius: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
  }
  .sd-overlay--in .sd-modal { transform: translateY(0); opacity: 1; }
}

.sd-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sd-modal__title { margin: 0; font-size: 17px; font-weight: 600; color: #2c2c2a; }
.sd-modal__sub   { margin: 2px 0 0; font-size: 13px; color: #888; }
.sd-modal__actions { display: flex; gap: 6px; flex-shrink: 0; }
.sd-modal__track { margin-top: 8px; }

.sd-btn-icon {
  width: 34px; height: 34px;
  border: none;
  background: #f1efe8;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #5f5e5a;
  font-size: 18px;
  transition: background .15s ease, transform .1s ease;
}
.sd-btn-icon:hover { background: #e4e1d6; }
.sd-btn-icon:active { transform: scale(.92); }

/* ---------- Visualize 트리거 버튼 (제품 페이지에 넣을 것) ---------- */
.sd-visualize-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: #2c2c2a;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}
.sd-visualize-btn:hover { opacity: .88; }
.sd-visualize-btn:active { transform: scale(.97); }
.sd-visualize-btn i { font-size: 17px; }

/* ============================================================
 * 모드 2: explore 미니 팝업
 * ============================================================ */
.sd-mini {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  z-index: 20;
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  opacity: 0;
  transform: scale(.94);
  transform-origin: top center;
  transition: opacity .18s ease, transform .18s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.sd-mini--in { opacity: 1; transform: scale(1); }
.sd-mini__track { display: block; }

/* explore 카드는 반드시 position: relative 여야 함 (미니 팝업 기준점) */
.explore-card, .product-card { position: relative; }

/* ---------- 커서 위치에 떠다니는 플로팅 미니 (explore hover) ---------- */
.sd-mini--float {
  position: fixed;
  top: auto; left: auto; right: auto;
  width: 200px;
  z-index: 1001;
}

/* ---------- 호버 대기 링 (버퍼링 인디케이터) ---------- */
.sd-ring {
  position: fixed;
  z-index: 1001;
  width: 24px; height: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
}
.sd-ring--in { opacity: 1; }
.sd-ring svg { width: 24px; height: 24px; display: block; transform: rotate(-90deg); }
.sd-ring__track { fill: none; stroke: rgba(44,44,42,.15); stroke-width: 3; }
.sd-ring__bar {
  fill: none; stroke: #2c2c2a; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 94.25;   /* 2·π·r, r=15 */
  stroke-dashoffset: 94.25;  /* 비어있는 상태에서 시작 → 채워짐 */
}
@media (prefers-reduced-motion: reduce) {
  .sd-ring__bar { transition: none !important; stroke-dashoffset: 0; }
}
