/* Widget de chat — Gomestec */
.dev-chat-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1200;
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #00d4aa), #00f5c4);
    color: #041510;
    box-shadow: 0 8px 28px rgba(0, 212, 170, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dev-chat-launcher:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 212, 170, 0.45);
}

.dev-chat-launcher svg {
    width: 1.55rem;
    height: 1.55rem;
}

.dev-chat-launcher[aria-expanded="true"] {
    transform: scale(0.95);
}

.dev-chat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 5.25rem;
    z-index: 1200;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 7rem));
    display: flex;
    flex-direction: column;
    background: var(--card, #16161f);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}

.dev-chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dev-chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--bg-elevated, #12121a);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.dev-chat-avatar {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent, #00d4aa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.dev-chat-header-text h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text, #e8e8ec);
}

.dev-chat-header-text p {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted, #8888a0);
}

.dev-chat-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--text-muted, #8888a0);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    line-height: 0;
}

.dev-chat-close:hover {
    color: var(--text, #e8e8ec);
    background: rgba(255, 255, 255, 0.06);
}

.dev-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 12rem;
}

.dev-chat-msg {
    max-width: 85%;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}

.dev-chat-msg--developer {
    align-self: flex-start;
    background: rgba(0, 212, 170, 0.12);
    border: 1px solid rgba(0, 212, 170, 0.22);
    color: var(--text, #e8e8ec);
    border-bottom-left-radius: 4px;
}

.dev-chat-msg--visitor {
    align-self: flex-end;
    background: var(--accent, #00d4aa);
    color: #041510;
    border-bottom-right-radius: 4px;
}

.dev-chat-msg time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.68rem;
    opacity: 0.7;
}

.dev-chat-name-prompt {
    padding: 0.75rem 1rem 0;
}

.dev-chat-name-prompt label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted, #8888a0);
    margin-bottom: 0.35rem;
}

.dev-chat-name-prompt input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    background: var(--bg, #0a0a0e);
    color: var(--text, #e8e8ec);
    font-family: inherit;
    font-size: 0.86rem;
}

.dev-chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    background: var(--bg-elevated, #12121a);
}

.dev-chat-form input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    background: var(--bg, #0a0a0e);
    color: var(--text, #e8e8ec);
    font-family: inherit;
    font-size: 0.86rem;
}

.dev-chat-form input:focus {
    outline: none;
    border-color: rgba(0, 212, 170, 0.45);
}

.dev-chat-form button {
    border: none;
    border-radius: 10px;
    padding: 0 0.9rem;
    background: var(--accent, #00d4aa);
    color: #041510;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.dev-chat-form button:hover:not(:disabled) {
    background: var(--accent-hover, #00f5c4);
}

.dev-chat-form button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dev-chat-status {
    padding: 0 1rem 0.65rem;
    font-size: 0.74rem;
    color: var(--text-muted, #8888a0);
}

.dev-chat-status.is-error {
    color: #ff8a8a;
}

.dev-chat-wa-link {
    display: block;
    margin: 0 1rem 0.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--accent, #00d4aa);
    text-decoration: none;
}

.dev-chat-wa-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .dev-chat-panel {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        bottom: 5rem;
    }

    .dev-chat-launcher {
        right: 0.75rem;
        bottom: 0.75rem;
    }
}
