.gpt-left-chat-container {
    position: fixed;
    z-index: 9999;
    font-family: inherit;
    color: #e5e7eb;
}

.gpt-left-chat-pos-bottom_left {
    left: 20px;
    bottom: 20px;
}
.gpt-left-chat-pos-bottom_right {
    right: 20px;
    bottom: 20px;
}
.gpt-left-chat-pos-top_left {
    left: 20px;
    top: 20px;
}
.gpt-left-chat-pos-top_right {
    right: 20px;
    top: 20px;
}

.gpt-left-chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.gpt-left-chat-toggle:hover {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.9);
}

.gpt-left-chat-toggle-icon {
    font-size: 16px;
}

.gpt-left-chat-toggle-text {
    font-weight: 500;
}

.gpt-left-chat-window {
    position: absolute;
    width: 340px;
    max-height: 70vh;
    background: #020617;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
    display: none;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
}

.gpt-left-chat-pos-bottom_left .gpt-left-chat-window,
.gpt-left-chat-pos-bottom_right .gpt-left-chat-window {
    bottom: 56px;
}

.gpt-left-chat-pos-top_left .gpt-left-chat-window,
.gpt-left-chat-pos-top_right .gpt-left-chat-window {
    top: 56px;
}

.gpt-left-chat-pos-bottom_left .gpt-left-chat-window,
.gpt-left-chat-pos-top_left .gpt-left-chat-window {
    left: 0;
    right: auto;
}

.gpt-left-chat-pos-bottom_right .gpt-left-chat-window,
.gpt-left-chat-pos-top_right .gpt-left-chat-window {
    right: 0;
    left: auto;
}

.gpt-left-chat-window-open {
    display: flex;
    flex-direction: column;
}

.gpt-left-chat-header {
    background: radial-gradient(circle at 0 0, #22c55e 0, #16a34a 10%, #111827 55%);
    color: #f9fafb;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gpt-left-chat-title {
    font-size: 14px;
    font-weight: 600;
}

.gpt-left-chat-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.gpt-left-chat-close:hover {
    opacity: 1;
}

.gpt-left-chat-messages {
    padding: 10px;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #000000 100%);
    flex: 1 1 auto;
    overflow-y: auto;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gpt-left-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.gpt-left-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.gpt-left-chat-messages::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 999px;
}

.gpt-left-chat-msg {
    max-width: 90%;
    padding: 7px 10px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
}

.gpt-left-chat-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #eff6ff;
    border-bottom-right-radius: 4px;
}

.gpt-left-chat-msg-assistant {
    align-self: flex-start;
    background: #020617;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    border-bottom-left-radius: 4px;
}

.gpt-left-chat-form {
    padding: 8px;
    background: #020617;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gpt-left-chat-input {
    width: 100%;
    resize: none;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    outline: none;
    transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gpt-left-chat-input::placeholder {
    color: #6b7280;
}

.gpt-left-chat-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
    background: #020617;
}

.gpt-left-chat-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gpt-left-chat-limit {
    font-size: 11px;
    color: #9ca3af;
}

.gpt-left-chat-send {
    padding: 6px 14px;
    font-size: 13px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.6);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    white-space: nowrap;
}

.gpt-left-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.8);
    filter: brightness(1.05);
}

.gpt-left-chat-send:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.5);
}

.gpt-left-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 40px;
}

.gpt-left-chat-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #9ca3af;
    animation: gpt-left-chat-bounce 1s infinite;
}

.gpt-left-chat-dot:nth-child(2) {
    animation-delay: 0.15s;
}
.gpt-left-chat-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes gpt-left-chat-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .gpt-left-chat-window {
        width: 92vw;
        left: 4vw !important;
        right: auto !important;
        bottom: 64px;
        top: auto;
    }

    .gpt-left-chat-toggle {
        padding: 8px 12px;
    }
}
