/* EFV Intelligence Chatbot Styles */

#efv-chatbot {
    position: fixed;
    z-index: 9999999 !important;
    /* Ensure it stays above the ultra-high priority navbar */
}


/* Floating Chat Button */
.efv-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(214, 168, 95, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(214, 168, 95, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #D6A85F;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(214, 168, 95, 0.1);
}

.efv-chat-button:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(214, 168, 95, 0.15);
    border-color: rgba(214, 168, 95, 0.6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(214, 168, 95, 0.3);
}

.efv-chat-button svg {
    filter: drop-shadow(0 0 5px rgba(214, 168, 95, 0.5));
}

.efv-pulse-ring {
    display: none;
}

@keyframes efv-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Tooltip with curved arrow */
.efv-chat-tooltip {
    position: fixed;
    bottom: 80px;
    right: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    opacity: 0;
    /* Invisible by default */
    pointer-events: none;
    z-index: 9999;
}

/* New: Periodic Blink Class (Used by Chat JS) */
.efv-blink-active {
    animation: efv-blink-periodic 5s linear forwards;
    /* Increased duration to allow for fade in/out */
}

@keyframes efv-blink-periodic {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    20%,
    40%,
    60%,
    80% {
        opacity: 1;
        transform: scale(1);
    }

    30%,
    50%,
    70%,
    90% {
        opacity: 0.5;
        transform: scale(1.05);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.efv-curved-arrow {
    margin-top: -10px;
    margin-right: 15px;
    /* Shift arrow slightly toward center of box */
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.efv-tooltip-text {
    background: rgba(214, 168, 95, 0.9);
    color: #0d1117;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(214, 168, 95, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes efv-tooltip-fade {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

/* Hide tooltip when chat is open */
#efv-chatbot:has(.efv-chat-window.active) .efv-chat-tooltip {
    display: none;
}

/* Chat Window Overlay (Background Blur) */
.efv-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(11, 24, 43, 0.3), rgba(3, 7, 18, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.efv-chat-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Chat Window */
.efv-chat-window {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1350px !important;
    height: 820px !important;
    max-height: 92vh !important;
    max-width: 98vw !important;
    background: rgba(13, 17, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(214, 168, 95, 0.1);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.98);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 9999999;
}

.efv-chat-window.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

/* Chat Header */
.efv-chat-header {
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.efv-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.efv-ai-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #C8A96A 0%, #D6A85F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(214, 168, 95, 0.2);
}

.efv-chat-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #D6A85F;
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
}

.efv-chat-title p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.efv-close-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.efv-close-btn:hover {
    background: rgba(214, 168, 95, 0.1);
    color: #D6A85F;
    border-color: rgba(214, 168, 95, 0.3);
    transform: rotate(90deg) scale(1.1);
}

/* Messages Container */
.efv-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    scroll-behavior: smooth;
}

.efv-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.efv-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.efv-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

.efv-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Messages */
.efv-message {
    display: flex;
    animation: efv-message-in 0.3s ease;
}

@keyframes efv-message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.efv-message-content {
    max-width: 80%;
    padding: 24px 32px;
    border-radius: 20px;
    font-size: 17px;
    line-height: 1.8;
}

.efv-user-message {
    justify-content: flex-end;
}

.efv-user-message .efv-message-content {
    background: linear-gradient(135deg, #C8A96A 0%, #D6A85F 100%);
    color: #0d1117;
    font-weight: 600;
    box-shadow: 0 15px 35px rgba(214, 168, 95, 0.2);
    border-bottom-right-radius: 4px;
}

.efv-ai-message .efv-message-content {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.efv-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.efv-typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D6A85F;
    animation: efv-typing 1.4s infinite ease-in-out;
}

.efv-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.efv-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes efv-typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Container */
.efv-chat-input-container {
    padding: 30px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 15px;
    background: rgba(13, 17, 26, 0.5);
    align-items: center;
}

#efv-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px 28px;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.5px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#efv-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#efv-chat-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(214, 168, 95, 0.5);
    box-shadow: 0 0 30px rgba(214, 168, 95, 0.1);
}

.efv-mic-btn {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #D6A85F;
}

.efv-mic-btn:hover {
    background: rgba(214, 168, 95, 0.15);
    border-color: rgba(214, 168, 95, 0.3);
    transform: translateY(-3px) scale(1.05);
}

.efv-mic-btn:active {
    transform: scale(0.95);
}

@keyframes efv-mic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(214, 168, 95, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(214, 168, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 168, 95, 0); }
}

.efv-mic-active {
    background: rgba(214, 168, 95, 0.3) !important;
    border-color: #D6A85F !important;
    color: #fff !important;
    animation: efv-mic-pulse 1.5s infinite;
}

.efv-send-btn {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #C8A96A 0%, #D6A85F 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #0d1117;
    box-shadow: 0 10px 25px rgba(214, 168, 95, 0.2);
}

.efv-send-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(214, 168, 95, 0.4);
}

.efv-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .efv-chat-window {
        width: 96%;
        left: 50%;
        transform: translate(-50%, -45%) scale(0.9);
        height: 80vh;
        max-height: 85vh;
        bottom: auto;
        top: 50%;
        border-radius: 20px;
    }

    .efv-chat-button {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .efv-chat-window {
        width: 90% !important;
        height: 80vh !important;
        max-height: 80vh !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        border-radius: 24px !important;
        transform: translate(-50%, -45%) scale(0.9) !important;
    }

    .efv-chat-window.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* Smaller text in message bubbles */
    .efv-message-content {
        font-size: 13px !important;
        padding: 12px 16px !important;
        line-height: 1.5 !important;
    }

    /* Smaller input text */
    #efv-chat-input {
        font-size: 13px !important;
        padding: 12px 14px !important;
    }

    /* Smaller header */
    .efv-chat-title h3 {
        font-size: 15px !important;
    }

    .efv-chat-title p {
        font-size: 10px !important;
    }

    .efv-chat-header {
        padding: 12px 16px !important;
    }

    .efv-chat-messages {
        padding: 12px !important;
        gap: 10px !important;
    }

    .efv-chat-input-container {
        padding: 10px 12px !important;
    }

    .efv-chat-button {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .efv-chat-button svg {
        width: 32px;
        height: 32px;
    }

    .efv-chat-tooltip {
        bottom: 65px;
        right: 45px;
    }
}

/* Bot Introduction Premium Styles */
#efv-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 5, 9, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000000;
    display: none;
    opacity: 0;
    padding: 20px;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#efv-intro-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.efv-intro-popup {
    max-width: 580px;
    width: 100%;
    background: rgba(13, 17, 26, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(214, 168, 95, 0.2);
    border-radius: 32px;
    padding: 60px 50px;
    text-align: center;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.8), 0 0 50px rgba(214, 168, 95, 0.1);
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
}

