/* Sahara Shop Premium Chatbot Styling */

#sahara-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#sahara-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #111111;
    color: #c49a45;
    border: 1px solid rgba(196, 154, 69, 0.2);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#sahara-chat-toggle:hover {
    transform: scale(1.05) translateY(-2px);
    background-color: #1a1a1a;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#sahara-chat-container {
    width: 380px;
    height: 520px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 154, 69, 0.15);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.sahara-chat-widget-closed #sahara-chat-container {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.sahara-chat-widget-open #sahara-chat-container {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.sahara-chat-widget-open #sahara-chat-toggle {
    display: none;
}

.sahara-chat-header {
    background-color: #111111;
    color: #ffffff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(196, 154, 69, 0.2);
}

.sahara-chat-header-avatar {
    width: 36px;
    height: 36px;
    background-color: #c49a45;
    border-radius: 50%;
    margin-right: 12px;
    background-image: radial-gradient(circle, #dfbc76 10%, #c49a45 90%);
}

.sahara-chat-header-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

.status-indicator {
    font-size: 0.75rem;
    color: #4cd964;
    display: flex;
    align-items: center;
}

.status-indicator::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #4cd964;
    border-radius: 50%;
    margin-right: 5px;
}

#sahara-chat-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.6rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

#sahara-chat-close:hover {
    color: #fff;
}

#sahara-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #faf9f6;
}

#sahara-chat-messages::-webkit-scrollbar {
    width: 6px;
}
#sahara-chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.sahara-chat-message {
    display: flex;
    max-width: 80%;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.msg-assistant {
    align-self: flex-start;
}
.msg-assistant .message-content {
    background-color: #ffffff;
    color: #333333;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.msg-user {
    align-self: flex-end;
    margin-left: auto;
}
.msg-user .message-content {
    background-color: #c49a45;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

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

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

#sahara-chat-input-form {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#sahara-chat-user-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 0.88rem;
    outline: none;
    transition: border 0.2s;
}

#sahara-chat-user-input:focus {
    border-color: #c49a45;
}

#sahara-chat-send {
    background-color: #111;
    color: #c49a45;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#sahara-chat-send:hover {
    background-color: #c49a45;
    color: #fff;
}

@media (max-width: 480px) {
    #sahara-chat-widget {
        right: 15px;
        bottom: 15px;
    }
    #sahara-chat-container {
        width: calc(100vw - 30px);
        height: 450px;
        margin-bottom: 10px;
    }
}
