@charset "utf-8";

/* 환전게시판 — 중고장터(eottae-market.css)·커뮤니티 목록 스타일 위에 덧씌움 */

.exchange-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.exchange-notice {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #fcd34d;
  border-radius: 14px;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.86rem;
  line-height: 1.6;
}

.exchange-notice__title {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 900;
  color: #92400e;
}

.exchange-notice__list {
  margin: 0;
  padding-left: 1.1rem;
}

.exchange-notice__list li {
  list-style: disc;
}

.exchange-notice--compact {
  font-size: 0.8rem;
}

.exchange-tabs {
  flex-wrap: wrap;
}

.exchange-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.exchange-status-tabs__item {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.exchange-status-tabs__item.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.exchange-search {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.exchange-search__field {
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
}

.exchange-search__input {
  flex: 1 1 auto;
  min-width: 0;
}

.exchange-count {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: #64748b;
}

/* 상태 배지 */
.exchange-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.exchange-status-badge--open {
  background: #dcfce7;
  color: #166534;
}

.exchange-status-badge--reserved {
  background: #ffedd5;
  color: #c2410c;
}

.exchange-status-badge--done {
  background: #e2e8f0;
  color: #475569;
}

.exchange-status-badge--expired {
  background: #fef3c7;
  color: #92400e;
}

.exchange-status-badge--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.exchange-status-badge--notice {
  background: #0f172a;
  color: #fff;
}

.exchange-status-badge--list {
  min-width: 64px;
}

.exchange-category-badge--krw_php {
  background: #eef2ff;
  color: #3730a3;
}

.exchange-category-badge--php_krw {
  background: #ecfeff;
  color: #155e75;
}

.exchange-category-badge--fx_php {
  background: #fef9c3;
  color: #854d0e;
}

.exchange-category-badge--info {
  background: #f1f5f9;
  color: #334155;
}

.exchange-hidden-badge {
  background: #fee2e2;
  color: #b91c1c;
}

.exchange-chat-active {
  background: #f3e8ff;
  color: #7e22ce;
  font-weight: 800;
  white-space: nowrap;
}

.exchange-status-notice {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
}

.exchange-status-notice--reserved {
  background: #fff7ed;
  color: #9a3412;
}

/* 목록 행 */
.exchange-row__status {
  display: flex;
  align-items: flex-start;
  padding-top: 0.1rem;
}

.exchange-row__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.85rem;
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.exchange-row__terms em {
  font-style: normal;
  font-weight: 700;
  color: #94a3b8;
}

#bo_list .exchange-row--done .community-post__title,
#bo_list .exchange-row--expired .community-post__title {
  color: #94a3b8;
}

#bo_list .exchange-row--done .community-post__title {
  text-decoration: line-through;
}

#bo_list .exchange-row--done .exchange-row__terms,
#bo_list .exchange-row--expired .exchange-row__terms,
#bo_list .exchange-row--done .community-post__excerpt,
#bo_list .exchange-row--expired .community-post__excerpt {
  opacity: 0.6;
}

#bo_list .exchange-row--hidden {
  background: #fef2f2;
}

.exchange-admin-actions {
  margin: 0.75rem 0;
  text-align: right;
}

/* 상세 */
.exchange-hidden-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

.exchange-comment-privacy {
  margin: 0 0 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.86rem;
  line-height: 1.5;
}

.board-wrap--eottae-exchange .market-view__content#bo_v_con {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
  word-break: break-word;
}

.exchange-view__photo img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0 0;
  border-radius: 12px;
}

.exchange-view__comments {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
}

.exchange-view__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.exchange-view__message {
  flex: 1 1 100%;
}

#bo_list .exchange-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1rem 0.75rem;
}

#bo_list .exchange-row__active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: #7c3aed;
  line-height: 1.3;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

#bo_list .exchange-row__active--closed {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

#bo_list .exchange-row__active--closed s,
.exchange-chat-active--closed s {
  text-decoration-thickness: 2px;
}

.exchange-chat-active--closed {
  background: #f1f5f9;
  color: #64748b;
}

#bo_list .exchange-row__active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fde047;
  animation: exchange-active-pulse 1.6s ease-in-out infinite;
}

@keyframes exchange-active-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  #bo_list .exchange-row__active-dot {
    animation: none;
  }
}

#bo_list .exchange-row__chat {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

#bo_list .exchange-row__actions .exchange-row__chat {
  margin: 0;
  line-height: 1.3;
}

#bo_list .exchange-row__chat:hover {
  background: #ccfbf1;
}

#exchange-chat {
  scroll-margin-top: 90px;
}

/* 1:1 채팅 */
.exchange-chat {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.exchange-chat [hidden] {
  display: none !important;
}

.exchange-chat__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #0f766e;
  color: #fff;
}

.exchange-chat__title {
  flex: 1;
  font-size: 0.95rem;
}

.exchange-chat__back {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
}

.exchange-chat__badge {
  min-width: 1.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  font-style: normal;
  text-align: center;
}

.exchange-chat__threads {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
}

.exchange-chat__thread {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.exchange-chat__thread:hover {
  background: #f0fdfa;
}

.exchange-chat__thread strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.exchange-chat__thread em {
  font-size: 0.75rem;
  font-style: normal;
  color: #94a3b8;
}

.exchange-chat__thread span {
  font-size: 0.85rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exchange-chat__room {
  display: flex;
  flex-direction: column;
}

.exchange-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 320px;
  margin: 0;
  padding: 0.75rem;
  list-style: none;
  overflow-y: auto;
  background: #f8fafc;
}

.exchange-chat__empty {
  margin: auto 0;
  padding: 1rem;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  list-style: none;
}

.exchange-chat__msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
}

.exchange-chat__msg.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.exchange-chat__msg.is-pending {
  opacity: 0.6;
}

.exchange-chat__who {
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  color: #64748b;
}

.exchange-chat__bubble {
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.exchange-chat__msg.is-mine .exchange-chat__bubble {
  border-color: #0f766e;
  border-radius: 14px 14px 4px 14px;
  background: #0f766e;
  color: #fff;
}

.exchange-chat__time {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: #94a3b8;
}

.exchange-chat__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem;
  border-top: 1px solid #e2e8f0;
}

.exchange-chat__form textarea {
  flex: 1;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  resize: none;
}

.exchange-chat__form button {
  padding: 0 1rem;
  border: 0;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.exchange-chat__form button:disabled {
  opacity: 0.6;
}

.exchange-chat__foot {
  margin: 0;
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.exchange-chat__foot a {
  color: #0f766e;
  font-weight: 700;
}

/* 글쓰기 */
.exchange-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exchange-choice__item {
  position: relative;
  margin: 0;
}

.exchange-choice__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.exchange-choice__item span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.exchange-choice__item input:checked + span {
  border-color: #1e3a8a;
  background: #1e3a8a;
  color: #fff;
}

.exchange-choice__item input:focus-visible + span {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .board-wrap--eottae-exchange .market-view__aside {
    order: -1;
  }
}

@media (max-width: 640px) {
  .exchange-search {
    flex-wrap: wrap;
  }

  .exchange-search__field {
    flex: 1 1 100%;
  }

  .exchange-status-badge--list {
    min-width: 54px;
    padding: 3px 7px;
    font-size: 0.68rem;
  }
}
