/* Chat Styles - SublioStore */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--dark-bg-secondary);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--dark-card);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

.chat-message {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    word-wrap: break-word;
    animation: slideIn 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

/* Typing Animation */
@keyframes typing {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    align-self: flex-start;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

/* Message Header with Neon Name */
.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.message-username {
    font-weight: bold;
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
    to {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
    }
}

.message-separator {
    color: var(--text-secondary);
    font-weight: normal;
}

.message-timestamp {
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 0.8rem;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-message .message-username {
    color: #fff;
}

.user-message .message-separator,
.user-message .message-timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.admin-message {
    align-self: flex-start;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.admin-message .message-username {
    color: #6366f1;
}

.system-message {
    align-self: center;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    border-radius: 12px;
    max-width: 80%;
    padding: 0.625rem 1rem;
    border: 1px dashed rgba(99, 102, 241, 0.3);
}

.message-content {
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.admin-message .message-time {
    color: var(--text-secondary);
}

.no-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-style: italic;
}

.chat-input-container {
    display: flex;
    padding: 1rem;
    gap: 0.75rem;
    background: var(--dark-card);
    border-top: 1px solid var(--border-color);
}

#chatInput {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--dark-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

#chatInput:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#chatInput::placeholder {
    color: var(--text-secondary);
}

.btn-send {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-send:active {
    transform: translateY(0);
}

.btn-send i {
    font-size: 1.2rem;
}

/* Loading Animation */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info Box */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.info-box i {
    font-size: 1.5rem;
    color: var(--primary-green);
    flex-shrink: 0;
}

.info-box h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.info-box ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.info-box ol li {
    margin-bottom: 0.5rem;
}

/* Checkout Styles */
.checkout-content {
    padding: 2rem;
}

.checkout-info {
    max-width: 600px;
    margin: 0 auto;
}

.checkout-summary {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-terms {
    margin: 1.5rem 0;
}

.checkout-terms label {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkout-terms input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkout-terms a {
    color: var(--primary-green);
    text-decoration: none;
}

.checkout-terms a:hover {
    text-decoration: underline;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--primary-green);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-checkout:hover {
    background: var(--primary-green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-checkout:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        height: 400px;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    .checkout-content {
        padding: 1rem;
    }
}
