/* ============================================================
   Aha Orbit Testimonials PRO – Frontend Styles
   Uses the same CSS custom property tokens as the free plugin
   (--ot-card-bg, --ot-text-primary, etc.) so the Design &
   Colours tab in the admin applies to PRO too.
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.otp-orbit-pro-container {
    --otp-transition-speed: 700ms;
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    box-sizing: border-box;
    overflow: visible;
}

.otp-orbit-pro-container * {
    box-sizing: border-box;
}

/* ── Orbit Path SVG ───────────────────────────────────────── */
.otp-orbit-path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.otp-orbit-path-svg ellipse {
    fill: none;
    stroke: color-mix(in srgb, var(--ot-name-color, #a78bfa) 15%, transparent);
    stroke-width: 0.5px;
    stroke-dasharray: none;
    filter: none;
}

/* ── Avatars Layer ────────────────────────────────────────── */
.otp-avatars-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* Orbit Card (reusing .otp-avatar class) */
.otp-avatar {
    position: absolute;
    border-radius: 12px;
    cursor: pointer;
    pointer-events: auto;
    width: 250px;
    height: auto;
    min-height: 74px;
    background: color-mix(in srgb, var(--ot-card-bg, #0f172a) 70%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid color-mix(in srgb, var(--ot-text-primary, #ffffff) 8%, transparent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    transition:
        left var(--otp-transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
        top var(--otp-transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
    will-change: left, top, transform;
    overflow: visible;
}

.otp-avatar:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 15px 35px color-mix(in srgb, var(--ot-name-color, #a78bfa) 20%, transparent);
    border-color: var(--ot-name-color, var(--otp-name-color, rgba(255, 255, 255, 0.2))) !important;
    z-index: 20 !important;
}

.otp-avatar.otp-avatar--active {
    background: color-mix(in srgb, var(--ot-card-bg, #0f172a) 85%, transparent) !important;
    animation: otp-active-pop 0.8s cubic-bezier(0.25, 1, 0.5, 1) 1,
        otp-active-breath 2.5s infinite ease-in-out 0.8s;
}

/* Avatar Wrap on Left */
.otp-card-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.otp-card-avatar-wrap img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Initials fallback */
.otp-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    user-select: none;
    pointer-events: none;
    background: linear-gradient(135deg, #4776e6, #8e54e9);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Colour palette for initials fallback */
.otp-avatar:nth-child(6n+1) .otp-avatar-initials {
    background: linear-gradient(135deg, #4776e6, #8e54e9);
}

.otp-avatar:nth-child(6n+2) .otp-avatar-initials {
    background: linear-gradient(135deg, #0ba360, #3cba92);
}

.otp-avatar:nth-child(6n+3) .otp-avatar-initials {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.otp-avatar:nth-child(6n+4) .otp-avatar-initials {
    background: linear-gradient(135deg, #f953c6, #b91d73);
}

.otp-avatar:nth-child(6n+5) .otp-avatar-initials {
    background: linear-gradient(135deg, #1a85ff, #00c6fb);
}

.otp-avatar:nth-child(6n+6) .otp-avatar-initials {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Name colors cycles (fallback when custom name color is not styled) */
.otp-avatar:nth-child(6n+1) {
    --otp-name-color: #c084fc;
}

/* purple */
.otp-avatar:nth-child(6n+2) {
    --otp-name-color: #38bdf8;
}

/* sky blue */
.otp-avatar:nth-child(6n+3) {
    --otp-name-color: #4ade80;
}

/* green */
.otp-avatar:nth-child(6n+4) {
    --otp-name-color: #f472b6;
}

/* pink */
.otp-avatar:nth-child(6n+5) {
    --otp-name-color: #fb7185;
}

/* rose */
.otp-avatar:nth-child(6n+6) {
    --otp-name-color: #fb923c;
}

/* orange */

/* Content Wrap (Right) */
.otp-card-content-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    min-width: 0;
    flex-grow: 1;
}

.otp-card-text {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--ot-text-primary, #f1f5f9);
    margin: 0 0 3px 0;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otp-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ot-name-color, var(--otp-name-color, #a78bfa));
}

/* Social badge on avatar wrap */
.otp-social-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #555;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 3;
    pointer-events: auto;
}

.otp-social-badge--facebook {
    background: #1877f2;
}

.otp-social-badge--instagram {
    background: radial-gradient(circle at 30% 110%, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.otp-social-badge--linkedin {
    background: #0a66c2;
}

.otp-social-badge--twitter {
    background: #000;
}

.otp-social-badge--youtube {
    background: #ff0000;
}

.otp-social-badge--tiktok {
    background: #010101;
}

.otp-social-badge--google {
    background: #fff;
}

.otp-social-badge--trustpilot {
    background: #00b67a;
}

.otp-social-badge svg {
    width: 10px;
    height: 10px;
    display: block;
}

/* ── Central Counter ──────────────────────────────────────── */
.otp-counter-hub {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    cursor: default;
    user-select: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.otp-counter-hub::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, color-mix(in srgb, var(--ot-name-color, #a78bfa) 14%, transparent) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

.otp-counter-number {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ot-name-color, #fff);
    display: block;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px color-mix(in srgb, var(--ot-name-color, #fff) 20%, transparent);
}

.otp-counter-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ot-role-color, #a78bfa);
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0.5rem;
    display: block;
    line-height: 1.3;
}

/* Stars row above the counter number */
.otp-counter-stars {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.otp-counter-stars span {
    font-size: 1.3rem;
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* ── Pagination Bullets ───────────────────────────────────── */
.otp-pagination-bullets {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
    position: relative;
    z-index: 15;
}

.otp-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ot-bullet-color, #64748b);
    opacity: 0.3;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.3s ease !important;
}

.otp-bullet.otp-bullet--active {
    background: var(--ot-bullet-active-color, #3b82f6);
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* ── Modal Overlay ────────────────────────────────────────── */
.otp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease !important;
}

.otp-modal-overlay.otp-modal--theme-dark {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.otp-modal-overlay.otp-modal--theme-light {
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.otp-modal-overlay.otp-modal--visible {
    opacity: 1;
    pointer-events: auto;
}

.otp-modal-content {
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 560px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.otp-modal-overlay.otp-modal--visible .otp-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Content Theme Styles */
.otp-modal--theme-dark .otp-modal-content {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.otp-modal--theme-light .otp-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1e293b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

/* Modal close button */
.otp-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease !important;
    flex-shrink: 0;
}

.otp-modal--theme-dark .otp-modal-close {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.otp-modal--theme-dark .otp-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.otp-modal--theme-light .otp-modal-close {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

.otp-modal--theme-light .otp-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Modal avatar */
.otp-modal-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.25rem;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.otp-modal--theme-dark .otp-modal-avatar {
    border: 3px solid rgba(255, 255, 255, 0.12);
}

.otp-modal--theme-light .otp-modal-avatar {
    border: 3px solid rgba(0, 0, 0, 0.05);
}

.otp-modal-avatar-initials {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4776e6, #8e54e9);
    margin: 0 auto 1.25rem;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.otp-modal--theme-dark .otp-modal-avatar-initials {
    border: 3px solid rgba(255, 255, 255, 0.12);
}

.otp-modal--theme-light .otp-modal-avatar-initials {
    border: 3px solid rgba(0, 0, 0, 0.05);
}

/* Modal rating */
.otp-modal-rating {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 0.75rem;
}

.otp-modal-star {
    font-size: 1.4rem;
}

.otp-modal--theme-dark .otp-modal-star {
    color: #475569;
}

.otp-modal--theme-dark .otp-modal-star.otp-star--filled {
    color: #f59e0b;
}

.otp-modal--theme-dark .otp-modal-star.otp-star--half {
    position: relative;
    color: #475569;
}

.otp-modal--theme-dark .otp-modal-star.otp-star--half::after {
    content: "\2605";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f59e0b;
}

.otp-modal--theme-light .otp-modal-star {
    color: #cbd5e1;
}

.otp-modal--theme-light .otp-modal-star.otp-star--filled {
    color: #f59e0b;
}

.otp-modal--theme-light .otp-modal-star.otp-star--half {
    position: relative;
    color: #cbd5e1;
}

.otp-modal--theme-light .otp-modal-star.otp-star--half::after {
    content: "\2605";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f59e0b;
}

/* Modal quote icon */
.otp-modal-quote-icon {
    opacity: 0.4;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.otp-modal--theme-dark .otp-modal-quote-icon {
    color: #475569;
}

.otp-modal--theme-light .otp-modal-quote-icon {
    color: #cbd5e1;
}

/* Modal text */
.otp-modal-text {
    font-style: italic;
    line-height: 1.75;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.otp-modal--theme-dark .otp-modal-text {
    color: #e2e8f0;
}

.otp-modal--theme-light .otp-modal-text {
    color: #334155;
}

/* Modal name / role */
.otp-modal-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.otp-modal--theme-dark .otp-modal-name {
    color: #a78bfa;
}

.otp-modal--theme-light .otp-modal-name {
    color: #7c3aed;
}

.otp-modal-role {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.otp-modal--theme-dark .otp-modal-role {
    color: #94a3b8;
}

.otp-modal--theme-light .otp-modal-role {
    color: #64748b;
}

/* Modal company logo */
.otp-modal-logo {
    display: block;
    max-height: 28px;
    width: auto;
    max-width: 120px;
    margin: 1rem auto 0;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(20%);
    transition: opacity 0.3s ease, filter 0.3s ease !important;
}

.otp-modal-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ── Mobile: Swipe card layout ────────────────────────────── */
@media (max-width: 767px) {
    .otp-orbit-pro-container {
        min-height: unset;
        padding: 4.5rem 0 2rem;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .otp-orbit-path-svg {
        display: none !important;
        /* Hide background thin ellipse lines on mobile */
    }

    .otp-avatars-layer {
        display: none !important;
        /* Hidden on mobile — replaced by interactive card */
    }

    .otp-counter-hub {
        order: 1 !important;
        margin-bottom: 2rem !important;
        padding: 0.5rem !important;
    }

    .otp-counter-number {
        font-size: 3.2rem;
    }

    .otp-counter-label {
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }

    .otp-counter-stars span {
        font-size: 1.1rem;
    }

    /* Central interactive card */
    .otp-mobile-active-card {
        order: 2 !important;
        width: 90%;
        max-width: 380px;
        background: color-mix(in srgb, var(--ot-card-bg, #0f172a) 85%, transparent);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid color-mix(in srgb, var(--ot-text-primary, #fff) 10%, transparent);
        border-radius: 24px;
        padding: 2.5rem 1.5rem 1.5rem;
        box-shadow: 0 12px 12px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 3.5rem !important;
        /* Clearance for the pulled-up avatar */
        margin-bottom: 2.25rem !important;
        position: relative;
        overflow: visible;

        /* Smooth Transition */
        transition: opacity 0.2s cubic-bezier(0.25, 1, 0.5, 1),
            transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
            border-color 0.3s ease,
            box-shadow 0.3s ease,
            height 0.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .otp-mobile-active-card.otp-mobile-active-card--transitioning {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    /* Avatar wrapping inside the card */
    .otp-mobile-active-avatar-wrap {
        width: 86px;
        height: 86px;
        margin-top: -5.2rem;
        /* Pull avatar up significantly */
        margin-bottom: 1.25rem;
        position: relative;
        z-index: 2;
    }

    .otp-mobile-active-avatar {
        width: 86px;
        height: 86px;
        border-radius: 50% !important;
        /* Force to be always round */
        object-fit: cover;
        border: 3px solid var(--ot-name-color, #a78bfa);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        display: block;
    }

    .otp-mobile-active-initials {
        width: 86px;
        height: 86px;
        border-radius: 50% !important;
        /* Force to be always round */
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, #4776e6, #8e54e9);
        border: 3px solid var(--ot-name-color, #a78bfa);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        text-transform: uppercase;
    }

    /* Rating */
    .otp-mobile-active-rating {
        display: flex;
        gap: 3px;
        justify-content: center;
        margin-bottom: 0.75rem;
    }

    .otp-mobile-active-star {
        font-size: 1.15rem;
        color: #475569 !important;
    }

    .otp-mobile-active-star.otp-star--filled {
        color: #f59e0b !important;
        text-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
    }

    .otp-mobile-active-star.otp-star--half {
        position: relative;
        color: #475569 !important;
    }

    .otp-mobile-active-star.otp-star--half::after {
        content: "\2605" !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 50%;
        overflow: hidden;
        color: #f59e0b !important;
        text-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
    }

    /* Quote icon */
    .otp-mobile-active-quote {
        color: var(--ot-name-color, #a78bfa);
        opacity: 0.45;
        margin-bottom: 0.75rem;
        display: flex;
        justify-content: center;
    }

    .otp-mobile-active-quote svg {
        width: 28px;
        height: 28px;
    }

    /* Text content */
    .otp-mobile-active-text {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--ot-text-primary, #e2e8f0);
        margin: 0 0 1.25rem 0;
        font-style: italic;
    }

    .otp-mobile-active-name {
        font-size: 1.15rem;
        font-weight: 700;
        margin: 0 0 0.25rem 0;
        /* Custom color applied via JS */
    }

    .otp-mobile-active-role {
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--ot-role-color, #94a3b8);
        margin: 0 0 0.5rem 0;
    }

    .otp-mobile-active-logo {
        max-height: 24px;
        width: auto;
        opacity: 0.7;
        margin: 0.75rem auto 0;
        display: block;
    }

    /* Avatar thumbnails row */
    .otp-mobile-avatar-row {
        order: 3 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 410px;
        gap: 4px;
        margin-bottom: 1.5rem !important;
        /* Spacing at the bottom of the widget */
        padding: 0 0.25rem;
    }

    .otp-mobile-nav-btn {
        background: transparent;
        border: none;
        color: var(--ot-name-color, #a78bfa);
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, opacity 0.2s;
        opacity: 0.8;
        flex-shrink: 0;
        z-index: 10;
    }

    .otp-mobile-nav-btn:active {
        transform: scale(0.85);
        opacity: 1;
    }

    .otp-mobile-nav-btn svg {
        width: 24px;
        height: 24px;
    }

    .otp-mobile-avatars-list {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        gap: 8px;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        padding-left: calc(50% - 25px) !important;
        padding-right: calc(50% - 25px) !important;
        box-sizing: border-box;
        scrollbar-width: none;
        flex-grow: 1;
        justify-content: flex-start;
        align-items: center;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;

        /* Premium edge fade mask */
        -webkit-mask-image: linear-gradient(to right, transparent 0%, #fff 12%, #fff 88%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, #fff 12%, #fff 88%, transparent 100%);
    }

    .otp-mobile-avatars-list::-webkit-scrollbar {
        display: none;
    }

    .otp-mobile-avatar-thumb {
        width: 40px;
        height: 40px;
        border-radius: 50% !important;
        /* Force to be always round */
        flex-shrink: 0;
        cursor: pointer;
        border: 2px solid rgba(255, 255, 255, 0.15);
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        scroll-snap-align: center;
        box-sizing: border-box;
    }

    .otp-mobile-avatar-thumb img {
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        /* Force always round */
        object-fit: cover;
    }

    .otp-mobile-avatar-thumb span {
        font-size: 0.75rem;
        font-weight: 700;
        color: #fff;
    }

    /* Gradients for initials fallback on mobile avatar list */
    .otp-mobile-avatar-thumb:nth-child(6n+1) {
        background: linear-gradient(135deg, #4776e6, #8e54e9) !important;
    }

    .otp-mobile-avatar-thumb:nth-child(6n+2) {
        background: linear-gradient(135deg, #0ba360, #3cba92) !important;
    }

    .otp-mobile-avatar-thumb:nth-child(6n+3) {
        background: linear-gradient(135deg, #f7971e, #ffd200) !important;
    }

    .otp-mobile-avatar-thumb:nth-child(6n+4) {
        background: linear-gradient(135deg, #f953c6, #b91d73) !important;
    }

    .otp-mobile-avatar-thumb:nth-child(6n+5) {
        background: linear-gradient(135deg, #1a85ff, #00c6fb) !important;
    }

    .otp-mobile-avatar-thumb:nth-child(6n+6) {
        background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    }

    .otp-mobile-avatar-thumb--active {
        width: 50px;
        height: 50px;
        border-color: var(--ot-name-color, #a78bfa) !important;
        box-shadow: 0 0 15px color-mix(in srgb, var(--ot-name-color, #a78bfa) 45%, transparent) !important;
        transform: scale(1.05);
        border-width: 3px !important;
    }

    /* Show pagination bullets on mobile as the sole navigation */
    .otp-pagination-bullets {
        display: flex !important;
        order: 3 !important;
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ── Resilience: builder/theme transition resets ──────────── */
.otp-orbit-pro-container .otp-avatar {
    transition:
        left var(--otp-transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
        top var(--otp-transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.3s ease !important;
    transition-duration: var(--otp-transition-speed), var(--otp-transition-speed), 0.25s, 0.25s, 0.3s !important;
    transition-delay: 0s !important;
}

.otp-orbit-pro-container .otp-bullet {
    transition: all 0.3s ease !important;
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
}

.otp-modal-overlay {
    transition: opacity 0.25s ease !important;
    transition-duration: 0.25s !important;
    transition-delay: 0s !important;
}

.otp-modal-content {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
}


/* Active Avatar Pop & Breath Animations */
@keyframes otp-active-pop {
    0% {
        border-color: var(--ot-name-color, #a78bfa) !important;
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--ot-name-color, #a78bfa) 90%, transparent),
            0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    45% {
        border-color: #fff !important;
        box-shadow: 0 0 0 15px color-mix(in srgb, var(--ot-name-color, #a78bfa) 0%, transparent),
            0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    100% {
        border-color: var(--ot-name-color, #a78bfa) !important;
        box-shadow: 0 0 15px color-mix(in srgb, var(--ot-name-color, #a78bfa) 30%, transparent),
            0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
}

@keyframes otp-active-breath {
    0% {
        border-color: var(--ot-name-color, var(--otp-name-color, #a78bfa)) !important;
        box-shadow: 0 0 15px color-mix(in srgb, var(--ot-name-color, #a78bfa) 30%, transparent),
            0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    50% {
        border-color: color-mix(in srgb, var(--ot-name-color, var(--otp-name-color, #a78bfa)) 60%, #fff) !important;
        box-shadow: 0 0 25px color-mix(in srgb, var(--ot-name-color, #a78bfa) 65%, transparent),
            0 12px 35px rgba(0, 0, 0, 0.4) !important;
    }

    100% {
        border-color: var(--ot-name-color, var(--otp-name-color, #a78bfa)) !important;
        box-shadow: 0 0 15px color-mix(in srgb, var(--ot-name-color, #a78bfa) 30%, transparent),
            0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
}