.oc-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.oc-chat-toggle {
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 16px 32px rgba(13, 110, 253, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.oc-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(13, 110, 253, 0.32);
}

.oc-chat-toggle-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.oc-chat-toggle-text {
    font-weight: 700;
    line-height: 1.1;
}

.oc-chat-window {
    width: min(380px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 110px));
    background: #fff;
    border: 1px solid rgba(13, 24, 45, 0.08);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.oc-chat-header {
    background: linear-gradient(135deg, #09162f, #113067);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.oc-chat-header h3 {
    margin: 2px 0 0;
    font-size: 18px;
    color: inherit;
}

.oc-chat-kicker {
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}

.oc-chat-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.oc-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}

.oc-chat-message {
    margin-bottom: 14px;
    display: flex;
}

.oc-chat-message:last-child {
    margin-bottom: 0;
}

.oc-chat-message-content {
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.oc-chat-message-assistant .oc-chat-message-content {
    background: #fff;
    border: 1px solid rgba(17, 48, 103, 0.1);
    color: #24324a;
    border-bottom-left-radius: 6px;
}

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

.oc-chat-message-user .oc-chat-message-content {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.oc-chat-status {
    padding: 0 18px 12px;
    color: #5f6f86;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oc-chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;
    animation: oc-chat-pulse 1.1s infinite ease-in-out;
}

.oc-chat-form {
    padding: 16px 18px 18px;
    background: #fff;
    border-top: 1px solid rgba(13, 24, 45, 0.08);
}

.oc-chat-form textarea.form-control {
    min-height: 48px;
    max-height: 140px;
    resize: none;
    border-radius: 16px;
    border-color: rgba(17, 48, 103, 0.12);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.oc-chat-submit {
    width: 100%;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
}

.oc-chat-submit[disabled],
.oc-chat-form textarea[disabled] {
    opacity: 0.75;
}

@keyframes oc-chat-pulse {
    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.6;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 767.98px) {
    .oc-chat-widget {
        right: 12px;
        bottom: 12px;
        left: 12px;
        align-items: stretch;
    }

    .oc-chat-toggle {
        align-self: flex-end;
    }

    .oc-chat-window {
        width: 100%;
        height: min(72vh, 560px);
        border-radius: 22px;
    }
}
