/* [2026-08-28] 링크 생성기(UTM/NT) 공용 스타일 - nt_market.php 의 nt- 스타일을 lm- 로 통합 */

.lm-page * { box-sizing: border-box; }
.lm-page {
  max-width: 1100px;
  margin: 30px auto 0;
  /* [2026-08-28] 아래에 설명·FAQ 본문이 이어지므로 바닥 여백은 그쪽에 맡긴다 */
  padding: 0 16px 8px;
  font-family: 'Pretendard', -apple-system, sans-serif;
}

/* 탭 */
.lm-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f4f4f5;
  border-radius: 10px;
  margin-bottom: 14px;
}
.lm-tab {
  display: inline-flex;
  /* [2026-08-28] baseline 은 글자를 알약 위쪽에 붙여버려 줄이 안 맞아 보인다 : 세로 가운데로 고정 */
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  /* [2026-08-28] 탭이 button 에서 a 로 바뀌었다 (상대편 생성기 주소로 이동) */
  text-decoration: none;
}
.lm-tab:hover { color: #111827; text-decoration: none; }
.lm-tab.active {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.lm-tab-sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #9ca3af;
}
.lm-tab.active .lm-tab-sub { color: #a78bfa; }

.lm-panel { display: none; }
.lm-panel.active { display: block; }

/* 카드 */
.lm-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.lm-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.7;
}
.lm-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lm-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.lm-icon-info { background: #6366f1; }
.lm-icon-form { background: #8b5cf6; }
.lm-icon-result { background: #10b981; }

/* 파라미터 설명 표 */
.lm-param-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
.lm-param-table th {
  background: #f9fafb;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}
.lm-param-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}
.lm-param-table tr:last-child td { border-bottom: none; }
.lm-param-table tr:hover td { background: #fafafa; }
.lm-param-table .lm-code {
  font-family: 'Pretendard', monospace;
  font-size: 13px;
  color: #7c3aed;
  font-weight: 600;
}
.lm-param-table .lm-example {
  font-size: 13px;
  color: #9ca3af;
}
/* 전체폭에서 의미 칸이 넉넉하도록 열 너비 고정 */
.lm-param-table th:nth-child(1),
.lm-param-table td:nth-child(1) { width: 200px; }
.lm-param-table th:nth-child(2),
.lm-param-table td:nth-child(2) { width: 340px; }

/* 폼 */
.lm-form-group { margin-bottom: 14px; }
.lm-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.lm-label-sub {
  font-weight: 400;
  color: #9ca3af;
  font-size: 13px;
  margin-left: 4px;
}
.lm-required {
  color: #ef4444;
  margin-left: 2px;
}
.lm-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Pretendard', sans-serif;
  background: #fff;
  color: #111827;
}
.lm-input::placeholder { color: #d1d5db; }
.lm-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}
.lm-input.lm-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.lm-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}
.lm-error-msg {
  margin-top: 4px;
  font-size: 12px;
  color: #ef4444;
  display: none;
}

/* 소문자 변환 체크박스 */
.lm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}
.lm-check input {
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
  cursor: pointer;
  margin: 0;
}
.lm-check b {
  color: #374151;
  font-weight: 600;
}

/* 결과 */
.lm-result-box {
  margin-top: 16px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.lm-result-url {
  word-break: break-all;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: 'Pretendard', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #374151;
  min-height: 44px;
}
.lm-result-url .lm-highlight {
  color: #7c3aed;
  font-weight: 600;
}
.lm-result-empty {
  color: #d1d5db;
  font-style: italic;
}

/* 버튼 */
.lm-btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  background: #7c3aed;
  color: #fff;
  font-family: inherit;
}
.lm-btn-copy:hover { background: #6d28d9; }
.lm-btn-copy:active { transform: scale(0.98); }
.lm-btn-copy.copied { background: #059669; }

/* 레이아웃 : [2026-08-28] 좌우 2단에서 위아래로 변경
   설명표를 옆에 두니 폭이 좁아 "어디서 들어왔나" 가 세 줄로 깨졌다. 폼이 위, 설명이 아래 전체폭 */
.lm-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* [2026-08-28] 입력칸을 한 줄에 하나씩 (2단이면 좌우로 눈이 왔다갔다 해서 채워야 할 순서가 안 보인다) */
.lm-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 640px; /* 카드 폭(1100px)을 다 쓰면 'cpc' 한 단어 넣는 칸이 화면 끝까지 늘어난다 */
}
.lm-full { grid-column: 1 / -1; }

/* 링크 */
.lm-link {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lm-link:hover { color: #6d28d9; }

/* 토스트 */
.lm-toast {
  position: fixed;
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #18181b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  pointer-events: none;
}
.lm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 반응형 */
@media (max-width: 768px) {
  .lm-page { margin-top: 16px; padding: 0 12px 4px; }
  .lm-card { padding: 14px; }
  .lm-stack { gap: 16px; }
  .lm-param-table th:nth-child(1),
  .lm-param-table td:nth-child(1),
  .lm-param-table th:nth-child(2),
  .lm-param-table td:nth-child(2) { width: auto; }
  .lm-tabs {
    display: flex;
    width: 100%;
  }
  .lm-tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
  }
  .lm-tab-sub { font-size: 11px; }
  .lm-btn-copy { height: 46px; font-size: 15px; }
  .lm-param-table { font-size: 13px; }
  .lm-param-table th,
  .lm-param-table td { padding: 8px 10px; }
}
