/* vcardFullViewer.css
   간단한 카드 레이아웃 + 버튼/링크 스타일
   필요한 경우 취향에 맞게 조정하세요.
*/

:root {
  --bg: #fafafa;
  --card-bg: #fff;
  --muted: #666;
  --accent: #0b63d0;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

html,
body {
  margin: 0;
  height: 100%;
  background: linear-gradient(180deg, #f6f9fc, var(--bg));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Helvetica Neue", Arial;
  color: #222;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  /* 세로 배치 */
  align-items: center;
  justify-content: flex-start;
  /* 화면 상단부터 배치 */
  padding: 12px 20px;
  padding-bottom: 150px;
    /* 앱 다운로드 푸터 + CTA 바 높이만큼 여백 */
  min-height: 100vh;
  box-sizing: border-box;
}

/* ─── 대화창 모드 레이아웃 ─── */

/* 대화창 전체 래퍼 */
.chat-container {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* 대화 행 (좌우 배치) */
.chat-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

/* 좌측 말풍선 (수신 데이터 — 상대방) */
.chat-bubble-left {
  flex: 1;
  min-width: 0;
}

/* 우측 말풍선 (송신 데이터 — 사용자) */
.chat-bubble-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  box-sizing: border-box;
}

/* 우정렬 행 (사용자 액션 영역) */
.chat-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  /* 라벨~버튼 간격은 좁게, 섹션 간 간격은 chat-container gap + margin-top으로 제어 */
}

/* 바로가기 섹션은 예약 섹션과 더 띄움 */
.chat-row-right+.chat-row-right {
  margin-top: 16px;
}

/* 대화 라벨 텍스트 */
.chat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}

/* 예약번호 큰 글씨 */
.subscribe-number {
  font-size: 24px;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
}

/* ─── 카드 컨테이너 ─── */

.vcard {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  box-sizing: border-box;
}

/* 헤더: 이름/회사 */
.vcard-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

/* 아바타가 없을 때 좌측 정렬 */
.vcard-header.no-avatar {
  justify-content: flex-start;
}

.vcard-avatar {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eee, #ddd);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #444;
  font-size: 18px;
  overflow: hidden;
}

/* 이름 / 회사 */
.vcard-title {
  display: flex;
  flex-direction: column;
  min-width: 0; /* flex 자식의 ellipsis 동작을 위해 필수 */
}

.vcard-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 9px 0;
  /* 긴 이름은 ... 으로 축약 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.vcard-company {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 9px;
  /* 긴 회사명은 ... 으로 축약 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* 구독/예약번호 영역 — 긴 번호는 ... 으로 축약 */
.subsc-number {
  min-width: 0;
}
.subsc-number > span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 본문(정보 리스트) */
.vcard-body {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

/* 항목 */


/* 라벨 없이 값만 좌측 정렬로 표시 */
.vcard-item {
  display: block;
  text-align: left;
}

.vcard-item .value {
  word-break: break-word;
  font-size: 13px;
  font-weight: 600;
  color: #222;
}

/* 링크 스타일 */
.vcard-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* 메모(내부) */
.vcard-memo {
  margin-top: 10px;
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
}

/* 명함 우측 하단 HotQR 워터마크 (30x30) */
.vcard-watermark {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.vcard-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 스피너 (회전하는 원형 로딩) */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 스피너 회전 애니메이션 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 버튼 비활성화 상태 */
.subscribe-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 우정렬 배치된 버튼 스타일 (대화창 모드) */
/* extra.js의 인라인 margin:auto를 덮어씌워 우정렬 유지 */
.chat-row-right .subscribe-btn,
.chat-row-right .pwa-install-btn {
  margin: 0 !important;
  max-width: 320px;
}

/* row1 상단 고정 */
.chat-row-fixed {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #f6f9fc, var(--bg));
  padding-top: 12px;
  padding-bottom: 8px;
}

/* 작은 화면 대응 */
@media (max-width:520px) {
  .vcard {
    padding: 14px;
  }

  .vcard-avatar {
    width: 56px;
    height: 56px;
    font-size: 16px;
  }

  .vcard-name {
    font-size: 15px;
  }

  /* 작은 화면에서도 좌우 50/50 유지: 세로 쌓기 규칙 제거
     대신 좌우 여백·패딩만 축약하여 가독성 확보 */
  .chat-row {
    gap: 8px;
  }
  .chat-bubble-right {
    padding: 12px;
  }

    .subscribe-number {
    font-size: 20px;
  }
}

/* ─── 앱 다운로드 푸터 (화면 맨 아래 고정, 스크롤되지 않음) ─── */
.web-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  padding: 12px 16px 6px;
  display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: 10000;
    /* 로딩 오버레이(9999) 위에 표시 */
  }
  
  /* 문구 + 아이콘·배지 행을 세로로 배치 */
  .web-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  text-align: center;
}

/* 아이콘과 스토어 배지를 한 가로 행에, 10px 간격, 상하 중앙 정렬 */
.web-footer-badge-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 프로젝트 앱 아이콘 (playstore-icon.png) */
.web-footer-icon {
  flex-shrink: 0;
}

.web-footer-icon img {
  height: 58px;
  /* 구글플레이 버튼(.web-footer-btn-google img)과 동일 */
  width: auto;
  display: block;
}

.web-footer-text {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
  line-height: 1.4;
}

.web-footer-btn {
  display: inline-block;
  line-height: 0;
}

/* 애플 앱스토어 배지: 기준 크기(40px 높이) */
.web-footer-btn-apple img {
  height: 40px;
  width: auto;
  display: block;
}

/* 구글 플레이 배지: PNG 원본이 작게 보이므로 애플과 비슷한 시각 크기가 되도록 확대 */
.web-footer-btn-google img {
  height: 58px;
  width: auto;
  display: block;
}

.web-footer-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* ─── CTA 버튼 바 (앱 다운로드 푸터 내 상단) ─── */
.cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  width: 100%;
  box-sizing: border-box;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.cta-btn svg {
  width: 16px;
  height: 16px;
  fill: #888;
}

.cta-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}