:root {
    --primary-color: #2d5c73;
    --secondary-color: #67899a;
    --light-color: #b7daeb;
    --primary-font: 'Open Sans', 'Roboto', 'Arial', sans-serif;
    --shadow-sm: 0 4px 10px rgba(45, 92, 115, 0.20);
    --shadow-md: 0 8px 20px rgba(45, 92, 115, 0.20);
    --shadow-lg: 0 20px 50px rgba(45, 92, 115, 0.20);

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#chatbox {
    width: 100%;
    max-width: none;
    background: white;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease;
}

#chatbox:hover {
    box-shadow: var(--shadow-lg);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 9px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    gap: 8px;
    z-index: 100;
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.chat-header p {
    margin: 1px 0 0 0;
    font-size: 0.65rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.close-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid white;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.close-button::before,
.close-button::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: white;
}

.close-button::before {
    transform: rotate(45deg);
}

.close-button::after {
    transform: rotate(-45deg);
}

#chatlog {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

#chatlog::-webkit-scrollbar {
    width: 4px;
}

#chatlog::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#chatlog::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#chatlog::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.msg {
    margin: 16px 0;
    display: flex;
    align-items: flex-end;
    animation: slideIn 0.3s ease-out;
}

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

.msg.user {
    justify-content: flex-end;
}

.msg.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: 14px 16px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    line-height: 1.5;
}

.msg.user .message-bubble {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.msg.bot .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 6px;
    box-shadow: var(--shadow-sm);
}
.timestamp.bot-time{
    font-size: 0.7rem;
    color: #333;
    margin-top: 6px;
    font-weight: 500;
}
.timestamp.user-time {
    font-size: 0.7rem;
    color: #fff;
    margin-top: 6px;
    font-weight: 500;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 12px 20px;
    padding: 0;
    background: white;
    position: sticky;
    top: 58px;
    z-index: 99;
}

.quick-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 12px;
    padding: 8px 4px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(45, 92, 115, 0.1);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.quick-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
     transform: translateY(-1px);
}

.btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 2px;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
}

.icon-inline {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
    margin-right: 4px;
}

.input-container {
    display: flex;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    gap: 12px;
    flex-shrink: 0;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #67899a;
    border-radius: 28px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: var(--primary-font);
    font-weight: 500;
}

#userInput:focus {
    border-color: var(--primary-color);
    background: rgba(45, 92, 115, 0.02);
    box-shadow: 0 0 0 3px rgba(45, 92, 115, 0.08);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}

.send-btn:active {
    transform: scale(0.92);
}

.typing-indicator {
    display: none;
    padding: 12px 20px;
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
    
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

.accordion-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin: 10px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    background: linear-gradient(135deg, #fdf0f7 0%, var(--light-color) 100%);
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    user-select: none;
    border: none;
    width: 100%;
    text-align: left;
    letter-spacing: -0.2px;
}

.accordion-header:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.accordion-header.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.accordion-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    margin-left: 10px;
    flex-shrink: 0;
    display: inline-block;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0 16px;
}

.accordion-content.active {
    max-height: 300px;
    padding: 14px 16px;
    border-top: 1px solid #e9ecef;
    overflow-y: auto;
}

.service-options {
    display: grid;
    gap: 12px;
    margin: 12px 0;
    grid-template-columns: repeat(auto-fit, minmax(150px, auto));
}

.service-option-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    flex: 0 1 auto;
}

.service-option-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.end-chat-section {
    background: linear-gradient(135deg, #fdf0f7 0%, var(--light-color) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    text-align: center;
}

.end-chat-section p {
    font-weight: 600;
    margin: 4px 0;
    color: #333;
}

.end-chat-section .info-text {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
}

.end-chat-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-top: 12px;
}

.end-chat-btn,
.call-support-btn,
.visit-website-btn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.end-chat-btn {
    background: #dc3545;
    color: white;
}

.end-chat-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.call-support-btn {
    background: #28a745;
    color: white;
}

.call-support-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.visit-website-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.visit-website-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-card {
    border-radius: 14px;
    padding: 14px;
    margin: 10px 0;
    border-left: 5px solid var(--primary-color);
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #e6f2f8 0%, #c9e4f0 100%);
    border-left-color: var(--secondary-color);
}

.product-image {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 1rem;
    letter-spacing: -0.3px;
}

.product-detail {
    font-size: 0.9rem;
    margin: 4px 0;
    color: #333;
    font-weight: 500;
}

.price {
    color: #28a745;
    font-weight: 700;
    font-size: 1.1rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85rem;
    margin-right: 8px;
    font-weight: 500;
}

.discount {
    color: #28a745;
    font-weight: 700;
    font-size: 0.8rem;
}

.feature-item {
    background: white;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.feature-item:hover {
    border-left-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.feature-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.step-item {
    background: white;
    padding: 14px;
    margin: 10px 0;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    margin-right: 10px;
    flex: 1;
    min-width: 150px;
}

.step-item:hover {
    border-left-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.step-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-right: 10px;
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.step-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 28px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.modal-close:hover {
    background: var(--secondary-color);
    transform: rotate(90deg) scale(1.1);
    box-shadow: var(--shadow-md);
}

.modal-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.modal-image {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #fdf0f7 0%, var(--light-color) 100%);
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    flex: 1;
}

.modal-details {
    margin: 16px 0 12px 0;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.detail-value {
    color: #333;
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.book-demo-btn,
.order-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    margin: 0;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.2px;
}

.book-demo-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.book-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.order-btn {
    background: #28a745;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.demo-form {
    background: linear-gradient(135deg, #fdf0f7 0%, var(--light-color) 100%);
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid var(--light-color);
}

.form-group {
    margin: 14px 0;
}

.form-label {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-family: var(--primary-font);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 500;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(45, 92, 115, 0.1);
    background: rgba(45, 92, 115, 0.02);
}

.submit-demo-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.2px;
}

.submit-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    #chatbox {
        display: flex;
        flex-direction: column;
        max-height: 100vh;
    }

    .chat-header {
        padding: 9px 20px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .chat-header h2 {
        font-size: 1.1rem;
    }

    .chat-header p {
        font-size: 0.75rem;
    }

    .quick-actions {
        position: sticky;
        top: 58px;
        z-index: 99;
        margin: 10px 14px;
        gap: 10px;
    }

    #chatlog {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        padding-bottom: 120px;
    }

    .input-container {
        padding: 12px 14px;
        flex-shrink: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
        z-index: 98;
        max-width: 450px;
        margin: 0 auto;
        width: 100%;
    }

    .quick-btn {
        padding: 5px 2px;
        font-size: 0.7rem;
        min-height: 40px;
    }

    .product-card {
        flex-direction: row;
    }

    .product-image {
        width: 60px;
        height: 60px;
    }

    .modal-content {
        padding: 20px;
        border-radius: 16px;
    }

    .modal-layout {
        flex-direction: column;
        gap: 12px;
    }

    .modal-image {
        width: 100%;
        height: 150px;
    }

    .modal-buttons {
        flex-direction: row;
        gap: 10px;
    }

    .book-demo-btn,
    .order-btn {
        width: 100%;
    }

    .end-chat-buttons {
        flex-direction: column;
    }

    .end-chat-btn,
    .call-support-btn,
    .visit-website-btn {
        width: 100%;
    }
}

/* Added active state styling for quick buttons */
    .quick-btn.active {
      background: var(--primary-color);
      color: white;
      border-color: var(--primary-color);
      box-shadow: var(--shadow-md);
    }

    .toast {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #ff4444;
        color: white;
        padding: 10px 18px;
        border-radius: 6px;
        display: none;
    }