/**
 * [프로필 문의]
 * - 역할: 쪽지 모달 — DS 토큰 기반 플랫폼형 레이아웃
 * - 작성/수정일: 2026-08-16
 */
html.an-memo-modal-open,
html.an-memo-modal-open body {
  overflow: hidden;
}

.an-memo-modal {
  animation: an-memo-overlay-in 0.22s ease-out;
}

.an-memo-modal__dialog {
  max-width: 480px;
  padding: 0;
  overflow: hidden;
  animation: an-memo-dialog-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.an-memo-modal .an-modal__head {
  margin: 0;
  padding: 22px 24px 0;
}

.an-memo-modal .an-modal__title {
  font-size: var(--fs-h6, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.an-memo-modal .an-modal__close {
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  border-radius: var(--radius-full, 50%);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition:
    color var(--duration-base, 0.2s),
    background-color 0.18s ease;
}

.an-memo-modal .an-modal__close:hover {
  color: var(--title-color, #171717);
  background: var(--chip-color, #f2f2f2);
}

.an-memo-modal__form {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.an-memo-modal__body {
  padding: 18px 24px 8px;
}

.an-memo-modal__to {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  font-size: var(--fs-caption, 12px);
  font-weight: 500;
  color: var(--muted-color, #7c7c7c);
  letter-spacing: 0.01em;
}

.an-memo-modal__to-name {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: var(--radius-pill, 999px);
  background: var(--chip-color, #f2f2f2);
  color: var(--title-color, #171717);
  font-size: var(--fs-label, 14px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-memo-modal__field {
  margin: 0;
}

.an-memo-modal__label {
  display: block;
  margin: 0 0 8px;
  font-size: var(--fs-caption, 12px);
  font-weight: 600;
  color: var(--text-color, #595959);
  letter-spacing: 0.01em;
}

.an-memo-modal__textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  border: 1px solid var(--border-color, #eeeeee);
  border-radius: var(--radius-md, 6px);
  background: var(--section-bg-color, #f9f9f9);
  color: var(--title-color, #171717);
  font: inherit;
  font-size: var(--fs-body-s, 15px);
  line-height: 1.6;
  resize: vertical;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.an-memo-modal__textarea::placeholder {
  color: var(--muted-color, #7c7c7c);
  opacity: 0.85;
}

.an-memo-modal__textarea:hover {
  border-color: var(--divider-color, #d9d9d9);
  background: var(--surface-color, #fff);
}

.an-memo-modal__textarea:focus {
  outline: none;
  border-color: var(--primary-color, #171717);
  background: var(--surface-color, #fff);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-opc, 23, 23, 23), 0.08);
}

.an-memo-modal__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
}

.an-memo-modal__hint {
  margin: 0;
  flex: 1 1 auto;
  font-size: var(--fs-caption, 12px);
  color: var(--muted-color, #7c7c7c);
  line-height: 1.5;
  word-break: keep-all;
}

.an-memo-modal__count {
  flex: 0 0 auto;
  font-size: var(--fs-xs, 11px);
  font-variant-numeric: tabular-nums;
  color: var(--muted-color, #7c7c7c);
  line-height: 1.5;
}

.an-memo-modal .an-modal__actions {
  margin: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-color, #eeeeee);
  background: var(--section-bg-color, #f9f9f9);
}

.an-memo-modal .an-modal__actions .primary-btn1,
.an-memo-modal .an-modal__actions .secondary-btn {
  min-width: 96px;
  justify-content: center;
}

.an-memo-modal .an-modal__actions .primary-btn1:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@keyframes an-memo-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes an-memo-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .an-memo-modal,
  .an-memo-modal__dialog {
    animation: none;
  }
}

html.dark .an-memo-modal__dialog,
body.dark .an-memo-modal__dialog {
  background: var(--white-color, #1a1a1a);
}

html.dark .an-memo-modal .an-modal__close:hover,
body.dark .an-memo-modal .an-modal__close:hover {
  background: var(--chip-color, #2e2e2e);
}

html.dark .an-memo-modal__to-name,
body.dark .an-memo-modal__to-name {
  background: var(--chip-color, #2e2e2e);
  color: var(--title-color, #fff);
}

html.dark .an-memo-modal__textarea,
body.dark .an-memo-modal__textarea {
  background: var(--bg-soft, #2a2a2a);
  border-color: var(--border-color, #4a4a4a);
  color: var(--title-color, #fff);
}

html.dark .an-memo-modal__textarea:hover,
html.dark .an-memo-modal__textarea:focus,
body.dark .an-memo-modal__textarea:hover,
body.dark .an-memo-modal__textarea:focus {
  background: var(--surface-color, #171717);
  border-color: var(--divider-color, #5a5a5a);
}

html.dark .an-memo-modal__textarea:focus,
body.dark .an-memo-modal__textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

html.dark .an-memo-modal .an-modal__actions,
body.dark .an-memo-modal .an-modal__actions {
  background: var(--bg-soft, #2a2a2a);
  border-top-color: var(--border-color, #4a4a4a);
}

@media (max-width: 575.98px) {
  .an-memo-modal__dialog {
    max-width: 100%;
  }

  .an-memo-modal .an-modal__head,
  .an-memo-modal__body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .an-memo-modal .an-modal__actions {
    padding: 14px 18px 18px;
  }

  .an-memo-modal__meta {
    flex-direction: column;
    gap: 6px;
  }

  .an-memo-modal__count {
    align-self: flex-end;
  }
}
