/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

/* Floating Bubble (Mug Shape) */
.chatbot-bubble {
    width: 65px;
    height: 55px;
    background: linear-gradient(135deg, var(--clr-brown-dark), var(--clr-brown));
    border-radius: 8px 8px 25px 25px; /* Cup shape */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(92, 59, 46, 0.7);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: pulse-glow 2.5s infinite;
    position: relative;
    margin-right: 15px; /* Space for the handle */
}

/* Mug Handle */
.chatbot-bubble::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 12px;
    width: 18px;
    height: 25px;
    border: 4px solid var(--clr-brown-dark);
    border-left: none;
    border-radius: 0 15px 15px 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 59, 46, 0.6);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(92, 59, 46, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(92, 59, 46, 0);
    }
}

.chatbot-bubble:hover {
    animation: wobble 0.6s infinite ease-in-out;
}

@keyframes wobble {
    0% { transform: rotate(0deg) scale(1.1); }
    25% { transform: rotate(5deg) scale(1.1); }
    75% { transform: rotate(-5deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1.1); }
}

.chatbot-bubble i {
    width: 28px;
    height: 28px;
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Header */
.chat-header {
    background: linear-gradient(to right, var(--clr-brown-dark), #4a2c1a);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: #ffffff !important; /* Force white to override main styles */
}

.chat-header p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8) !important;
}

.info-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.info-btn i {
    width: 16px;
    height: 16px;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: var(--clr-text);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message.user {
    align-self: flex-end;
    background: var(--clr-orange);
    color: white;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
}

.chat-input-area button {
    background: var(--clr-orange);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-input-area button:hover {
    background: #e67a2e;
}

/* Options */
.chat-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 5px;
}

.option-btn {
    padding: 10px 5px;
    background: white;
    border: 1px solid var(--clr-orange);
    color: var(--clr-orange);
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-btn:hover, .option-btn.selected {
    background: var(--clr-orange);
    color: white;
}

.chat-custom-details {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid rgba(201, 138, 46, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--clr-text);
    resize: none;
    outline: none;
    transition: all 0.2s;
}

.chat-custom-details:focus {
    background: #fff;
    border-color: var(--clr-orange);
    box-shadow: 0 4px 12px rgba(201, 138, 46, 0.1);
}

.chat-confirm-btn {
    width: 100%;
    padding: 12px;
    background: var(--clr-orange);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.chat-confirm-btn:hover {
    background: var(--clr-orange-hover);
    transform: translateY(-1px);
}

.chat-confirm-btn:disabled {
    opacity: 0.4;
    background: #ccc;
    cursor: not-allowed;
}

.review-box {
    background: #fdfaf5;
    border: 1px solid rgba(201, 138, 46, 0.2);
    padding: 15px;
    font-size: 0.85rem;
    color: var(--clr-text);
}

.review-box strong {
    color: var(--clr-orange);
    display: inline-block;
    width: 60px;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
        right: -10px;
    }
}
