* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4), 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
    border: 2px solid #43e97b;
}

#chatbot-toggle-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    background: transparent;
    transition: transform 0.3s;
}

#chatbot-toggle:hover #chatbot-toggle-img {
    transform: scale(1.1) rotate(-8deg);
}

#chatbot-window {
    width: 420px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    background: #fff;
    position: fixed;
    bottom: 80px;
    right: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chatbot-header {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 60px; /* Adjust as needed */
}

#chatbot-logo {
    height: 48px;      /* Adjust as needed */
    width: auto;
    object-fit: contain;
    margin-right: 12px;
    display: block;
}

#chatbot-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa, #e9ecef);
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 175, 80, 0.3) transparent;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.3);
    border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.5);
}

.chat-message {
    margin: 12px 0;
    animation: fadeInScale 0.4s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.chat-message.user {
    text-align: right;
    animation-delay: 0.1s;
}

.bubble {
    display: inline-block;
    padding: 12px 16px;
    max-width: 80%;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.user .bubble {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border-radius: 20px 20px 5px 20px;
    position: relative;
}

.user .bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top-color: #4caf50;
    border-left-color: #4caf50;
}

.bot .bubble {
    background: linear-gradient(135deg, #ffffff, #f1f3f4);
    color: #333;
    border-radius: 20px 20px 20px 5px;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.bot .bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -5px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top-color: #ffffff;
    border-right-color: #ffffff;
}

#chatbot-input-area {
    display: flex;
    padding: 16px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 20px 20px;
    gap: 12px;
    border-radius: 20px;
    margin: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
    background: #fff;
    border: 1.5px solid #e0e0e0;
    align-items: center;
}

#chatbot-input {
    border-radius: 20px;
    border: none;
    background: #f1f3f4;
    padding: 12px 16px;
    font-size: 15px;
    margin-right: 8px;
    outline: none;
    transition: box-shadow 0.2s;
}

#chatbot-input:focus {
    box-shadow: 0 0 0 2px #43e97b44;
    background: #fff;
}

#chatbot-send-btn {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.10);
    transition: background 0.2s, transform 0.1s;
}

#chatbot-send-btn:hover {
    background: linear-gradient(135deg, #38f9d7, #43e97b);
    transform: scale(1.08);
}

.suggestions {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    animation: fadeInScale 0.5s ease-out;
}

/* Green pill-shaped buttons with white outline and unified font */
.suggestion-button,
.company-button,
.website-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 8px 6px 0;
    padding: 6px 16px 6px 12px;
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
    border: 2px solid #fff; /* White outline */
    border-radius: 24px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.10);
    transition: 
        background 0.3s cubic-bezier(.4,0,.2,1),
        box-shadow 0.2s cubic-bezier(.4,0,.2,1),
        transform 0.1s cubic-bezier(.4,0,.2,1);
    outline: none;
    position: relative;
    overflow: hidden;
    min-width: 80px;
    height: 32px;
}

/* Special style for TGPS and TETSOL company buttons */
.company-button.main-company {
    min-width: 110px;
    height: 40px;
    padding: 10px 24px 10px 18px;
    font-size: 1.08rem;
    background: linear-gradient(135deg, #4caf50, #388e3c) !important;
    color: #fff !important;
    border: 2px solid #fff;
    box-shadow: 0 4px 16px 0 rgba(76, 175, 80, 0.18);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
    transition: background 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), transform 0.1s cubic-bezier(.4,0,.2,1);
}

.company-button.main-company:hover,
.company-button.main-company:active {
    background: linear-gradient(135deg, #388e3c, #4caf50) !important;
    color: #fff !important;
    transform: scale(1.07);
}

/* Smaller white icon on the left */
.suggestion-button svg,
.company-button svg,
.website-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    flex-shrink: 0;
    background: transparent;
}

/* Hover and active effects */
.suggestion-button:hover,
.company-button:hover,
.website-btn:hover {
    background: linear-gradient(90deg, #38f9d7 0%, #43e97b 100%);
    box-shadow: 0 4px 16px 0 rgba(67, 233, 123, 0.18);
    transform: scale(1.04);
}

.suggestion-button:active,
.company-button:active,
.website-btn:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px 0 rgba(67, 233, 123, 0.15);
}

/* Disabled/used state */
.suggestion-button.used,
.suggestion-button:disabled,
.company-button:disabled,
.website-btn:disabled {
    background: #e0f2f1;
    color: #bdbdbd;
    border-color: #eee;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Optional: Ripple effect on click */
.suggestion-button::after,
.company-button::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    background: rgba(76,175,80,0.12);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}
.suggestion-button:active::after,
.company-button:active::after {
    width: 180%;
    height: 180%;
    opacity: 1;
    transition: 0s;
}

.typing-indicator {
    margin: 12px 0;
    text-align: left;
    animation: fadeInScale 0.4s ease-out;
}

.typing-indicator .bubble {
    background: linear-gradient(135deg, #ffffff, #f1f3f4);
    color: #333;
    border-radius: 20px 20px 20px 5px;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    padding: 16px 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator .bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -5px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top-color: #ffffff;
    border-right-color: #ffffff;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    #chatbot-window {
        width: 300px;
        height: 450px;
        right: 10px;
        bottom: 80px;
    }
    
    #chatbot-toggle {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .bubble {
        max-width: 85%;
    }
}

#company-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 16px 0;
    align-items: stretch;
    overflow-y: auto;
    max-height: 420px; /* Adjust as needed */
}

.company-button {
    display: flex;
    align-items: center;
    gap: 16px;
    border: none;
    border-radius: 18px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    outline: none;
}

.company-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0.95;
}

.company-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-right: 14px;
    padding: 2px;
}