/* Chat Widget CSS - Glassmorphism Style */
:root {
    --chat-primary: #ff6b00;
    /* Sportcube Orange */
    --chat-bg: rgba(18, 18, 20, 0.85);
    --chat-backdrop: blur(12px);
    --chat-border: 1px solid rgba(255, 255, 255, 0.1);
    --chat-text: #ffffff;
    --chat-user-bg: #ff6b00;
    --chat-bot-bg: rgba(255, 255, 255, 0.1);
}

/* Floating Button */
#sc-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chat-primary);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
}

#sc-chat-trigger:hover {
    transform: scale(1.1);
}

#sc-chat-trigger i {
    color: white;
    font-size: 24px;
    pointer-events: none;
}

/* Chat Window */
#sc-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: var(--chat-bg);
    backdrop-filter: var(--chat-backdrop);
    -webkit-backdrop-filter: var(--chat-backdrop);
    border: var(--chat-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

#sc-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.sc-chat-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: var(--chat-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-chat-title {
    font-weight: 700;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sc-chat-status-dot {
    width: 8px;
    height: 8px;
    background: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 5px #4cd964;
}

.sc-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.sc-chat-close:hover {
    color: white;
}

/* Messages Area */
.sc-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sc-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.sc-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sc-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sc-message.user {
    align-self: flex-end;
    background: var(--chat-user-bg);
    color: white;
    border-bottom-right-radius: 2px;
}

.sc-message.bot {
    align-self: flex-start;
    background: var(--chat-bot-bg);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    width: fit-content;
}

.sc-typing span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.sc-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.sc-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Input Area */
.sc-chat-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: var(--chat-border);
    display: flex;
    gap: 10px;
}

.sc-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: background 0.2s;
}

.sc-chat-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.sc-chat-send {
    background: var(--chat-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.sc-chat-send:active {
    transform: scale(0.95);
}

.sc-chat-send:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #sc-chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}