/**
 * 오솔킹 (OSOLKING) 실시간 현장 톡 (Live Ground Talk) 스타일시트
 */

.live-talk-container {
  margin: 0.35rem 0 0.85rem;
  background: var(--card-bg, #ffffff);
  border-radius: 12px;
  border: 1px solid rgba(39, 104, 200, 0.16);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.live-talk-container:hover {
  box-shadow: 0 8px 24px rgba(39, 104, 200, 0.08);
}

/* 상단 헤더 (컴팩트) */
.live-talk-header {
  padding: 0.35rem 0.75rem;
  background: #2768c8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.live-talk-header-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.live-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
  flex-shrink: 0;
}

.live-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #ff3344;
  box-shadow: 0 0 5px rgba(255, 51, 68, 0.8);
  animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 51, 68, 0.8), 0 0 4px #ff3344;
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(255, 51, 68, 0), 0 0 6px rgba(255, 51, 68, 0.4);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 51, 68, 0), 0 0 4px #ff3344;
  }
}

.live-talk-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}


/* 박지 셀렉터 */
.live-spot-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 2px 6px;
}

.live-spot-selector-label {
  font-size: 0.72rem;
  color: #dbeafe;
  white-space: nowrap;
}

.live-spot-select {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 200px;
}

.live-spot-select optgroup {
  background: #11233b;
  color: #93c5fd;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 4px;
}

.live-spot-select option {
  background: #1e385c;
  color: #ffffff;
  padding: 4px 6px;
}

/* 24시간 현장 요약 바 (컴팩트) */
.live-summary-bar {
  background: #f0f7ff;
  border-bottom: 1px solid #dbeafe;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.live-summary-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-ttl-pill {
  font-size: 0.64rem;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  padding: 1px 5px;
  letter-spacing: -0.02em;
}

.live-summary-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.summary-chip.is-alert {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

/* 메시지 피드 영역 (컴팩트) */
.live-talk-feed {
  max-height: 380px;
  min-height: 180px;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.live-talk-feed::-webkit-scrollbar {
  width: 6px;
}
.live-talk-feed::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 빈 상태 */
.live-talk-empty {
  margin: auto;
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}

.live-talk-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.live-talk-empty-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.live-talk-empty-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* 메시지 카드 */
.talk-msg-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  animation: talk-fade-in 0.25s ease-out;
}

@keyframes talk-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.talk-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.talk-avatar.is-verified-avatar {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.talk-body {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  position: relative;
}

.talk-msg-card.is-my-msg .talk-body {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.talk-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  gap: 0.5rem;
}

.talk-author-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.talk-author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

/* 현장 인증 뱃지 (핵심!) */
.badge-verified-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
  animation: badge-pulse 2.5s infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0);
  }
}

.badge-normal-report {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.talk-time {
  font-size: 0.73rem;
  color: #94a3b8;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.talk-actions-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* 퀵 태그 뱃지 */
.talk-status-tags {
  display: flex;
  gap: 4px;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.talk-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.talk-status-tag.tag-wind {
  background: #eff6ff;
  color: #1d4ed8;
}

.talk-status-tag.tag-seat {
  background: #fefce8;
  color: #854d0e;
}

.talk-status-tag.tag-ground {
  background: #e0f2fe;
  color: #0369a1;
}

.talk-content-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #334155;
  word-break: break-word;
  white-space: pre-wrap;
}

.talk-delete-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 4px;
}

.talk-delete-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.talk-delete-btn.is-admin-del {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

.talk-delete-btn.is-admin-del:hover {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}

.talk-admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.25);
  margin-left: 4px;
}

/* 하단 입력 영역 (컴팩트) */
.live-talk-footer {
  padding: 0.8rem 1.1rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

/* 클린 톡 운영 수칙 경고 배너 */
.live-talk-guideline-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 9px;
  padding: 6px 10px;
  margin-bottom: 0.65rem;
  font-size: 0.76rem;
  color: #9f1239;
  line-height: 1.45;
  word-break: keep-all;
}

.live-talk-guideline-bar strong {
  color: #be123c;
  font-weight: 800;
}

.guideline-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}

/* 비회원 로그인 게이트 */
.live-talk-guest-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.guest-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guest-box-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

.btn-guest-login {
  background: #2768c8;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(39, 104, 200, 0.25);
  transition: all 0.15s ease;
  margin-top: 0.2rem;
}

.btn-guest-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(39, 104, 200, 0.35);
  background: #1e57aa;
}

/* 회원 작성 폼 */
.live-talk-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 컨트롤 툴바 (위치인증 & 퀵태그) */
.talk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* 위치 인증 버튼 */
.btn-verify-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verify-location:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.btn-verify-location.is-verified {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-verify-location.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* 퀵 상태 셀렉터 팝오버/행 */
.talk-quick-tags-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quick-tag-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tag-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.quick-tag-btn.is-selected {
  background: #2768c8;
  color: #ffffff;
  border-color: #2768c8;
  box-shadow: 0 2px 5px rgba(39, 104, 200, 0.25);
}

/* 입력창 & 전송 버튼 */
.talk-input-row {
  display: flex;
  gap: 0.5rem;
}

.talk-input {
  flex: 1;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fdfdfd;
}

.talk-input:focus {
  border-color: #2768c8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(39, 104, 200, 0.15);
}

.btn-send-talk {
  background: #2768c8;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
}

.btn-send-talk:hover {
  background: #1e57aa;
  transform: translateY(-1px);
}

.btn-send-talk:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 위치 인증 안내 메시지 */
.talk-geo-status {
  font-size: 0.78rem;
  color: #0284c7;
  font-weight: 600;
  display: none;
}

.talk-geo-status.is-warning {
  color: #d97706;
}

/* spots.html 카드 내 현장 톡 버튼 */
.btn-spot-talk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-spot-talk:hover {
  background: #2768c8;
  color: #ffffff;
  border-color: #2768c8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(39, 104, 200, 0.25);
}

/* 모바일 화면 조정 */
@media (max-width: 640px) {
  .live-talk-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .live-spot-selector-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .live-spot-select {
    max-width: none;
    flex: 1;
  }

  .live-summary-bar {
    padding: 0.75rem 1rem;
  }

  .live-talk-feed {
    padding: 1rem;
    max-height: 360px;
  }

  .live-talk-footer {
    padding: 1rem;
  }

  .talk-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .talk-quick-tags-row {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .talk-meta-row {
    margin-bottom: 0.35rem;
    gap: 0.35rem;
  }

  .talk-author-wrap {
    gap: 5px;
  }

  .talk-author-name {
    font-size: 0.85rem;
  }

  .talk-time {
    font-size: 0.71rem;
    margin-left: 2px;
  }

  .badge-normal-report,
  .badge-verified-live {
    font-size: 0.68rem;
    padding: 1px 5px;
  }

  .talk-admin-tag {
    font-size: 0.66rem;
    padding: 1px 5px;
    margin-left: 2px;
  }

  .talk-delete-btn.is-admin-del {
    font-size: 0.67rem;
    padding: 1px 5px;
    margin-left: 4px;
  }
}