#efv-intro-overlay.active .efv-intro-popup {
    transform: translateY(0) scale(1);
}

.efv-intro-popup::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05), transparent 70%);
    pointer-events: none;
}

.efv-intro-icon-glow {
    margin-bottom: 25px;
    display: inline-block;
}

.efv-intro-icon-glow svg {
    filter: drop-shadow(0 0 25px rgba(214, 168, 95, 0.6));
    animation: efv-intro-star-pulse 4s infinite ease-in-out;
}

@keyframes efv-intro-star-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(214, 168, 95, 0.4)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 35px rgba(214, 168, 95, 0.8)); }
}

.efv-intro-popup h2 {
    color: #D6A85F;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 0 0 12px 0;
    font-family: 'Cinzel', serif;
}

.efv-intro-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 30px;
}

.efv-intro-body {
    margin-bottom: 40px;
}

.efv-intro-body p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 15px 0;
}

.efv-highlight-text {
    color: #D6A85F !important;
    font-weight: 600;
    margin-top: 25px !important;
    letter-spacing: 0.5px;
}

.efv-intro-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.efv-btn-intro-glow {
    background: linear-gradient(135deg, #C8A96A 0%, #D6A85F 100%);
    color: #0d1117;
    padding: 16px 40px;
    border-radius: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(214, 168, 95, 0.3);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.efv-btn-intro-glow:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 45px rgba(214, 168, 95, 0.5);
}

.efv-btn-intro-outline {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    padding: 16px 40px;
    border-radius: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.efv-btn-intro-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Elegant Short Pointer */
.efv-card-pointer {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 15px rgba(214, 168, 95, 0.8));
    animation: efv-pointer-pulse-simple 2.5s infinite ease-in-out;
}

@keyframes efv-pointer-pulse-simple {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    50% {
        transform: translate(10px, 10px);
        opacity: 1;
    }
}

/* Enhanced Highlight Ring for Bot */
#efv-guide-system {
    position: fixed;
    inset: 0;
    z-index: 100000001;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s;
}

#efv-guide-system.efv-hidden {
    opacity: 0;
}

.efv-bot-ring {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border: 1px solid rgba(214, 168, 95, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(214, 168, 95, 0.3);
    opacity: 0;
    animation: efv-ring-ripple 3s infinite ease-out;
}

@keyframes efv-ring-ripple {
    0% {
        transform: scale(1);
        opacity: 0;
    }

    30% {
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Mobile Adjustments for Intro */
@media (max-width: 600px) {
    .efv-intro-popup {
        padding: 40px 25px;
        border-radius: 24px;
    }

    .efv-intro-popup h2 {
        font-size: 20px;
    }

    .efv-intro-body p {
        font-size: 14px;
    }

    .efv-intro-actions {
        flex-direction: column-reverse;
    }

    .efv-btn-intro-glow,
    .efv-btn-intro-outline {
        width: 100%;
    }

    #efv-guide-path {
        d: path("M 50 60 Q 60 70, 85 85");
        /* Adjusted curve for mobile centering */
    }
}

/* Registration Flow Styles */
.efv-registration-box-container {
    padding: 10px 20px;
    animation: efv-message-in 0.4s ease forwards;
}

.efv-registration-box {
    background: rgba(20, 24, 35, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    color: #fff;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(214, 168, 95, 0.2);
    margin: 0 auto;
}

.efv-reg-header h4 {
    margin: 0 0 25px 0;
    font-size: 22px;
    font-weight: 700;
    color: #D6A85F;
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
}

.efv-reg-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#efv-reg-email, #efv-reg-name, #efv-reg-phone {
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    font-size: 15px !important;
    color: #fff !important;
    outline: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#efv-reg-email:focus, #efv-reg-name:focus, #efv-reg-phone:focus {
    border-color: rgba(214, 168, 95, 0.4) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 20px rgba(214, 168, 95, 0.1) !important;
}

.efv-reg-btn {
    width: 100%;
    padding: 18px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #C8A96A 0%, #D6A85F 100%) !important;
    color: #0d1117 !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-align: center !important;
    box-shadow: 0 10px 25px rgba(214, 168, 95, 0.2) !important;
}

.efv-reg-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(214, 168, 95, 0.4) !important;
}

.efv-reg-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.efv-reg-error {
    color: #ef4444 !important;
    font-size: 13px !important;
    margin-top: -5px !important;
    font-weight: 500 !important;
}