/* GALIA VHOST WIDGET STYLES */

.galia-vhost {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: inherit;
}

.galia-vhost__orb {
    background: var(--color-accent, #0284c7);
    color: #fff;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.galia-vhost__orb:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.galia-vhost__box {
    position: fixed;
    bottom: 70px;
    right: 30px;
    width: 360px;
    height: 500px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.galia-vhost__box.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.galia-vhost__header {
    background: var(--color-accent, #0284c7);
    color: #fff;
    padding: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.galia-vhost__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.galia-vhost__close:hover {
    color: #fff;
}

.galia-vhost__messages {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.galia-vhost-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.galia-vhost-msg--ai {
    background: #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.galia-vhost-msg--user {
    background: var(--color-accent, #0284c7);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.galia-vhost-msg.loading {
    display: flex;
    gap: 4px;
    align-items: center;
    background: transparent;
    color: #94a3b8;
}

.galia-vhost-msg.loading .dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: galia-bounce 1.4s infinite ease-in-out both;
}

.galia-vhost-msg.loading .dot:nth-child(1) { animation-delay: -0.32s; }
.galia-vhost-msg.loading .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes galia-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.galia-vhost__input-area {
    display: flex;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    padding: 8px;
}

.galia-vhost__input-area input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.95rem;
}

.galia-vhost__input-area button {
    padding: 0 16px;
    background: transparent;
    border: none;
    color: var(--color-accent, #0284c7);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galia-vhost__input-area button:hover {
    transform: scale(1.1);
}

.galia-vhost__input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Multi-Thread Views */
.galia-vhost__view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.galia-vhost-threads-content {
    padding: 16px;
    background: #f8fafc;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.galia-vhost-new-chat-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px dashed var(--color-accent, #0284c7);
    color: var(--color-accent, #0284c7);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.galia-vhost-new-chat-btn:hover {
    background: var(--color-accent, #0284c7);
    color: #fff;
}

.galia-vhost-threads-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.galia-vhost-thread-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.galia-vhost-thread-item:hover {
    border-color: var(--color-accent, #0284c7);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.galia-vhost-thread-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.galia-vhost-thread-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .galia-vhost {
        bottom: 20px;
        right: 20px;
    }
    .galia-vhost__box {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0;
        border: none;
        z-index: 9999999;
        transform: translateY(20px);
    }
    .galia-vhost__box.is-active {
        transform: translateY(0);
    }
    .galia-vhost__orb {
        padding: 12px 18px;
    }
}
