/* 直播工单被接单：同店客服右下角确认小窗，不锁滚动、不抢焦点。
   挂在 body 上，避开内容区 transform 对 fixed 的干扰。
   必须排在 base-shell.css 之后，覆盖旧的居中遮罩规则。 */

.live-notice-root {
    position: fixed;
    inset: auto;
    right: 18px;
    bottom: 22px;
    z-index: 11000;
    display: block;
    width: min(360px, calc(100vw - 36px));
    padding: 0;
    pointer-events: none;
}

.live-notice-root[hidden] {
    display: none;
}

.live-notice-backdrop {
    display: none;
}

.live-notice-panel {
    position: relative;
    pointer-events: auto;
    width: auto;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    opacity: 0;
    transform: translateY(140%);
    transition: opacity 0.22s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.live-notice-panel::before {
    content: none;
}

.live-notice-root.is-open .live-notice-panel {
    opacity: 1;
    transform: none;
}

.live-notice-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 26px 8px 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.3;
}

.live-notice-title i {
    font-size: 0.8125rem;
}

.live-notice-code {
    margin: -4px 26px 8px 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-notice-customer {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.live-notice-device {
    margin: 4px 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.45;
    word-break: break-word;
}

.live-notice-cta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

.live-notice-cta i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.live-notice-meta {
    margin: 8px 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.4;
}

.live-notice-more {
    margin: 6px 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.live-notice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.live-notice-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.live-notice-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.live-notice-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.live-notice-btn-confirm {
    margin-right: auto;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    padding: 6px 12px;
}

.live-notice-btn-confirm:hover {
    background: #1e293b;
    color: #fff;
}

.live-notice-btn-confirm[disabled] {
    opacity: 0.6;
    cursor: default;
}

.live-notice-panel.is-confirmed {
    border-color: rgba(16, 185, 129, 0.28);
}

.live-notice-panel.is-confirmed .live-notice-cta {
    background: #ecfdf5;
    color: #047857;
}

.live-notice-panel.is-confirmed .live-notice-btn-confirm {
    background: #059669;
}

.live-notice-close {
    position: absolute;
    top: 10px;
    right: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.18s ease, background 0.18s ease;
}

.live-notice-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.live-notice-close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .live-notice-backdrop,
    .live-notice-panel {
        transition: none;
    }
}

@media (max-width: 576px) {
    .live-notice-root {
        right: 12px;
        left: 12px;
        bottom: 14px;
        width: auto;
        padding: 0;
    }

    .live-notice-panel {
        width: auto;
        padding: 14px 14px 12px;
    }

    .live-notice-customer {
        font-size: 1rem;
    }
}
