@charset "utf-8";
/* CSS Document */

.uniwriter-chat-app {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.uniwriter-chat-topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.uniwriter-chat-branding h3 {
    margin: 0 0 0.2rem;
}

.uniwriter-chat-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

.uniwriter-chat-assistant-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 220px;
}

.uniwriter-chat-assistant-picker label {
    font-size: 0.9rem;
    color: #555;
}

.uniwriter-chat-assistant-select {
    width: 100%;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.uniwriter-chat-messages {
    min-height: 420px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0 0 1rem;
    background: transparent;
}

.uniwriter-chat-message {
    display: flex;
    margin-bottom: 1rem;
}

.uniwriter-chat-message--user {
    justify-content: flex-end;
}

.uniwriter-chat-message--assistant {
    justify-content: flex-start;
}

.uniwriter-chat-bubble {
    max-width: 78%;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.uniwriter-chat-message--user .uniwriter-chat-bubble {
    background: #e9f2ff;
}

.uniwriter-chat-message--assistant .uniwriter-chat-bubble {
    background: #f3f4f6;
}

.uniwriter-chat-composer-wrap {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 0.75rem;
}

.uniwriter-chat-composer {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #d0d5dd;
    border-radius: 20px;
    background: #fff;
}

.uniwriter-chat-input {
    flex: 1;
    min-height: 24px;
    max-height: 220px;
    resize: vertical;
    padding: 0.2rem 0;
    border: 0;
    outline: none;
    font: inherit;
    background: transparent;
    box-sizing: border-box;
}

.uniwriter-chat-send {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.uniwriter-chat-footer {
    margin-top: 0.5rem;
}

.uniwriter-chat-status {
    min-height: 1.25rem;
    font-size: 0.92rem;
    color: #555;
}

.uniwriter-chat-status.is-error {
    color: #b42318;
}

.uniwriter-chat-disclaimer {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: #777;
    text-align: center;
}

.uniwriter-chat-debug {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .uniwriter-chat-bubble {
        max-width: 90%;
    }

    .uniwriter-chat-topbar {
        align-items: stretch;
    }

    .uniwriter-chat-assistant-picker {
        min-width: 100%;
    }
}

.uniwriter-chat-app {
    position: relative;
}

.uniwriter-chat-guest-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1.5rem 1.5rem;
}

.uniwriter-chat-guest-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.uniwriter-chat-guest-card h3 {
    margin: 0 0 0.5rem;
}

.uniwriter-chat-guest-card p {
    margin: 0 0 1.25rem;
    color: #666;
}

.uniwriter-chat-guest-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}