/**
 * Dial-by-menu / IVR call-tree bento animation.
 * Scoped to body.pl-landing-time only.
 */
/* Dial-by-menu — route callers, filter spam */
body.pl-landing-time .pl-time-ivr-stage {
    margin-top: auto;
    flex: 0 0 auto;
    height: 276px;
    min-height: 276px;
    max-height: 276px;
    padding: 12px 10px 0;
    display: flex;
    align-items: stretch;
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body.pl-landing-time .pl-ivr-anim {
    --ivr-cycle: 9.5s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.pl-landing-time .pl-ivr-anim__caller {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 14px;
    background: #111;
    color: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    animation: plIvrCallerIn var(--ivr-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__voice {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
}

body.pl-landing-time .pl-ivr-anim__voice-rings {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.pl-landing-time .pl-ivr-anim__voice-rings i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(59, 130, 246, 0.45);
    opacity: 0;
    animation: plIvrVoiceRing var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__voice-rings i:nth-child(2) {
    animation-delay: 0.22s;
}

body.pl-landing-time .pl-ivr-anim__voice-core {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35);
    animation: plIvrVoicePulse var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__voice-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 14px;
}

body.pl-landing-time .pl-ivr-anim__voice-bars i {
    display: block;
    width: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    animation: plIvrVoiceBar 0.72s ease-in-out infinite;
}

body.pl-landing-time .pl-ivr-anim__voice-bars i:nth-child(1) { height: 4px; animation-delay: 0s; }
body.pl-landing-time .pl-ivr-anim__voice-bars i:nth-child(2) { height: 8px; animation-delay: 0.08s; }
body.pl-landing-time .pl-ivr-anim__voice-bars i:nth-child(3) { height: 12px; animation-delay: 0.16s; }
body.pl-landing-time .pl-ivr-anim__voice-bars i:nth-child(4) { height: 7px; animation-delay: 0.24s; }
body.pl-landing-time .pl-ivr-anim__voice-bars i:nth-child(5) { height: 5px; animation-delay: 0.32s; }

body.pl-landing-time .pl-ivr-anim__caller-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

body.pl-landing-time .pl-ivr-anim__caller-kicker {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

body.pl-landing-time .pl-ivr-anim__caller-name {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.pl-landing-time .pl-ivr-anim__trunk {
    display: block;
    width: 2px;
    height: 14px;
    margin: 0 auto;
    border-radius: 2px;
    background: #d1d5db;
    transform-origin: top center;
    transform: scaleY(0);
    animation: plIvrTrunk var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__body {
    position: relative;
    flex: 1;
    min-height: 0;
    margin-top: 0;
}

body.pl-landing-time .pl-ivr-anim__menu {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 10px 8px;
    border-radius: 12px 12px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(8px);
    animation: plIvrMenuPhase var(--ivr-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__menu-kicker {
    display: block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

body.pl-landing-time .pl-ivr-anim__menu-title {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #111;
}

body.pl-landing-time .pl-ivr-anim__menu-prompt {
    margin: 5px 0 6px;
    font-size: 8px;
    line-height: 1.35;
    color: #6b7280;
}

body.pl-landing-time .pl-ivr-anim__options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.pl-landing-time .pl-ivr-anim__option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    font-size: 8px;
    font-weight: 500;
    color: #374151;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(-6px);
}

body.pl-landing-time .pl-ivr-anim__option--1 {
    animation:
        plIvrOptionDrop var(--ivr-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards,
        plIvrOptionPress var(--ivr-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__option--2 {
    animation: plIvrOptionDrop2 var(--ivr-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__option-key {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: #111;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

body.pl-landing-time .pl-ivr-anim__digit-press {
    position: absolute;
    right: 10px;
    bottom: 28px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #155eef;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(21, 94, 239, 0.35);
    opacity: 0;
    transform: scale(0.6) translateY(4px);
    animation: plIvrDigitPress var(--ivr-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__route {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    opacity: 0;
    transform: translateY(10px);
    animation: plIvrRoutePhase var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__hub {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 9px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

body.pl-landing-time .pl-ivr-anim__hub span {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

body.pl-landing-time .pl-ivr-anim__hub strong {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
}

body.pl-landing-time .pl-ivr-anim__branches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

body.pl-landing-time .pl-ivr-anim__branch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

body.pl-landing-time .pl-ivr-anim__pipe {
    display: block;
    flex: 1 1 auto;
    width: 2px;
    min-height: 14px;
    margin: 0 auto;
    border-radius: 2px;
    background: #d1d5db;
    transform-origin: top center;
    transform: scaleY(0);
    animation: plIvrPipe var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__pipe {
    animation-delay: 0.06s;
}

body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__pipe {
    animation-delay: 0.12s;
}

body.pl-landing-time .pl-ivr-anim__person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    width: 100%;
    padding: 8px 3px 9px;
    border-radius: 12px 12px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    text-align: center;
}

body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person {
    animation: plIvrPersonMiss var(--ivr-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person {
    animation: plIvrPersonMiss var(--ivr-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person {
    animation: plIvrPersonAnswer var(--ivr-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__person-av {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #111;
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-av {
    animation: plIvrAnswerAv var(--ivr-cycle) steps(1, end) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__person-av i {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.28);
    opacity: 0;
    animation: plIvrPersonRing var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-av i {
    animation: plIvrPersonRing var(--ivr-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__person-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

body.pl-landing-time .pl-ivr-anim__person-meta strong {
    font-size: 9px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
    line-height: 1.15;
}

body.pl-landing-time .pl-ivr-anim__person-meta em {
    font-style: normal;
    font-size: 7px;
    font-weight: 500;
    color: #9ca3af;
}

body.pl-landing-time .pl-ivr-anim__person-state {
    font-size: 0;
    min-height: 10px;
}

body.pl-landing-time .pl-ivr-anim__person-state::after {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.02em;
    content: "Waiting";
    color: #9ca3af;
}

body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person-state::after,
body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person-state::after {
    animation: plIvrStateMiss var(--ivr-cycle) steps(1, end) 1 forwards;
}

body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-state::after {
    animation: plIvrStateAnswer var(--ivr-cycle) steps(1, end) 1 forwards;
}

@keyframes plIvrVoiceBar {
    0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

@keyframes plIvrCallerIn {
    0%, 4% { opacity: 0; transform: translateY(-10px); }
    10%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plIvrVoiceRing {
    0%, 6% { opacity: 0; transform: scale(0.6); }
    12% { opacity: 0.7; transform: scale(0.85); }
    28%, 46% { opacity: 0; transform: scale(1.55); }
    100% { opacity: 0; transform: scale(1.55); }
}

@keyframes plIvrVoicePulse {
    0%, 6% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
    14%, 38% { box-shadow: 0 0 0 7px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes plIvrTrunk {
    0%, 10% { transform: scaleY(0); opacity: 0; }
    16%, 100% { transform: scaleY(1); opacity: 1; }
}

@keyframes plIvrMenuPhase {
    0%, 12% { opacity: 0; transform: translateY(8px); }
    18%, 44% { opacity: 1; transform: translateY(0); }
    50%, 100% { opacity: 0; transform: translateY(-6px); pointer-events: none; }
}

@keyframes plIvrOptionDrop {
    0%, 16% { opacity: 0; transform: translateY(-6px); }
    22%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plIvrOptionDrop2 {
    0%, 20% { opacity: 0; transform: translateY(-6px); }
    26%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plIvrOptionPress {
    0%, 32% {
        border-color: rgba(0, 0, 0, 0.08);
        background: #fafafa;
        box-shadow: none;
    }
    36%, 46% {
        border-color: rgba(21, 94, 239, 0.45);
        background: #eff6ff;
        box-shadow: 0 0 0 2px rgba(21, 94, 239, 0.1);
    }
    50%, 100% {
        border-color: rgba(0, 0, 0, 0.08);
        background: #fafafa;
        box-shadow: none;
    }
}

@keyframes plIvrDigitPress {
    0%, 34% { opacity: 0; transform: scale(0.6) translateY(4px); }
    38% { opacity: 1; transform: scale(1.08) translateY(0); }
    42%, 48% { opacity: 1; transform: scale(1) translateY(0); }
    52%, 100% { opacity: 0; transform: scale(0.85) translateY(-4px); }
}

@keyframes plIvrRoutePhase {
    0%, 46% { opacity: 0; transform: translateY(10px); }
    54%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plIvrPipe {
    0%, 52% { transform: scaleY(0); opacity: 0; }
    60%, 100% { transform: scaleY(1); opacity: 1; }
}

@keyframes plIvrPersonMiss {
    0%, 56% {
        border-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
        opacity: 1;
    }
    62%, 78% {
        border-color: rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05), 0 8px 16px rgba(0, 0, 0, 0.07);
        opacity: 1;
    }
    84%, 100% {
        border-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
        opacity: 0.55;
    }
}

@keyframes plIvrPersonAnswer {
    0%, 56% {
        border-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
        background: #fff;
    }
    62%, 78% {
        border-color: rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05), 0 8px 16px rgba(0, 0, 0, 0.07);
        background: #fff;
    }
    82%, 100% {
        border-color: #16a34a;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14), 0 10px 20px rgba(22, 163, 74, 0.16);
        background: #f0fdf4;
    }
}

@keyframes plIvrAnswerAv {
    0%, 80% { background: #111; color: #fff; }
    81%, 100% { background: #16a34a; color: #fff; }
}

@keyframes plIvrPersonRing {
    0%, 60% { opacity: 0; transform: scale(0.7); }
    66% { opacity: 0.65; transform: scale(0.9); }
    82% { opacity: 0; transform: scale(1.35); }
    100% { opacity: 0; transform: scale(1.35); }
}

@keyframes plIvrStateMiss {
    0%, 58% { content: "Waiting"; color: #9ca3af; }
    59%, 80% { content: "Ringing"; color: #111; }
    81%, 100% { content: "Missed"; color: #9ca3af; }
}

@keyframes plIvrStateAnswer {
    0%, 58% { content: "Waiting"; color: #9ca3af; }
    59%, 80% { content: "Ringing"; color: #111; }
    81%, 100% { content: "On call"; color: #16a34a; }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-landing-time .pl-ivr-anim__caller,
    body.pl-landing-time .pl-ivr-anim__voice-rings i,
    body.pl-landing-time .pl-ivr-anim__voice-core,
    body.pl-landing-time .pl-ivr-anim__voice-bars i,
    body.pl-landing-time .pl-ivr-anim__trunk,
    body.pl-landing-time .pl-ivr-anim__menu,
    body.pl-landing-time .pl-ivr-anim__option--1,
    body.pl-landing-time .pl-ivr-anim__option--2,
    body.pl-landing-time .pl-ivr-anim__digit-press,
    body.pl-landing-time .pl-ivr-anim__route,
    body.pl-landing-time .pl-ivr-anim__pipe,
    body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person,
    body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person,
    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person,
    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-av,
    body.pl-landing-time .pl-ivr-anim__person-av i,
    body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person-state::after,
    body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person-state::after,
    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-state::after {
        animation: none !important;
    }

    body.pl-landing-time .pl-ivr-anim__caller,
    body.pl-landing-time .pl-ivr-anim__trunk,
    body.pl-landing-time .pl-ivr-anim__route {
        opacity: 1;
        transform: none;
    }

    body.pl-landing-time .pl-ivr-anim__menu {
        opacity: 0;
    }

    body.pl-landing-time .pl-ivr-anim__option--1,
    body.pl-landing-time .pl-ivr-anim__option--2 {
        opacity: 1;
        transform: none;
    }

    body.pl-landing-time .pl-ivr-anim__option--1 {
        border-color: rgba(21, 94, 239, 0.35);
        background: #eff6ff;
    }

    body.pl-landing-time .pl-ivr-anim__digit-press {
        opacity: 0;
    }

    body.pl-landing-time .pl-ivr-anim__pipe {
        transform: scaleY(1);
        opacity: 1;
    }

    body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person,
    body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person {
        opacity: 0.55;
    }

    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person {
        border-color: #16a34a;
        background: #f0fdf4;
    }

    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-av {
        background: #16a34a;
    }

    body.pl-landing-time .pl-ivr-anim__branch--a .pl-ivr-anim__person-state::after,
    body.pl-landing-time .pl-ivr-anim__branch--b .pl-ivr-anim__person-state::after {
        content: "Missed";
    }

    body.pl-landing-time .pl-ivr-anim__branch--answer .pl-ivr-anim__person-state::after {
        content: "On call";
        color: #16a34a;
    }
}
