/*
 * 좌측하단 코너 토스트 (재사용 모듈) — corner_toast_controller.js
 * bottom-anchored 컨테이너 → 신규 토스트는 append(아래/코너쪽), 기존은 위로 밀려 적층.
 * 데스크톱 전용 (모바일은 소식함으로 대체).
 */
#corner-toast-root {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 11000;            /* 모달/태스크바 위로 항상 노출 */
  display: flex;
  flex-direction: column;    /* 마지막(최신) 자식이 맨 아래(코너) */
  gap: 8px;
  max-width: 320px;
  pointer-events: none;      /* 컨테이너 자체는 클릭 통과, 아이템만 클릭 */
}

.corner-toast-item {
  pointer-events: auto;
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #3e6187;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  padding: 12px 30px 12px 14px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.corner-toast-item.corner-toast-show {
  opacity: 1;
  transform: translateX(0);
}
.corner-toast-item:hover {
  border-color: #cbd5e1;
  border-left-color: #2f4d6e;
}

.corner-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}
.corner-toast-body {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}
.corner-toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  line-height: 1;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 17px;
  cursor: pointer;
  border-radius: 4px;
}
.corner-toast-close:hover { background: #f1f5f9; color: #475569; }

/* 모바일: 코너 토스트 미노출 (소식함으로 대체) */
@media (max-width: 768px) {
  #corner-toast-root { display: none !important; }
}

/* 다크 모드 */
html.dark .corner-toast-item {
  background: #1e293b;
  border-color: #334155;
  border-left-color: #60a5fa;
}
html.dark .corner-toast-title { color: #f1f5f9; }
html.dark .corner-toast-body { color: #cbd5e1; }
html.dark .corner-toast-close:hover { background: #334155; color: #e2e8f0; }
