/**
 * Activation carrier and the compact async-job status card.
 *
 * @package LLActivator User Management
 */

/* Compact status card (FaceMatch and other hide-close waits) */
.llac-async-toast,
.llac-async-toast * {
    box-sizing: border-box;
}

.llac-async-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    min-width: 260px;
    max-width: 340px;
    padding: var(--llac-spacing-4);
    background:
        radial-gradient(ellipse at 12% 0%, rgba(27, 127, 150, 0.16), transparent 64%),
        linear-gradient(180deg, #F0FBFF 0%, #fff 72%);
    border-radius: var(--llac-radius-md);
    box-shadow: var(--llac-shadow-xl);
    border-left: 4px solid var(--llac-primary, #1b7f96);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.llac-async-toast.llac-async-toast-hide {
    animation: slideOut 0.3s ease;
}

.llac-async-toast.done {
    border-left-color: var(--llac-success);
    background: var(--llac-white);
}

.llac-async-toast.error {
    border-left-color: var(--llac-danger);
    background: var(--llac-white);
}

.llac-async-toast-row {
    display: flex;
    align-items: center;
    gap: var(--llac-spacing-2);
}

.llac-async-toast-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(90deg, #0e4d58, #1b7f96 35%, #5ed4ea 50%, #1b7f96 65%, #0e4d58);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: llac-async-toast-shimmer 2.8s ease-in-out infinite;
}

.llac-async-toast.done .llac-async-toast-text,
.llac-async-toast.error .llac-async-toast-text {
    animation: none;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--llac-gray-800);
    font-weight: 600;
}

.llac-async-toast-timer {
    margin-top: 6px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--llac-gray-500);
}

.llac-async-toast-note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--llac-gray-600);
}

.llac-async-toast-spinner {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.llac-async-toast-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(27, 127, 150, 0.38);
    animation: llac-async-toast-ring 2.4s ease-out infinite;
}

.llac-async-toast-ring:nth-child(2) {
    animation-delay: 0.85s;
}

.llac-async-toast-core {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #9ee3f0, #1b7f96 58%, #0e4d58);
    box-shadow: 0 0 10px rgba(27, 127, 150, 0.55), 0 0 18px rgba(78, 195, 217, 0.35);
    animation: llac-async-toast-core 1.8s ease-in-out infinite;
}

@keyframes llac-async-toast-ring {
    0% {
        transform: scale(0.52);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.28);
        opacity: 0;
    }
}

@keyframes llac-async-toast-core {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.14);
        filter: brightness(1.28);
    }
}

@keyframes llac-async-toast-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.llac-async-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--llac-gray-800);
    padding: 0 0 0 var(--llac-spacing-2);
}

.llac-async-toast-link {
    display: inline-block;
    margin-top: var(--llac-spacing-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--llac-info);
    text-decoration: none;
}

.llac-async-toast-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .llac-async-toast {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        min-width: 0;
        max-width: none;
    }
}

/* Activation carrier — full screen */
.llac-async-toast.llac-activation-carrier {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    min-width: 0;
    margin: 0;
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    color: #e2e8f0;
    background: #0f172a;
    border: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.llac-activation-carrier .llac-ac-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.llac-activation-carrier .llac-ac-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22d3ee;
    flex-shrink: 0;
    animation: llac-ac-pulse 1.6s ease-in-out infinite;
}

.llac-activation-carrier .llac-ac-title {
    flex: 1;
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e2e8f0;
}

.llac-activation-carrier .llac-async-toast-timer {
    flex-shrink: 0;
    margin-top: 0;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: #f8fafc;
}

.llac-activation-carrier .llac-async-toast-close {
    color: #f8fafc;
    padding: 0;
    width: 44px;
    height: 44px;
    font-size: 32px;
}

.llac-activation-carrier .llac-ac-notice {
    position: absolute;
    z-index: 40;
    top: 68px;
    right: 12px;
    width: min(340px, calc(100% - 24px));
    margin: 0;
    padding: 12px 36px 12px 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.llac-ac-notice.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.llac-ac-notice-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px;
}

.llac-ac-notice-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
}

.llac-ac-notice-count {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

.llac-ac-notice-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.llac-ac-notice-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.llac-activation-carrier .llac-ac-stage {
    position: relative;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.llac-activation-carrier .llac-ac-diagnostic {
    position: absolute;
    z-index: 30;
    left: 8px;
    right: 8px;
    top: 28px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    overflow: auto;
    color: #fff7ed;
    background: rgba(69, 10, 10, 0.94);
    border: 1px solid rgba(251, 191, 36, 0.8);
    border-radius: 10px;
}

.llac-activation-carrier .llac-ac-diagnostic[hidden] {
    display: none !important;
}

.llac-activation-carrier .llac-ac-diagnostic-kicker,
.llac-activation-carrier .llac-ac-diagnostic-code,
.llac-activation-carrier .llac-ac-diagnostic-msg {
    margin: 0;
}

.llac-activation-carrier .llac-ac-diagnostic-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
}

.llac-activation-carrier .llac-ac-diagnostic-code {
    font-size: 11px;
    font-weight: 700;
    color: #fecaca;
}

.llac-activation-carrier .llac-ac-diagnostic-msg {
    font-size: 11px;
    line-height: 1.35;
}

.llac-activation-carrier .llac-ac-diagnostic-dismiss {
    align-self: flex-start;
    margin-top: 4px;
    padding: 4px 10px;
    border: 0;
    border-radius: 8px;
    background: #b45309;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.llac-activation-carrier .llac-ac-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.llac-activation-carrier .llac-ac-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 10%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px 12px;
    overflow: hidden;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(15, 23, 42, 0.72));
}

