/* views/css/smartchatbot.css */
#smartchatbot-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

#smartchatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#smartchatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#smartchatbot-button i {
    color: white;
    font-size: 24px;
}

#smartchatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.3s ease forwards;
}

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

.smartchatbot-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.smartchatbot-title {
    font-weight: 600;
    font-size: 16px;
}

.smartchatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.smartchatbot-close:hover {
    opacity: 1;
}

.smartchatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smartchatbot-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.smartchatbot-message.user {
    background: #E3F2FD;
    color: #1565C0;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.smartchatbot-message.bot {
    background: #F5F5F5;
    color: #424242;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.smartchatbot-message.error {
    background: #ffebee;
    color: #c62828;
    align-self: center;
    font-style: italic;
}

.smartchatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    background: #F5F5F5;
}

.smartchatbot-suggestion {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #424242;
}

.smartchatbot-suggestion:hover {
    background: #E3F2FD;
    border-color: #90CAF9;
    color: #1565C0;
}

.smartchatbot-input {
    display: flex;
    align-items: center;
    padding: 12px 15px !important;
    border-top: 1px solid #E0E0E0;
    background: white;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.smartchatbot-input textarea {
    flex: 1;
    border: 1px solid #E0E0E0;
    padding: 10px 15px;
    font-size: 14px !important;
    line-height: 1.4 !important;
    outline: none;
    background: white !important;
    border-radius: 20px !important;
    resize: none !important;
    min-height: 40px !important;
    max-height: 100px !important;
    transition: border-color 0.2s ease !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    color: inherit !important;
    font-family: inherit !important;
}

.smartchatbot-input textarea:focus {
    border-color: var(--primary-color, #1565C0) !important;
    outline: none !important;
    box-shadow: none !important;
}

.smartchatbot-input button {
    width: 40px;
    height: 40px;
    background: var(--primary-color, #1565C0);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.smartchatbot-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.smartchatbot-input button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

.smartchatbot-message {
    animation: slideUp 0.3s ease;
}

/* Responsive Design */
@media (max-width: 480px) {
    #smartchatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0;
    }

    .smartchatbot-message {
        max-width: 90%;
    }
}

/* Scrollbar Styling */
.smartchatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.smartchatbot-messages::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.smartchatbot-messages::-webkit-scrollbar-thumb {
    background: #BDBDBD;
    border-radius: 3px;
}

.smartchatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #9E9E9E;
}

/* Loading Animation */
.smartchatbot-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #F5F5F5;
    border-radius: 15px;
    align-self: flex-start;
    margin-bottom: 5px;
}

.smartchatbot-typing span {
    width: 8px;
    height: 8px;
    background: #BDBDBD;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.smartchatbot-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.smartchatbot-widget {
    position: fixed !important;
    bottom: 20px !important;
    z-index: 2147483647 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.smartchatbot-widget *,
.smartchatbot-widget *::before,
.smartchatbot-widget *::after {
    box-sizing: border-box;
    pointer-events: auto;
}

.smartchatbot-widget[data-position="right"] {
    right: 20px !important;
}

.smartchatbot-widget[data-position="left"] {
    left: 20px !important;
}

.smartchatbot-toggle {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s !important;
}

.smartchatbot-toggle:hover {
    transform: scale(1.1) !important;
}

.smartchatbot-toggle i {
    color: white !important;
    font-size: 24px !important;
}

.smartchatbot-window {
    position: fixed !important;
    z-index: 999999999 !important;
    bottom: 90px !important;
    width: 350px !important;
    min-width: 300px !important;
    min-height: 400px !important;
    background: white !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15) !important;
    flex-direction: column !important;
    overflow: hidden !important;
    display: none;
    transition: all 0.3s ease !important;
    opacity: 0;
    transform: translateY(20px);
    max-height: calc(100vh - 120px) !important;
    margin: 0 10px !important;
}

.smartchatbot-window.open {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.smartchatbot-widget[data-position="right"] .smartchatbot-window {
    right: 0 !important;
}

.smartchatbot-widget[data-position="left"] .smartchatbot-window {
    left: 0 !important;
}

.smartchatbot-header {
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.smartchatbot-title {
    color: white !important;
    margin: 0 8px 0 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.smartchatbot-close {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 28px !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s !important;
}

.smartchatbot-close:hover {
    opacity: 1 !important;
}

@media (max-width: 480px) {
    .smartchatbot-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .smartchatbot-toggle {
        width: 50px !important;
        height: 50px !important;
    }
    
    .smartchatbot-toggle i {
        font-size: 20px !important;
    }
    
    .smartchatbot-header {
        padding: 12px 16px !important;
    }
    
    .smartchatbot-title {
        font-size: 15px !important;
    }
    
    .smartchatbot-close {
        font-size: 24px !important;
    }
    
    .smartchatbot-input textarea {
        font-size: 16px !important;
    }
    
    .smartchatbot-widget {
        bottom: 10px !important;
        right: 10px !important;
    }
}
