/* --- Premium Chatbot Styling --- */
:root {
    --chat-gold: #d4af37;
    --chat-gold-gradient: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #b4942b 100%);
    --chat-obsidian: #0a0b10;
    --chat-card: #16181d;
    --chat-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --chat-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
}

#imprshr-chatbot {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
}

/* Floating Icon */
.chatbot-bubble {
    width: 65px;
    height: 65px;
    background: var(--chat-gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--chat-shadow), 0 0 20px rgba(212, 175, 55, 0.2);
    transition: var(--chat-transition);
    border: none;
    outline: none;
    animation: bubbleGlow 3s infinite ease-in-out;
}

@keyframes bubbleGlow {
    0% { transform: scale(1); box-shadow: var(--chat-shadow), 0 0 0 0 rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.03); box-shadow: var(--chat-shadow), 0 0 25px rgba(212, 175, 55, 0.6); }
    100% { transform: scale(1); box-shadow: var(--chat-shadow), 0 0 0 0 rgba(212, 175, 55, 0.4); }
}

.chatbot-bubble:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(212, 175, 55, 0.8);
}

.chatbot-bubble svg {
    width: 30px;
    height: 30px;
    stroke: #000;
    transition: var(--chat-transition);
}

.chatbot-bubble:hover svg {
    transform: rotate(10deg) scale(1.1);
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #0d0e12;
    background-image: radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%), linear-gradient(135deg, rgba(13, 14, 18, 0.99) 0%, rgba(10, 11, 16, 1) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,0.8);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--chat-transition);
}

.chatbot-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.chat-header {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.chat-header .logo-text {
    margin: 0;
    line-height: 1;
}





.chat-close {
    cursor: pointer;
    color: #fff; /* Brighter by default */
    transition: all 0.3s;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}
.chat-close:hover { 
    color: var(--chat-gold);
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}


.chatbot-brand-icon {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.chatbot-brand-icon span {
    background: var(--chat-gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.chat-body {
    scroll-behavior: smooth;

    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-gold) transparent;
}

/* Message Bubbles */
.msg-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInMsg 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    width: 100%;
}

@keyframes fadeInMsg {
    to { opacity: 1; transform: translateY(0); }
}

.msg-wrapper.bot { align-items: flex-start; }
.msg-wrapper.user { align-items: flex-end; }

.msg-header {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msg-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}

.avatar-bot {
    background: var(--chat-gold-gradient);
    color: #000;
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

.avatar-user {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.msg-bot {
    background: rgba(255,255,255,0.05);
    color: #eee;
    border-top-left-radius: 2px;
    border: 1px solid rgba(255,255,255,0.02);
}

.msg-user {
    background: var(--chat-gold);
    color: #000;
    border-top-right-radius: 2px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(212,175,55,0.15);
}

.msg-time {
    font-size: 9px;
    margin-top: 6px;
    color: rgba(255,255,255,0.3);
    padding: 0 5px;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    opacity: 0;
    animation: fadeInMsg 0.5s 0.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.opt-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--chat-gold);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--chat-transition);
}

.opt-btn:hover {
    background: var(--chat-gold);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    padding: 12px 18px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    width: fit-content;
    display: none;
    gap: 5px;
    margin-bottom: 10px;
    align-self: flex-start;
    transition: opacity 0.3s ease;
}

.typing-indicator.active {
    display: flex;
    animation: fadeInMsg 0.3s ease forwards;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--chat-gold);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Input Area */
.chat-footer {
    padding: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
}

.chat-send {
    background: var(--chat-gold);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Mobile Responsive Optimization */
@media (max-width: 480px) {
    #imprshr-chatbot {
        bottom: 20px;
        right: 20px;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 75vh;
        bottom: 75px;
        right: 0;
        border-radius: 15px;
    }
    .chatbot-bubble {
        width: 54px;
        height: 54px;
    }
    .opt-btn {
        padding: 10px 18px;
        font-size: 13px;
        width: 100%;
        text-align: left;
    }
    .chat-msg {
        max-width: 90%;
        font-size: 14px;
    }
}
/* --- Weather Integration Styles --- */
.chat-weather-report {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    margin-top: 10px;
    font-size: 13px;
    color: #fff;
    line-height: 1.4;
}

.chat-weather-report strong {
    color: var(--chat-gold);
    font-size: 15px;
    display: block;
    margin-bottom: 5px;
}

@media (max-width: 480px) {
    .chat-weather-report {
        padding: 10px;
        font-size: 12px;
    }
}

/* --- Interactive Lead Form Styles --- */
.chat-lead-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
    width: 100%;
    animation: fadeInMsg 0.4s ease forwards;
}

.chat-lead-form h4 {
    color: var(--chat-gold);
    margin: 0 0 12px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.chat-form-group {
    margin-bottom: 12px;
}

.chat-form-group label {
    display: block;
    color: #a0a0a0;
    font-size: 10px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.chat-input-field, .chat-select-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    transition: var(--chat-transition);
    outline: none;
}

.chat-select-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4af37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 8px auto;
}

.chat-select-field option {
    background: #16181d;
    color: #fff;
}

.chat-input-field:focus, .chat-select-field:focus {
    border-color: var(--chat-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.chat-submit-btn {
    width: 100%;
    background: var(--chat-gold-gradient);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--chat-transition);
    margin-top: 5px;
}

.chat-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.chat-submit-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