.llac-activation-carrier .llac-ac-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(30, 41, 59, 0.9);
}

.llac-activation-carrier .llac-ac-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #22d3ee, #fcd34d, #2dd4bf);
}

.llac-activation-carrier .llac-ac-phase {
    margin: 0;
    max-width: 100%;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.llac-activation-carrier .llac-ac-phase[hidden] {
    display: none;
}

.llac-activation-carrier .llac-ac-inhale {
    color: #a5f3fc;
    animation: llac-ac-inhale 3s ease-in-out infinite;
}

.llac-activation-carrier .llac-ac-exhale {
    color: #99f6e4;
    animation: llac-ac-exhale 3s ease-in-out infinite;
}

.llac-activation-carrier .llac-ac-retain {
    color: #fde68a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: normal;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.llac-activation-carrier .llac-ac-still {
    color: #c7d2fe;
    letter-spacing: 0.16em;
}

.llac-activation-carrier .llac-ac-sliders {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 36px 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.95);
}

.llac-activation-carrier .llac-ac-sliders[hidden],
.llac-activation-carrier .llac-ac-open-sliders[hidden] {
    display: none !important;
}

.llac-activation-carrier .llac-ac-sliders-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.llac-activation-carrier .llac-ac-open-sliders {
    align-self: flex-end;
    margin-top: 10px;
    padding: 8px 14px;
    border: 1px solid #818cf8;
    border-radius: 999px;
    background: #0f172a;
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.llac-activation-carrier .llac-ac-open-sliders.is-attention {
    animation: llac-ac-slider-blink 1s ease-in-out infinite;
}

.llac-activation-carrier .llac-ac-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.llac-activation-carrier .llac-ac-k {
    width: 48px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
}

.llac-activation-carrier .llac-ac-k-in { color: #67e8f9; }
.llac-activation-carrier .llac-ac-k-hold { color: #fcd34d; }
.llac-activation-carrier .llac-ac-k-out { color: #5eead4; }

.llac-activation-carrier .llac-ac-slider input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #818cf8;
    margin: 0;
}

.llac-activation-carrier .llac-ac-v {
    width: 36px;
    flex-shrink: 0;
    text-align: right;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: #cbd5e1;
}

.llac-activation-carrier .llac-async-toast-text {
    display: block;
    margin-top: 8px;
    animation: none;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

.llac-activation-carrier .llac-async-toast-note {
    color: #cbd5e1;
}

.llac-activation-carrier .llac-ac-banner {
    margin: 8px 0 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: #c7d2fe;
}

.llac-activation-carrier.done,
.llac-activation-carrier.error {
    background: #0f172a;
    border-left-color: rgba(129, 140, 248, 0.35);
}

.llac-activation-carrier.done {
    border-color: rgba(16, 185, 129, 0.7);
}

.llac-activation-carrier.error {
    border-color: rgba(239, 68, 68, 0.75);
}

.llac-activation-carrier.done .llac-async-toast-text,
.llac-activation-carrier.error .llac-async-toast-text {
    color: #f8fafc;
}

.llac-activation-carrier .llac-async-toast-link {
    color: #7dd3fc;
}

@media (max-width: 768px) {
    .llac-async-toast.llac-activation-carrier {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        padding: 12px 12px max(16px, env(safe-area-inset-bottom, 0px));
    }
}

@keyframes llac-ac-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

@keyframes llac-ac-inhale {
    0%, 100% { letter-spacing: 0.16em; opacity: 0.85; }
    50% { letter-spacing: 0.26em; opacity: 1; }
}

@keyframes llac-ac-exhale {
    0%, 100% { letter-spacing: 0.26em; opacity: 1; }
    50% { letter-spacing: 0.16em; opacity: 0.85; }
}

@keyframes llac-ac-slider-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0); }
    50% { box-shadow: 0 0 0 6px rgba(129, 140, 248, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .llac-async-toast-ring,
    .llac-async-toast-core,
    .llac-async-toast-text,
    .llac-activation-carrier .llac-ac-dot,
    .llac-activation-carrier .llac-ac-inhale,
    .llac-activation-carrier .llac-ac-exhale,
    .llac-activation-carrier .llac-ac-open-sliders.is-attention {
        animation: none;
    }

    .llac-ac-notice {
        transition: none;
    }

    .llac-async-toast-text {
        color: var(--llac-primary, #1b7f96);
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
    }

    .llac-activation-carrier .llac-async-toast-text {
        color: #e2e8f0;
    }
}
