/* ==========================================================================
   Sewer24 Live Consultation Toast
   - 좌측 하단, 스티키바 위쪽에 슬라이드-인 알림
   - 소셜 프루프(라이브 상담 접수 현황)
   ========================================================================== */

.dd-live-toast {
    position: fixed;
    left: 16px;
    bottom: calc(var(--dd-sb-h-top, 40px) + var(--dd-sb-h-bottom, 64px) + 20px + env(safe-area-inset-bottom, 0px));
    z-index: 9991;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    color: #1f2937;
    border-radius: 14px;
    box-shadow:
        0 18px 40px -10px rgba(15, 23, 42, 0.28),
        0 4px 12px -2px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "맑은 고딕", sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    pointer-events: auto;
    opacity: 0;
    transform: translate3d(-24px, 8px, 0) scale(0.96);
    transition:
        opacity 360ms cubic-bezier(.22,.94,.34,1),
        transform 420ms cubic-bezier(.22,.94,.34,1);
    will-change: transform, opacity;
    overflow: hidden;
    display: none;
}

.dd-live-toast.is-visible {
    display: block;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.dd-live-toast.is-leaving {
    opacity: 0;
    transform: translate3d(-12px, 0, 0) scale(0.98);
}

/* 좌측 핑크 액센트 바 */
.dd-live-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff4d8d 0%, #e91e63 100%);
}

.dd-live-toast__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 38px 6px 16px;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.dd-live-toast__live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #e91e63;
    text-transform: uppercase;
}

.dd-live-toast__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff2d6f;
    box-shadow: 0 0 0 0 rgba(255, 45, 111, 0.7);
    animation: ddLiveToastPulse 1.6s ease-in-out infinite;
}

@keyframes ddLiveToastPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 45, 111, 0.65); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 45, 111, 0);  }
    100% { box-shadow: 0 0 0 0 rgba(255, 45, 111, 0);     }
}

.dd-live-toast__label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: -0.2px;
}

.dd-live-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms ease, color 160ms ease;
}
.dd-live-toast__close:hover,
.dd-live-toast__close:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #374151;
    outline: none;
}

.dd-live-toast__body {
    padding: 10px 16px 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.dd-live-toast__avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe2ed 0%, #ffc6d8 100%);
    color: #c2185b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.5px;
    box-shadow: inset 0 0 0 1px rgba(194, 24, 91, 0.12);
}

.dd-live-toast__text {
    flex: 1 1 auto;
    min-width: 0;
}

.dd-live-toast__msg {
    margin: 0 0 4px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.3px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.dd-live-toast__msg b {
    color: #c2185b;
    font-weight: 800;
}

.dd-live-toast__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #6b7280;
}

.dd-live-toast__time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dd-live-toast__time::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
}

.dd-live-toast__status {
    color: #10b981;
    font-weight: 700;
}

.dd-live-toast__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 16px 12px 16px;
    background: linear-gradient(180deg, rgba(255, 234, 243, 0) 0%, rgba(255, 234, 243, 0.55) 100%);
}

.dd-live-toast__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1 1 auto;
    background: linear-gradient(180deg, #ff4d8d 0%, #e91e63 100%);
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.2px;
    cursor: pointer;
    box-shadow: 0 4px 10px -2px rgba(233, 30, 99, 0.45);
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    text-decoration: none;
}

.dd-live-toast__cta-btn:hover,
.dd-live-toast__cta-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(233, 30, 99, 0.5);
    filter: brightness(1.04);
    outline: none;
    color: #fff;
    text-decoration: none;
}

.dd-live-toast__cta-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.dd-live-toast__waiting {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.dd-live-toast__waiting b {
    color: #e91e63;
    font-weight: 800;
}

/* ==========================================================================
   모바일
   ========================================================================== */
@media (max-width: 640px) {
    .dd-live-toast {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        bottom: calc(var(--dd-sb-h-top, 40px) + var(--dd-sb-h-bottom, 56px) + 14px + env(safe-area-inset-bottom, 0px));
        border-radius: 12px;
        font-size: 13px;
    }
    .dd-live-toast__head { padding: 10px 36px 6px 14px; }
    .dd-live-toast__body { padding: 9px 14px 11px 14px; gap: 10px; }
    .dd-live-toast__avatar { width: 34px; height: 34px; font-size: 13px; }
    .dd-live-toast__msg { font-size: 13px; }
    .dd-live-toast__cta { padding: 8px 14px 11px 14px; }
    .dd-live-toast__cta-btn { padding: 9px 10px; font-size: 12.5px; }
}

/* 사용자 선호: 모션 감소 */
@media (prefers-reduced-motion: reduce) {
    .dd-live-toast {
        transition: opacity 200ms linear;
        transform: none;
    }
    .dd-live-toast.is-leaving,
    .dd-live-toast:not(.is-visible) {
        transform: none;
    }
    .dd-live-toast__dot { animation: none; }
}
