/* 프로젝트 문의 채팅 위젯 스타일 */
body.dnc-chat-open {
  overflow: hidden;
}

.dnc-chat {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
  visibility: hidden;
  z-index: 10000;
  font-family: "Pretendard", "Noto Sans KR", Arial, sans-serif;
}

.dnc-chat.is-open {
  pointer-events: auto;
  visibility: visible;
}

.dnc-chat__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.dnc-chat.is-open .dnc-chat__backdrop {
  opacity: 1;
}

.dnc-chat__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.dnc-chat.is-open .dnc-chat__panel {
  opacity: 1;
  transform: translateY(0);
}

.dnc-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.dnc-chat__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #ff4a17;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.dnc-chat__title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.dnc-chat__status {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.4;
}

.dnc-chat__status span {
  color: #ff4a17;
  font-size: 10px;
}

.dnc-chat__close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.dnc-chat__close:hover,
.dnc-chat__close:focus-visible {
  border-color: #ff4a17;
  color: #ff4a17;
  outline: none;
}

.dnc-chat__body {
  overflow-y: auto;
  padding: 22px;
  min-height: 184px;
}

.dnc-chat__day {
  width: fit-content;
  margin: 0 auto 18px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
}

.dnc-chat__message {
  display: flex;
  margin-bottom: 12px;
}

.dnc-chat__message--user {
  justify-content: flex-end;
}

.dnc-chat__message--bot {
  justify-content: flex-start;
}

.dnc-chat__bubble {
  width: fit-content;
  max-width: 86%;
  margin: 0;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: keep-all;
}

.dnc-chat__message--bot .dnc-chat__bubble {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border-top-left-radius: 4px;
}

.dnc-chat__message--user .dnc-chat__bubble {
  background: #ff4a17;
  color: #fff;
  border-top-right-radius: 4px;
}

.dnc-chat__bubble a {
  color: #ff8563;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dnc-chat__bubble a:hover,
.dnc-chat__bubble a:focus-visible {
  color: #fff;
  outline: none;
}

.dnc-chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 12px;
  padding: 13px 15px;
  border-radius: 14px;
  border-top-left-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.dnc-chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  animation: dnc-chat-typing 0.9s infinite ease-in-out;
}

.dnc-chat__typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.dnc-chat__typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes dnc-chat-typing {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.dnc-chat__footer {
  padding: 0 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dnc-chat__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
}

.dnc-chat__option {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dnc-chat__option:hover,
.dnc-chat__option:focus-visible {
  border-color: #ff4a17;
  color: #ff4a17;
  outline: none;
}

.dnc-chat__option--primary {
  border-color: #ff4a17;
  background: #ff4a17;
  color: #fff;
}

.dnc-chat__option--primary:hover,
.dnc-chat__option--primary:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #ff4a17;
}

.dnc-chat__option--muted {
  color: rgba(255, 255, 255, 0.52);
}

.dnc-chat__composer {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 8px;
  padding-top: 12px;
}

.dnc-chat__composer.is-hidden {
  display: none;
}

.dnc-chat__textarea {
  width: 100%;
  min-height: 46px;
  max-height: 126px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  resize: none;
}

.dnc-chat__textarea:focus {
  border-color: #ff4a17;
  outline: none;
}

.dnc-chat__composer-button {
  min-height: 46px;
  background: #ff4a17;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.dnc-chat__composer-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.dnc-chat__helper,
.dnc-chat__error {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.dnc-chat__helper {
  color: rgba(255, 255, 255, 0.48);
}

.dnc-chat__error {
  color: #ff8563;
}

.dnc-chat__summary {
  display: grid;
  gap: 8px;
}

.dnc-chat__summary-row {
  display: grid;
  gap: 3px;
}

.dnc-chat__summary-row b {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

@media (max-width: 767px) {
  .dnc-chat {
    align-items: flex-end;
    padding: 0;
  }

  .dnc-chat__panel {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .dnc-chat__header {
    padding: 20px 20px 16px;
  }

  .dnc-chat__body {
    padding: 20px;
  }

  .dnc-chat__footer {
    padding: 0 20px 20px;
  }
}
