/**
 * 동네보험 — 인라인 편집 박스 (Phase 2.B Step 4-3)
 * 작성자 본인이 콘텐츠를 수정할 때 노출되는 인라인 폼 + 토스트
 */

/* ══════════════════════════════════════
   [수정] 버튼 — 콘텐츠별 스타일
   ══════════════════════════════════════ */

/* Q&A 본 글 — 삭제 버튼과 같은 톤(아웃라인) + 인디고 */
.qna-post__edit-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #3730A3;
  background: none;
  border: 1px solid #C7CCEA;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Noto Sans KR', sans-serif;
}
.qna-post__edit-btn:hover {
  background: rgba(55, 48, 163, .06);
}

/* Q&A 답변 — 삭제(텍스트 버튼)와 같은 톤 */
.qna-answer__edit {
  background: none;
  border: none;
  color: #5b5e68;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.qna-answer__edit:hover {
  color: #3730A3;
  background: rgba(55, 48, 163, .06);
}

/* 답변 footer — [수정][삭제] 두 액션 동시 노출 정렬 보정 */
.qna-answer__footer {
  gap: 6px;
  justify-content: flex-end;
}
.qna-answer__footer .qna-answer__date {
  margin-right: auto;
}

/* Q&A 댓글 — [답글][삭제]와 동일 패턴 (qna.css 1376~1397 참조) */
.qna-comment__edit-btn {
  padding: 4px 0;
  font-size: 11px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-tertiary, #999);
}
.qna-comment__edit-btn:hover {
  color: #3730A3;
}

/* 1:1 본 글 — actions 행에 사용 */
.consult-card__edit-btn {
  background: none;
  border: 1px solid #C7CCEA;
  color: #3730A3;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.consult-card__edit-btn:hover {
  background: rgba(55, 48, 163, .06);
}

/* 1:1 답변 */
.consult-reply__edit {
  background: none;
  border: none;
  color: #5b5e68;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.consult-reply__edit:hover {
  color: #3730A3;
  background: rgba(55, 48, 163, .06);
}



/* ── 인라인 편집 박스 ── */
.ie-box {
  margin-top: 12px;
  padding: 14px;
  background: #fafbff;
  border: 1px solid #3730A3;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(55, 48, 163, .05);
}
.ie-box__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.ie-box__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #3730A3;
  background: rgba(55, 48, 163, .1);
  padding: 3px 8px;
  border-radius: 99px;
}
.ie-box__badge svg {
  flex-shrink: 0;
}
.ie-box__hint {
  font-size: 11px;
  color: #9094a0;
  margin-left: auto;
}
.ie-box__textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid #e6e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  background: #fff;
  color: #1f2024;
  font-family: 'Noto Sans KR', sans-serif;
}
.ie-box__textarea:focus {
  border-color: #3730A3;
  box-shadow: 0 0 0 3px rgba(55, 48, 163, .08);
}
.ie-box__counter {
  font-size: 11px;
  color: #9094a0;
  text-align: right;
  margin-top: 4px;
}
.ie-box__counter--over {
  color: #c0392b;
  font-weight: 600;
}
.ie-box__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.ie-box__btn {
  font: inherit;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 500;
  font-family: 'Noto Sans KR', sans-serif;
}
.ie-box__btn--ghost {
  background: #fff;
  border-color: #d0d3da;
  color: #5b5e68;
}
.ie-box__btn--ghost:hover {
  background: #f5f6fa;
}
.ie-box__btn--primary {
  background: #3730A3;
  color: #fff;
}
.ie-box__btn--primary:hover {
  background: #2d2585;
}
.ie-box__btn--primary:disabled {
  background: #d0d3da;
  cursor: not-allowed;
}

/* ── boip 박스는 textarea와 [저장] 사이에 자연스럽게 ── */
.ie-box .boip-box {
  margin-top: 8px;
  margin-bottom: 0;
}

/* ── 토스트 (수정 완료 알림) ── */
.ie-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2024;
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10000;
  font-family: 'Noto Sans KR', sans-serif;
  max-width: 92vw;
  text-align: center;
}
.ie-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ie-toast--revised {
  background: #3730A3;
}
.ie-toast--warning {
  background: #c9892a;
  max-width: min(560px, 92vw);
  text-align: left;
  line-height: 1.5;
}

/* 모바일 미세 조정 */
@media (max-width: 480px) {
  .ie-box {
    padding: 12px;
  }
  .ie-box__btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .ie-toast {
    bottom: 80px; /* 모바일 하단 네비 위 */
    font-size: 12.5px;
    padding: 10px 16px;
  }
}
