/* 플로팅 문의 위젯 — 지서림 소개 등에서 사용 */

.inquiry-chat-root {
  position: fixed;
  z-index: 9998;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--font, "Noto Sans KR", sans-serif);
  pointer-events: none;
}

.inquiry-chat-root * {
  pointer-events: auto;
}

.inquiry-chat-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@keyframes inquiry-chat-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.inquiry-chat-tooltip {
  max-width: min(320px, calc(100vw - 48px));
  background: #fff;
  border-radius: 16px;
  padding: 16px 40px 14px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  animation: inquiry-chat-pop 0.35s ease-out;
}

.inquiry-chat-tooltip[hidden] {
  display: none !important;
}

.inquiry-chat-tooltip__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #f0f2f4;
  color: #78909c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

.inquiry-chat-tooltip__close:hover {
  background: #e4e8ec;
  color: #546e7a;
}

.inquiry-chat-tooltip__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
}

.inquiry-chat-tooltip__sub {
  margin: 0;
  font-size: 0.8rem;
  color: #78909c;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.45;
}

.inquiry-chat-tooltip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43a047;
  flex-shrink: 0;
}

.inquiry-chat-launcher {
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(145deg, #f5a09a 0%, #e8787a 100%);
  box-shadow: 0 6px 20px rgba(232, 120, 122, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inquiry-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(232, 120, 122, 0.5);
}

.inquiry-chat-launcher[aria-expanded="true"] {
  background: linear-gradient(145deg, #8b6b6f 0%, #6b4548 100%);
  box-shadow: 0 4px 16px rgba(80, 50, 52, 0.35);
}

.inquiry-chat-launcher svg {
  display: block;
}

.inquiry-chat-panel {
  position: fixed;
  z-index: 9999;
  bottom: 20px;
  right: 20px;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 40px));
  background: #f0f2f5;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.inquiry-chat-panel[hidden] {
  display: none !important;
}

.inquiry-chat-panel__head {
  background: #fff;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e8eaed;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.inquiry-chat-panel__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a6b 0%, #ff6b35 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inquiry-chat-panel__avatar-letter {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
}

.inquiry-chat-panel__head-text {
  flex: 1;
  min-width: 0;
}

.inquiry-chat-panel__brand {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
}

.inquiry-chat-panel__status {
  margin: 0;
  font-size: 0.78rem;
  color: #5c6b73;
  display: flex;
  align-items: center;
  gap: 5px;
}

.inquiry-chat-panel__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #90a4ae;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.inquiry-chat-panel__close:hover {
  background: #f5f5f5;
  color: #546e7a;
}

.inquiry-chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  min-height: 200px;
}

.inquiry-chat-panel__view[hidden] {
  display: none !important;
}

.inquiry-chat-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.inquiry-chat-card__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.inquiry-chat-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff3e0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inquiry-chat-card__msg {
  margin: 0;
  font-size: 0.88rem;
  color: #37474f;
  line-height: 1.55;
}

.inquiry-chat-card__cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #f5a09a 0%, #e85d6a 100%);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232, 93, 106, 0.35);
}

.inquiry-chat-card__cta:hover {
  filter: brightness(1.03);
}

.inquiry-chat-card__note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: #78909c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.inquiry-chat-panel__footnote {
  text-align: center;
  font-size: 0.72rem;
  color: #90a4ae;
  padding: 6px 12px 4px;
}

.inquiry-chat-panel__nav {
  display: flex;
  background: #fff;
  border-top: 1px solid #e8eaed;
  padding: 6px 4px 10px;
  gap: 4px;
}

.inquiry-chat-panel__nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: #90a4ae;
  cursor: pointer;
}

.inquiry-chat-panel__nav-btn[aria-current="page"] {
  color: #e85d6a;
}

.inquiry-chat-panel__nav-btn svg {
  width: 22px;
  height: 22px;
}

.inquiry-chat-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #37474f;
  margin-bottom: 8px;
}

.inquiry-chat-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  margin-bottom: 12px;
}

.inquiry-chat-form textarea:focus {
  outline: none;
  border-color: #e85d6a;
  box-shadow: 0 0 0 3px rgba(232, 93, 106, 0.15);
}

.inquiry-chat-form__send {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-point, linear-gradient(to bottom, #597184 0%, #4a657a 50%, #3b586e 100%));
  cursor: pointer;
}

.inquiry-chat-form__send:hover {
  opacity: 0.94;
}

.inquiry-chat-settings p {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #546e7a;
  line-height: 1.5;
}

.inquiry-chat-settings button {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border, #e2e8ec);
  background: #fff;
  cursor: pointer;
  color: var(--color-text, #1a2b33);
}

.inquiry-chat-settings button:hover {
  background: #f8fafb;
}

@media (max-width: 480px) {
  .inquiry-chat-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
  }

  .inquiry-chat-root {
    bottom: 16px;
    right: 16px;
  }
}
