/* =========================================
   WP Manager: Floating Contact Widgets CSS
   ========================================= */

.wpm-float-dock {
    position: fixed !important;
    bottom: 30px !important;
    right: 24px !important;
    z-index: 2147483647 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    pointer-events: auto !important;
}

/* Shared Bubble Style */
.wpm-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
    backdrop-filter: blur(12px) saturate(180%);
    cursor: pointer;
    animation: wpm-bubble-enter 0.5s ease forwards;
}

.wpm-bubble svg { width: 24px; height: 24px; }

/* Chat Bubble */
.wpm-bubble-chat {
    background: rgba(0, 242, 255, 0.9);
    color: #000;
    box-shadow: 0 6px 24px rgba(0, 242, 255, 0.45);
    animation-delay: 0s;
}

.wpm-bubble-chat:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 32px rgba(0, 242, 255, 0.6);
}

.wpm-bubble-chat .wpm-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff2d55;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #0a0e17;
}

/* WhatsApp Bubble */
.wpm-bubble-wa {
    background: rgba(37, 211, 102, 0.9);
    color: #fff;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
    animation-delay: 0.1s;
    position: relative;
}

.wpm-bubble-wa:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.7);
    background: rgba(37, 211, 102, 1);
}

.wpm-bubble-wa::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: wpm-pulse-wa 2.5s ease infinite;
}

@keyframes wpm-pulse-wa {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.2); opacity: 0; }
}

/* Phone Bubble */
.wpm-bubble-phone {
    background: rgba(255, 45, 85, 0.9);
    color: #fff;
    box-shadow: 0 6px 24px rgba(255, 45, 85, 0.45);
    animation-delay: 0.2s;
    position: relative;
}

.wpm-bubble-phone:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 32px rgba(255, 45, 85, 0.6);
}

/* Pulse ring on phone */
.wpm-bubble-phone::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 45, 85, 0.4);
    animation: wpm-pulse 2s ease infinite;
}

@keyframes wpm-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.15); opacity: 0; }
}

@keyframes wpm-bubble-enter {
    from { opacity: 0; transform: translateY(20px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* SMS/Email Verification Modal */
.wpm-sms-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wpm-fade-in 0.25s ease;
}

.wpm-sms-modal {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.98), rgba(15, 15, 17, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 40px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    animation: wpm-slide-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 2147483647 !important;
}

.wpm-sms-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.05), transparent 70%);
    pointer-events: none;
}

