/* 전역 스타일, CSS 변수, 공통 컴포넌트 */

:root {
  --color-primary:      #FF6B35;
  --color-primary-dark: #E55A22;
  --color-secondary:    #2C3E50;
  --color-accent:       #F7DC6F;
  --color-bg:           #F0F2F5;
  --color-white:        #FFFFFF;
  --color-text:         #1A1A1A;
  --color-text-muted:   #6B7280;
  --color-border:       #E5E7EB;
  --color-star:         #F59E0B;
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.15);
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  /* 앱 상단 바 높이 */
  --app-bar-h:  52px;
  /* 하위 호환성 */
  --header-h:   52px;
  /* 시트 접힌 상태에서 노출되는 높이 */
  --sheet-peek: 88px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ── 앱 상단 바 ── */
.app-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--app-bar-h);
  background: var(--color-secondary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: var(--shadow-md);
}

.app-bar__logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.app-bar__location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  opacity: 0.72;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar__location svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* ── 메인 레이아웃 ── */
.layout {
  display: flex;
  height: calc(100vh - var(--app-bar-h));
  margin-top: var(--app-bar-h);
  position: relative;
  overflow: hidden;
}

/* ── 공통 스피너 ── */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 에러 메시지 ── */
.error-msg {
  color: var(--color-primary-dark);
  text-align: center;
  padding: 1rem 1.5rem;
  line-height: 1.9;
  font-size: 0.9rem;
}

.error-msg strong {
  font-family: monospace;
  background: #FFF0EB;
  padding: 1px 4px;
  border-radius: 4px;
}

/* ── 배지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--distance {
  background: #EFF6FF;
  color: #2563EB;
}

.badge--phone {
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-weight: 400;
}


