/* --------------------------------------------------
   Variables
-------------------------------------------------- */
:root {
    --primary-color: #C60C30;
    --secondary-color: #00247D;
    --text-color: #333;
    --bg-light: #f9f9f9;
    --font-family: 'Segoe UI', Tahoma, sans-serif;
    --order-nav-height: 3.5rem;
    --bottomsheet-header-height: 2.5rem; 
    --panel-bg: #ffffffe0;
    /* tokens for maintainability */
    --border-color: #e0e0e0;
    --muted-bg: #eee;
    --muted-bg-hover: #d4d4d4;
    --muted-text: #888;
    --muted-text-2: #bbb;
    --radius-sm: 4px;
    --radius-md: 8px;
    --transition-fast: .2s;
  }
  
  /* --------------------------------------------------
     Global Reset & Base
  -------------------------------------------------- */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.5;
  }
  
  /* --------------------------------------------------
     Utilities
  -------------------------------------------------- */
  .flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  
  /* --------------------------------------------------
     Container
  -------------------------------------------------- */
  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* --------------------------------------------------
     Header & Navigation
  -------------------------------------------------- */
  header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
  }
  
  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    max-width: 65vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  nav .nav-list {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap:0.5rem;
  }
  
  nav .nav-list a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
    align-items: center;
  }
  
  .nav-list .nav-item {
    margin-left: 1rem; /* 아이템 간 간격 */
  }
  .nav-icon {
    display: block;
    width: 1.5rem;   /* 24px 정도 */
    height: 1.5rem;
  }

  #btn-auth{
    width: 5rem;   /* 24px 정도 */
    height: 3rem;
    display: inline-block;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color:var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    border: none;
  }

  /* 공통 Confirm 버튼 스타일 */
  .btn {
    font-size: 1rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
  }

.btn-confirm {
  display: block;
  width: auto;
  min-width: 200px;
  max-width: 300px;
  min-height: 44px;
  max-height: 60px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.btn-confirm:disabled {
  background-color: #ccc;
  color: #000;
  cursor: default;
  opacity: 1;
}

/* ============================================================
   언어 선택 UI
   ============================================================ */
/* 언어 선택기 컨테이너 - 페이지 오른쪽 상단 위치 */
#language-selector {
  position: absolute;
  top: 100px;
  right: 20px;
  z-index: 100;
  margin-bottom: 20px;
}

.language-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-arrow {
  transition: transform 0.2s;
}

.lang-dropdown.open + #lang-toggle .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 200px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.lang-option:first-child {
  border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 8px 8px;
}

.lang-option:hover {
  background: #f5f5f5;
}

.lang-option.active {
  background: #e3f2fd;
  font-weight: 600;
}

.lang-flag {
  font-size: 1.2rem;
}

.lang-name {
  flex: 1;
}

.lang-check {
  color: var(--primary-color);
  font-weight: bold;
}

/* Pulsing animation for HEIC conversion progress */
@keyframes pulse {
  0%, 100% {
    width: 10%;
    opacity: 0.6;
  }
  50% {
    width: 90%;
    opacity: 1;
  }
}

#storeImageProgressBar.pulsing,
#mainImageProgressBar.pulsing {
  animation: pulse 1.5s ease-in-out infinite;
  width: 10%;
}
