/* 세계 시간 변환기 전용 스타일 */

nav { max-width: 800px; }
main { max-width: 800px; }

.base-section {
  padding: 0.95rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.base-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(110px, 1fr) minmax(180px, 2fr) auto;
  gap: 0.6rem;
  align-items: end;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.input-group label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.input-group input,
.input-group select {
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  min-height: 44px;
  min-width: 0;
}
.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.btn-now {
  padding: 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  height: 44px;
  white-space: nowrap;
}
.btn-now:hover {
  background: var(--primary-hover);
}

/* 추가 영역 */
.add-section {
  position: relative;
  margin-bottom: 1rem;
}

.add-row {
  display: flex;
  gap: 0.5rem;
}

.add-row input[type="text"] {
  flex: 1;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  min-height: 44px;
}
.add-row input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.btn-add {
  padding: 0 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 자동완성 */
.suggest-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  max-height: 280px;
  overflow-y: auto;
}
.suggest-list[hidden] { display: none; }

.suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}
.suggest-item:hover {
  background: rgba(102, 126, 234, 0.08);
}

.suggest-name {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.suggest-id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--text-sub);
}

.suggest-empty {
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-sub);
  text-align: center;
}

/* 도시 리스트 */
.city-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.city-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-left-width: 4px;
}

/* 시간대별 컬러 코딩 */
.city-row.hr-work {
  border-left-color: var(--success);
}
.city-row.hr-early,
.city-row.hr-eve {
  border-left-color: var(--warning);
}
.city-row.hr-night {
  border-left-color: var(--text-sub);
  opacity: 0.85;
}

.city-row.is-base {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.10), rgba(102, 126, 234, 0.02));
  border-color: var(--primary);
  border-left-color: var(--primary);
}

.city-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.city-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.city-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.badge-base {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
}

.city-id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--text-sub);
}

.city-right {
  text-align: right;
}

.city-time {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.city-row.hr-work .city-time {
  color: var(--success);
}
.city-row.hr-night .city-time {
  color: var(--text-sub);
}

.city-date {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: 0.15rem;
}

.city-remove {
  width: 28px;
  height: 28px;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.city-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

@media (max-width: 600px) {
  .base-row {
    grid-template-columns: 1fr 1fr;
  }
  .base-row .base-tz {
    grid-column: 1 / -1;
  }
  .btn-now {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .city-row {
    padding: 0.7rem 0.85rem;
  }
  .city-time { font-size: 1.25rem; }
  .city-name { font-size: 0.92rem; }
}
