/* ── Assistant App — Chatbot Aesthetic (No Transitions) ── */
.gos-assistant {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1e1e1e;
    color: #fff;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

.gos-assistant-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar (Chat History) */
.gos-assistant-sidebar {
    width: 240px;
    background: #252525;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.gos-assistant-sidebar-header {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.gos-assistant-history {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.gos-assistant-history-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    user-select: none;
    position: relative;
}

.gos-assistant-history-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #eee;
}

.gos-assistant-history-item.active {
    background: var(--accent-muted);
    color: #fff;
}

.gos-assistant-history-item .delete-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #888;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.gos-assistant-history-item:hover .delete-btn {
    display: flex;
}

.gos-assistant-history-item .delete-btn:hover {
    color: #f44336;
}

.gos-assistant-history-item .delete-btn:active {
    transform: translateY(-50%);
    background: transparent;
    border-color: transparent;
    outline: none;
}

/* Main Chat Area */
.gos-assistant-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    position: relative;
}

.gos-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gos-assistant-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    user-select: none;
}

.gos-assistant-welcome i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.2;
}

.gos-assistant-welcome h2 {
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0;
}

.gos-assistant-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.gos-assistant-bubble.user {
    align-self: flex-end;
    background: var(--accent-color);
    color: #fff;
    border-bottom-right-radius: 2px;
    white-space: pre-wrap;
}

.gos-assistant-bubble.ai {
    align-self: flex-start;
    background: #2b2b2b;
    color: #eee;
    border-bottom-left-radius: 2px;
}

/* Markdown Styling */
.gos-assistant-bubble.ai p {
    margin-bottom: 8px;
}

.gos-assistant-bubble.ai p:last-child {
    margin-bottom: 0;
}

.gos-assistant-bubble.ai code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: var(--font-family-mono);
    font-size: 0.85em;
}

.gos-assistant-bubble.ai pre {
    background: #111;
    padding: 12px;
    border-radius: 4px;
    margin: 8px 0;
    overflow-x: auto;
    border: 1px solid #333;
}

.gos-assistant-bubble.ai pre code {
    background: transparent;
    padding: 0;
}

.gos-assistant-bubble.error {
    align-self: center;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    max-width: 90%;
    text-align: center;
}

/* Input Area */
.gos-assistant-input-wrap {
    padding: 8px;
    background: #222;
    border-top: 1px solid #333;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.gos-assistant-input {
    flex: 1;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 12px;
    border-radius: 0;
    outline: none;
    font-size: 0.9rem;
    min-height: 38px;
    max-height: 120px;
    overflow-y: auto;
    resize: none;
    line-height: 1.5;
    box-sizing: border-box;
}

.gos-assistant-input:focus {
    border-color: #666;
}

.gos-assistant-send-btn {
    height: 38px; /* matching roughly 8px padding + 1.5*0.9rem line height + borders */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important;
}

/* Thinking Animation */
.gos-assistant-thinking {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: #2b2b2b;
    border-radius: 8px;
    width: fit-content;
    margin-top: 8px;
}

.gos-assistant-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: gos-assistant-blink 1.4s infinite both;
}

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

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

@keyframes gos-assistant-blink {

    0%,
    80%,
    100% {
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }
}

/* AI Command Feedback */
.gos-assistant-cmd-feedback {
    display: inline-block;
    font-weight: 600;
    font-style: normal;
    color: #fff;
    padding: 2px 0;
    margin: 4px 0;
    font-family: inherit;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.gos-assistant-cmd-feedback.shimmering {
    background: linear-gradient(to right, #fff 0%, #888 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gos-assistant-shimmer 2s linear infinite;
}

.gos-assistant-cmd-feedback.completed {
    color: #888;
    background: none;
    -webkit-text-fill-color: initial;
}

.gos-assistant-save-link {
    cursor: pointer;
    color: var(--accent-color);
    transition: filter 0.2s ease;
}

.gos-assistant-save-link:hover {
    filter: brightness(1.3);
}

.gos-assistant-cmd-feedback.error {
    color: #f44336;
    background: none;
    -webkit-text-fill-color: initial;
}

@keyframes gos-assistant-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}
