/* ========================================
   GBFlux Live Chat Widget Styles
   ======================================== */

.gbflux-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Button */
.gbflux-chat-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d9ff 0%, #0ea5e9 50%, #7c3aed 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.gbflux-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 217, 255, 0.6);
}

.gbflux-chat-button:active {
    transform: scale(0.95);
}

.gbflux-chat-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.gbflux-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
}

/* Chat Window */
.gbflux-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: rgba(26, 31, 58, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.gbflux-chat-header {
    background: linear-gradient(135deg, #00d9ff 0%, #0ea5e9 50%, #7c3aed 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gbflux-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gbflux-logo {
    font-size: 1.25rem;
    font-weight: 900;
    color: white;
}

.gbflux-logo .logo-text {
    color: white;
}

.gbflux-logo .logo-accent {
    color: #ffd700;
}

.gbflux-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.gbflux-header-text .status-text {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.gbflux-close-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.gbflux-close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.gbflux-close-button svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Initial Form */
.gbflux-initial-form {
    padding: 32px 24px;
    flex: 1;
    overflow-y: auto;
}

.gbflux-initial-form h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d9ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gbflux-initial-form p {
    margin: 0 0 24px 0;
    color: #cbd5e1;
}

.gbflux-form-group {
    margin-bottom: 16px;
}

.gbflux-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.gbflux-input:focus {
    outline: none;
    border-color: #00d9ff;
    background: rgba(255, 255, 255, 0.08);
}

.gbflux-input::placeholder {
    color: #64748b;
}

.gbflux-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d9ff 0%, #0ea5e9 50%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gbflux-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

.gbflux-submit-btn:active {
    transform: translateY(0);
}

/* Chat Interface */
.gbflux-chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Messages Area */
.gbflux-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gbflux-messages::-webkit-scrollbar {
    width: 6px;
}

.gbflux-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.gbflux-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 3px;
}

.gbflux-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.5);
}

/* Message Bubbles */
.gbflux-message {
    display: flex;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gbflux-message.visitor {
    justify-content: flex-end;
}

.gbflux-message.advisor {
    justify-content: flex-start;
}

.gbflux-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
}

.gbflux-message.visitor .gbflux-message-content {
    background: linear-gradient(135deg, #00d9ff 0%, #0ea5e9 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.gbflux-message.advisor .gbflux-message-content {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.gbflux-message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.gbflux-message-time {
    font-size: 11px;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
}

/* Typing Indicator */
.gbflux-typing {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.gbflux-typing-dots {
    display: flex;
    gap: 4px;
}

.gbflux-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d9ff;
    animation: typingBounce 1.4s infinite;
}

.gbflux-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.gbflux-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

.gbflux-typing-text {
    font-size: 12px;
    color: #94a3b8;
}

/* Input Area */
.gbflux-input-area {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.gbflux-message-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    transition: all 0.2s ease;
}

.gbflux-message-input:focus {
    outline: none;
    border-color: #00d9ff;
    background: rgba(255, 255, 255, 0.08);
}

.gbflux-message-input::placeholder {
    color: #64748b;
}

.gbflux-send-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00d9ff 0%, #0ea5e9 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gbflux-send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.gbflux-send-button:active {
    transform: scale(0.95);
}

.gbflux-send-button svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gbflux-chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .gbflux-chat-window {
        bottom: 90px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        height: calc(100vh - 120px);
    }

    .gbflux-chat-button {
        width: 56px;
        height: 56px;
    }

    .gbflux-chat-icon {
        width: 28px;
        height: 28px;
    }
}