/* Chillstrom Chat Bot Frontend Styles */

.chillstrom-chat-widget {
    position: fixed !important;
    z-index: 9999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
    top: auto !important;
}

.chillstrom-chat-widget.bottom-right {
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
}

.chillstrom-chat-widget.bottom-left {
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
}

.chillstrom-chat-toggle {
    background: #007bff;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 80px;
    border: none;
}

.chillstrom-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: #0056b3;
}

.chillstrom-chat-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
}

.chillstrom-chat-title {
    font-weight: 600;
    font-size: 15px;
}

.chillstrom-chat-container {
    position: absolute;
    bottom: 80px;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #2d2d2d;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chillstrom-chat-widget.bottom-left .chillstrom-chat-container {
    left: 0;
}

.chillstrom-chat-widget.bottom-right .chillstrom-chat-container {
    right: 0;
}

.chillstrom-chat-header {
    background: #1a1a1a;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chillstrom-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chillstrom-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chillstrom-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chillstrom-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #2d2d2d;
}

.chillstrom-chat-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s;
}

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

.chillstrom-chat-message-user {
    justify-content: flex-end;
}

.chillstrom-chat-message-assistant {
    justify-content: flex-start;
    position: relative;
    padding-top: 8px;
    margin-top: 5px;
}

.chillstrom-chat-badge {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #555;
    color: #e0e0e0;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    white-space: nowrap;
}

.chillstrom-chat-badge::before {
    content: '💬';
    font-size: 10px;
}

.chillstrom-chat-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
}

.chillstrom-chat-message-user .chillstrom-chat-message-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.chillstrom-chat-message-assistant .chillstrom-chat-message-content {
    background: #3d3d3d;
    color: #ffffff !important;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.chillstrom-chat-input-container {
    padding: 15px;
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chillstrom-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #2d2d2d;
    color: #ffffff !important;
}

.chillstrom-chat-input::placeholder {
    color: #999 !important;
}

.chillstrom-chat-input:focus {
    border-color: #007bff;
    background: #333;
    color: #ffffff !important;
}

.chillstrom-chat-send {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
}

.chillstrom-chat-send svg {
    width: 20px;
    height: 20px;
}

.chillstrom-chat-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
    background: #0056b3;
}

.chillstrom-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chillstrom-chat-typing {
    padding: 10px 20px;
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 12px;
    font-style: italic;
}

/* Scrollbar styling */
.chillstrom-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chillstrom-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chillstrom-chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chillstrom-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chillstrom-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
        left: 10px !important;
        right: 10px !important;
    }
    
    .chillstrom-chat-widget.bottom-right,
    .chillstrom-chat-widget.bottom-left {
        bottom: 15px;
        left: 15px;
        right: auto;
    }
    
    .chillstrom-chat-toggle {
        padding: 14px 18px;
        min-width: 70px;
    }
    
    .chillstrom-chat-title {
        font-size: 14px;
    }
    
    .chillstrom-chat-icon {
        font-size: 18px;
    }
}

/* Tablet responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .chillstrom-chat-container {
        width: 380px;
        height: 550px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .chillstrom-chat-container {
        width: calc(100vw - 10px);
        height: calc(100vh - 80px);
        bottom: 75px;
        left: 5px !important;
        right: 5px !important;
    }
    
    .chillstrom-chat-widget.bottom-left {
        bottom: 10px;
        left: 10px;
    }
    
    .chillstrom-chat-header h3 {
        font-size: 16px;
    }
    
    .chillstrom-chat-messages {
        padding: 15px;
    }
    
    .chillstrom-chat-message-content {
        max-width: 85%;
        font-size: 14px;
    }
}