.wpm-sms-modal .wpm-modal-icon  { font-size: 56px; margin-bottom: 20px; display: block; filter: drop-shadow(0 0 15px rgba(0,242,255,0.4)); }
.wpm-sms-modal h2 { color: #fff; font-size: 26px; font-weight: 900; margin: 0 0 10px; letter-spacing: -0.5px; }
.wpm-sms-modal p  { color: rgba(255,255,255,0.6); font-size: 15px; margin: 0 0 30px; line-height: 1.6; }

.wpm-modal-field {
    margin-bottom: 20px;
    text-align: left;
}

.wpm-modal-field label {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.wpm-modal-field input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.wpm-modal-field input:focus {
    background: rgba(255,255,255,0.08);
    border-color: #00f2ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.wpm-otp-input {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.wpm-otp-input input {
    width: 46px;
    height: 60px;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    color: #fff;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpm-otp-input input:focus { border-color: #00f2ff; box-shadow: 0 0 20px rgba(0,242,255,0.2); transform: scale(1.05); }
.wpm-otp-input input.filled { border-color: #00f2ff; color: #00f2ff; background: rgba(0,242,255,0.05); }

.wpm-modal-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00f2ff, #7000ff);
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wpm-modal-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 30px rgba(0,242,255,0.3); }
.wpm-modal-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.wpm-modal-error {
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 45, 85, 0.28);
    border-radius: 10px;
    background: rgba(255, 45, 85, 0.12);
    color: #ff8aa3;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.wpm-floating-notice {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 2147483647;
    max-width: min(360px, calc(100vw - 48px));
    padding: 12px 14px;
    border: 1px solid rgba(0, 242, 255, 0.22);
    border-radius: 12px;
    background: rgba(12, 16, 22, 0.96);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease;
}

.wpm-floating-notice-error {
    border-color: rgba(255, 45, 85, 0.32);
    color: #ffb3c2;
}

.wpm-floating-notice-hide {
    opacity: 0;
    transform: translateY(8px);
}

.wpm-resend-timer { color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 600; }
.wpm-resend-link  { color: #00f2ff; cursor: pointer; text-decoration: none; font-weight: 800; border-bottom: 1px solid rgba(0,242,255,0.3); }
.wpm-resend-link:hover { border-bottom-color: #00f2ff; }

/* Aura Chat Window */
.wpm-chat-window {
    position: fixed !important;
    bottom: 100px !important;
    right: 24px !important;
    width: 380px;
    height: 550px;
    background: linear-gradient(135deg, rgba(15, 17, 26, 0.98), rgba(10, 12, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    z-index: 2147483646 !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: wpm-slide-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(25px);
}

.wpm-chat-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpm-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpm-chat-status {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

.wpm-chat-title span {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.wpm-chat-close {
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: color 0.3s;
}

.wpm-chat-close:hover { color: #fff; }

.wpm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpm-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.wpm-msg-bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.wpm-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #00f2ff, #7000ff);
    color: #000;
    font-weight: 600;
    border-bottom-right-radius: 4px;
}

.wpm-chat-input-area {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wpm-chat-input-wrap {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 4px;
}

.wpm-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 14px;
    outline: none;
    font-size: 14px;
}

.wpm-chat-send {
    background: #00f2ff;
    color: #000;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.wpm-chat-send:hover { transform: scale(1.05); background: #fff; }

@keyframes wpm-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wpm-slide-up { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Sidebar Plugin List Styling */
.wpm-sidebar-plugin-list {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.95), rgba(20, 20, 22, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.wpm-sidebar-plugin-list.wpm-tool-nav-horizontal {
    background: linear-gradient(180deg, color-mix(in srgb, var(--aura-accent, #00f2ff) 12%, #000), #000) !important;
    border: 1px solid color-mix(in srgb, var(--aura-accent, #00f2ff) 34%, transparent) !important;
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--aura-accent, #00f2ff) 52%, transparent) !important;
}

.wpm-sidebar-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.wpm-plugin-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpm-plugin-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.wpm-plugin-item:last-child { border-bottom: none; }

.wpm-item-dot {
    width: 6px;
    height: 6px;
    background: #00f2ff;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.wpm-item-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.wpm-item-link {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.wpm-item-link:hover {
    transform: translateX(4px);
}

.wpm-item-link:hover .wpm-item-name {
    color: #00f2ff;
}

.wpm-item-ver {
    font-size: 11px;
    font-weight: 700;
    color: #ff2d55;
    background: rgba(255, 45, 85, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Removed old hover rule */
/* Native same-document Chat authentication dialog */
.wpm-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

button.wpm-bubble {
    padding: 0;
    border: 0;
    font: inherit;
}

.wpm-native-auth-modal {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
}

.wpm-native-auth-modal[hidden],
.wpm-native-auth-modal:not([open]):not(.is-open) {
    display: none !important;
}

.wpm-native-auth-modal.is-open {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
}

.wpm-native-auth-modal::backdrop,
.wpm-native-auth-backdrop {
    background: rgba(3, 10, 16, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wpm-native-auth-backdrop {
    position: fixed;
    inset: 0;
}

.wpm-native-auth-panel {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 28px), 460px);
    max-height: min(calc(100vh - 28px), 720px);
    margin: auto;
    overflow: auto;
    border: 1px solid rgba(0, 242, 255, 0.28);
    border-radius: 20px;
    background: #08131b;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
    scrollbar-gutter: stable;
}

.wpm-native-auth-close {
    position: sticky;
    z-index: 20;
    top: 10px;
    float: right;
    width: 44px;
    height: 44px;
    margin: 10px 10px -54px 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(8, 19, 27, 0.94);
    color: #dce8eb;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.wpm-native-auth-close:hover,
.wpm-native-auth-close:focus-visible {
    border-color: #ff5a36;
    background: #ff5a36;
    color: #fff;
    outline: 3px solid rgba(255, 90, 54, 0.3);
    outline-offset: 2px;
}

.wpm-native-auth-modal .nexus-auth-elementor-wrap {
    min-height: 0;
    padding: 18px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.wpm-native-auth-modal .nexus-auth-card {
    max-width: none;
    padding: 34px 28px 28px;
    background: rgba(8, 19, 27, 0.96);
    border: 0;
    box-shadow: none;
}

.wpm-native-auth-modal .nexus-auth-header {
    padding-right: 34px;
}

.wpm-auth-dialog-open {
    overflow: hidden;
}

.nexus-auth-field-centered {
    text-align: center;
}

.nexus-auth-help {
    margin: 8px 0 16px;
    color: #9cb0b7;
    font-size: 13px;
    line-height: 1.5;
}

.nexus-auth-footer {
    line-height: 1.5;
}

.wpm-bubble:focus-visible,
.wpm-chat-close:focus-visible,
.wpm-chat-send:focus-visible,
.wpm-chat-input:focus-visible {
    outline: 3px solid rgba(0, 242, 255, 0.55);
    outline-offset: 3px;
}

.wpm-chat-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
}

.wpm-chat-input {
    min-width: 0;
}

.wpm-chat-form-status {
    min-height: 20px;
    margin: 8px 4px 0;
    color: #a9bac0;
    font-size: 12px;
    line-height: 1.4;
}

.wpm-chat-form-status[data-tone="error"] {
    color: #ff8b9f;
}

.wpm-chat-form-status[data-tone="success"] {
    color: #6ff0b0;
}

.wpm-chat-send:disabled,
.wpm-chat-input:disabled {
    opacity: 0.55;
    cursor: wait;
}

.wpm-msg-error {
    align-self: flex-start;
    background: rgba(255, 45, 85, 0.12);
    color: #ffb2c0;
    border: 1px solid rgba(255, 45, 85, 0.28);
}

@media (max-width: 560px) {
    .wpm-float-dock {
        right: 14px !important;
        bottom: 18px !important;
    }

    .wpm-chat-window {
        inset: 10px !important;
        width: auto !important;
        height: auto !important;
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
    }

    .wpm-chat-header {
        padding: 14px 16px;
    }

    .wpm-chat-messages {
        padding: 16px;
    }

    .wpm-chat-input-area {
        padding: 12px 14px max(14px, env(safe-area-inset-bottom));
    }

    .wpm-native-auth-panel {
        width: calc(100vw - 18px);
        max-height: calc(100dvh - 18px);
        border-radius: 16px;
    }

    .wpm-native-auth-modal .nexus-auth-elementor-wrap {
        padding: 10px;
    }

    .wpm-native-auth-modal .nexus-auth-card {
        padding: 30px 18px 22px;
    }

    .otp-inputs {
        gap: 6px;
    }

    .otp-field,
    .sms-field {
        width: min(40px, 12vw);
        height: 50px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpm-bubble,
    .wpm-chat-window,
    .wpm-native-auth-modal *,
    .nexus-auth-after-load {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
