/* Website chat widget: resources/views/partials/chat-widget.blade.php */

/* The widget shows Google's required reCAPTCHA notice itself, so the floating badge can be hidden. */
.grecaptcha-badge {
    visibility: hidden;
}

.evolco-chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483000;
    font-family: "gotham", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.evolco-chat [hidden] {
    display: none !important;
}

.evolco-chat-launcher {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #0084dc;
    color: #fff;
    font-size: 26px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.evolco-chat-launcher:hover,
.evolco-chat-launcher:focus {
    background: #006fb9;
    transform: scale(1.05);
    outline: none;
}

.evolco-chat-launcher:focus-visible {
    box-shadow: 0 0 0 3px #ffb612, 0 4px 14px rgba(0, 0, 0, 0.25);
}

.evolco-chat-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.evolco-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #0084dc;
    color: #fff;
}

.evolco-chat-title {
    font-weight: bold;
    font-size: 15px;
}

.evolco-chat-close {
    border: 0;
    background: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.evolco-chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.evolco-chat-intro,
.evolco-chat-lead,
.evolco-chat-thanks {
    padding: 18px 16px;
    overflow-y: auto;
}

.evolco-chat-greeting {
    font-size: 15px;
    margin: 0 0 12px;
}

.evolco-chat-notice {
    color: #777;
    font-size: 12px;
    margin: 0 0 16px;
}

.evolco-chat-notice a,
.evolco-chat-message a {
    color: #0084dc;
    text-decoration: underline;
}

.evolco-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    background: #f5f7f9;
}

.evolco-chat-message {
    max-width: 85%;
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 12px;
    white-space: normal;
    word-wrap: break-word;
}

.evolco-chat-message-assistant {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-bottom-left-radius: 4px;
}

.evolco-chat-message-assistant.is-printing {
    white-space: pre-wrap;
}

.evolco-chat-message-user {
    margin-left: auto;
    background: #0084dc;
    color: #fff;
    border-bottom-right-radius: 4px;
    white-space: pre-wrap;
}

.evolco-chat-message-note {
    max-width: 100%;
    background: #fff4dc;
    border: 1px solid #ffb612;
    font-size: 13px;
}

.evolco-chat-typing {
    padding: 4px 14px;
    background: #f5f7f9;
    color: #777;
    font-size: 12px;
    font-style: italic;
}

.evolco-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 4px;
    border-top: 1px solid #eee;
}

.evolco-chat-form textarea {
    flex: 1;
    resize: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

.evolco-chat-form textarea:focus,
.evolco-chat-lead input:focus,
.evolco-chat-lead textarea:focus {
    border-color: #0084dc;
    outline: none;
}

.evolco-chat-send {
    width: 44px;
    border: 0;
    border-radius: 8px;
    background: #ffb612;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.evolco-chat-send:disabled {
    opacity: 0.5;
    cursor: default;
}

.evolco-chat-link {
    align-self: flex-start;
    border: 0;
    background: none;
    color: #0084dc;
    font-size: 12px;
    padding: 4px 12px 10px;
    text-decoration: underline;
    cursor: pointer;
}

.evolco-chat-lead .evolco-chat-link {
    padding-left: 0;
}

.evolco-chat-lead-text {
    margin: 0 0 12px;
}

.evolco-chat-lead input,
.evolco-chat-lead textarea {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font: inherit;
}

.evolco-chat-error {
    color: #d9534f;
    font-size: 13px;
    margin: 0 0 8px;
}

@media (max-width: 480px) {
    .evolco-chat {
        right: 12px;
        bottom: 12px;
    }

    .evolco-chat.is-open .evolco-chat-panel {
        position: fixed;
        inset: 0;
        width: auto;
        max-width: none;
        height: auto;
        max-height: none;
        border-radius: 0;
    }

    .evolco-chat.is-open .evolco-chat-launcher {
        display: none;
    }
}
