.laravel-chatbot-widget {
    position: fixed;
    bottom: 24px;
    z-index: 9999;
    font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
    --chatbot-primary: #2563eb;
    --chatbot-primary-dark: #1746b3;
    --chatbot-surface: rgba(255, 255, 255, 0.96);
    --chatbot-surface-soft: #f6f9ff;
    --chatbot-text: #132238;
    --chatbot-muted: #6f7f95;
    --chatbot-border: rgba(148, 163, 184, 0.22);
    --chatbot-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.laravel-chatbot-widget.right {
    right: 24px;
}

.laravel-chatbot-widget.left {
    left: 24px;
}

.laravel-chatbot-launcher {
    display: flex;
    justify-content: flex-end;
}

.laravel-chatbot-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: var(--chatbot-shadow);
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    animation: laravel-chatbot-float 3.2s ease-in-out infinite;
}

.laravel-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.laravel-chatbot-toggle:focus-visible,
.laravel-chatbot-panel-action:focus-visible,
.laravel-chatbot-submit:focus-visible,
.laravel-chatbot-input:focus-visible,
.laravel-chatbot-chip:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.laravel-chatbot-toggle-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.laravel-chatbot-logo {
    display: block;
    object-fit: contain;
}

.laravel-chatbot-logo-launcher {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.laravel-chatbot-logo-header {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

.laravel-chatbot-toggle-pulse {
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(37, 99, 235, 0.18);
    animation: laravel-chatbot-pulse 2.8s ease-out infinite;
}

.laravel-chatbot-toggle-ring {
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.26), transparent 58%);
    opacity: 0.9;
    pointer-events: none;
}

.laravel-chatbot-launcher-wrap {
    position: relative;
}

.laravel-chatbot-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    display: none;
    width: min(460px, calc(100vw - 24px));
    height: min(820px, calc(100dvh - 72px));
    overflow: hidden;
    background: var(--chatbot-surface);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    box-shadow: var(--chatbot-shadow);
    backdrop-filter: blur(14px);
}

.laravel-chatbot-widget.left .laravel-chatbot-panel {
    left: 0;
    right: auto;
}

.laravel-chatbot-panel.is-open {
    display: flex;
    flex-direction: column;
}

.laravel-chatbot-widget.is-open .laravel-chatbot-toggle {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
}

.laravel-chatbot-header {
    position: relative;
    padding: 18px 20px 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
}

.laravel-chatbot-header::after {
    content: "";
    position: absolute;
    inset: auto -40px -54px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(4px);
}

.laravel-chatbot-header-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.laravel-chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.laravel-chatbot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.laravel-chatbot-title-copy strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.laravel-chatbot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.laravel-chatbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ef29a;
    box-shadow: 0 0 0 4px rgba(126, 242, 154, 0.16);
}

.laravel-chatbot-panel-actions {
    display: flex;
    gap: 8px;
}

.laravel-chatbot-panel-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.laravel-chatbot-panel-action[hidden] {
    display: none !important;
}

.laravel-chatbot-subtitle {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.92;
    max-width: 100%;
}

.laravel-chatbot-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 42%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 22%, #f8fbff 100%);
}

.laravel-chatbot-starters {
    padding: 0 16px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.laravel-chatbot-panel.is-profile-gated .laravel-chatbot-starters,
.laravel-chatbot-panel.is-profile-gated .laravel-chatbot-footer {
    display: none;
}

.laravel-chatbot-profile-gate {
    padding: 18px 16px 0;
}

.laravel-chatbot-profile-card {
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.98));
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.laravel-chatbot-profile-copy strong {
    display: block;
    font-size: 16px;
    color: var(--chatbot-text);
}

.laravel-chatbot-profile-copy p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--chatbot-muted);
}

.laravel-chatbot-profile-fields {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.laravel-chatbot-profile-field {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--chatbot-text);
}

.laravel-chatbot-profile-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: #fff;
    color: var(--chatbot-text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.laravel-chatbot-profile-input:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    outline: none;
}

.laravel-chatbot-profile-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff1f2;
    color: #b42318;
    font-size: 12px;
    line-height: 1.5;
}

.laravel-chatbot-profile-submit {
    width: 100%;
    margin-top: 14px;
    min-height: 50px;
    border: none;
    border-radius: 16px;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.laravel-chatbot-profile-submit:hover {
    transform: translateY(-1px);
}

.laravel-chatbot-starters.has-question-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.laravel-chatbot-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--chatbot-text);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.laravel-chatbot-chip:hover {
    border-color: rgba(37, 99, 235, 0.28);
    color: var(--chatbot-primary-dark);
    transform: translateY(-1px);
}

.laravel-chatbot-chip-icon {
    display: inline-flex;
    color: var(--chatbot-primary-dark);
}

.laravel-chatbot-chip.is-back {
    justify-content: center;
    font-weight: 600;
}

.laravel-chatbot-chip.is-question {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 18px;
    text-align: left;
    line-height: 1.45;
    white-space: normal;
}

.laravel-chatbot-messages {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 18px 16px;
    scroll-behavior: smooth;
}

.laravel-chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.laravel-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.34);
    border-radius: 999px;
}

.laravel-chatbot-bubble-row {
    display: flex;
    margin-bottom: 14px;
    animation: laravel-chatbot-rise 0.22s ease;
}

.laravel-chatbot-bubble-row.user {
    justify-content: flex-end;
}

.laravel-chatbot-bubble-row.bot,
.laravel-chatbot-bubble-row.system {
    justify-content: flex-start;
}

.laravel-chatbot-bubble-wrap {
    max-width: 86%;
}

.laravel-chatbot-bubble-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--chatbot-muted);
}

.laravel-chatbot-bubble-meta strong {
    color: var(--chatbot-text);
    font-weight: 600;
}

.laravel-chatbot-bubble {
    padding: 14px 16px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.laravel-chatbot-widget.is-manual-fullscreen {
    inset: 0;
    bottom: 0;
    z-index: 10020;
}

.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-toggle {
    display: none;
}

.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-launcher-wrap,
.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-panel {
    width: 100%;
    height: 100%;
}

.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-header {
    padding-top: 22px;
}

.laravel-chatbot-widget.is-manual-fullscreen .laravel-chatbot-drag-handle {
    display: block;
}

.laravel-chatbot-bubble-row.user .laravel-chatbot-bubble {
    border-bottom-right-radius: 6px;
}

.laravel-chatbot-bubble-row.bot .laravel-chatbot-bubble,
.laravel-chatbot-bubble-row.system .laravel-chatbot-bubble {
    border-bottom-left-radius: 6px;
}

.laravel-chatbot-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.laravel-chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.48);
    animation: laravel-chatbot-bounce 1.2s infinite ease-in-out;
}

.laravel-chatbot-typing span:nth-child(2) {
    animation-delay: 0.14s;
}

.laravel-chatbot-typing span:nth-child(3) {
    animation-delay: 0.28s;
}

.laravel-chatbot-footer {
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.laravel-chatbot-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.laravel-chatbot-input-wrap {
    position: relative;
    flex: 1;
}

.laravel-chatbot-input {
    display: block;
    width: 100%;
    min-height: 58px;
    max-height: 110px;
    resize: none;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: #fff;
    font: inherit;
    line-height: 1.45;
    color: var(--chatbot-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.laravel-chatbot-input::placeholder {
    color: #8b9ab0;
}

.laravel-chatbot-input:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.laravel-chatbot-submit {
    min-width: 64px;
    min-height: 58px;
    padding: 0 18px;
    align-self: stretch;
    border: none;
    border-radius: 18px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.laravel-chatbot-submit:hover {
    transform: translateY(-1px);
}

.laravel-chatbot-submit:disabled,
.laravel-chatbot-input:disabled,
.laravel-chatbot-chip:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.laravel-chatbot-footer-note {
    margin-top: 10px;
    font-size: 11px;
    color: var(--chatbot-muted);
}

.laravel-chatbot-empty {
    margin: 6px 0 14px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.96));
}

.laravel-chatbot-empty-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.laravel-chatbot-empty-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.laravel-chatbot-empty-copy strong {
    display: block;
    color: var(--chatbot-text);
    font-size: 16px;
    margin-bottom: 4px;
}

.laravel-chatbot-empty-copy p,
.laravel-chatbot-empty-list {
    margin: 0;
    color: var(--chatbot-muted);
    font-size: 13px;
    line-height: 1.65;
}

.laravel-chatbot-empty-list {
    padding-left: 18px;
    margin-top: 10px;
}

.laravel-chatbot-empty-list li + li {
    margin-top: 6px;
}

.laravel-chatbot-empty-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.laravel-chatbot-empty-grid div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.laravel-chatbot-empty-grid span {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-primary-dark) 100%);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.laravel-chatbot-empty-grid strong {
    display: block;
    margin-top: 10px;
    color: var(--chatbot-text);
    font-size: 13px;
}

.laravel-chatbot-empty-grid p {
    margin: 6px 0 0;
    color: var(--chatbot-muted);
    font-size: 12px;
    line-height: 1.5;
}

.laravel-chatbot-drag-handle {
    display: none;
    position: absolute;
    top: 8px;
    left: 50%;
    width: 56px;
    height: 6px;
    margin-left: -28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

@keyframes laravel-chatbot-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes laravel-chatbot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes laravel-chatbot-pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    70% {
        transform: scale(1.06);
        opacity: 0;
    }

    100% {
        transform: scale(1.06);
        opacity: 0;
    }
}

@keyframes laravel-chatbot-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@media (max-width: 920px), (max-height: 820px) {
    .laravel-chatbot-panel {
        width: min(430px, calc(100vw - 24px));
        height: min(700px, calc(100dvh - 96px));
    }
}

@media (max-width: 768px), (max-height: 720px) {
    .laravel-chatbot-widget.right {
        right: 12px;
        left: auto;
        bottom: 12px;
    }

    .laravel-chatbot-widget.left {
        left: 12px;
        right: auto;
        bottom: 12px;
    }

    .laravel-chatbot-launcher {
        justify-content: flex-end;
    }

    .laravel-chatbot-toggle {
        width: 62px;
        height: 62px;
    }

    .laravel-chatbot-panel {
        width: min(420px, calc(100vw - 24px));
        height: min(760px, calc(100dvh - 48px));
        border-radius: 24px;
    }

    .laravel-chatbot-bubble-wrap {
        max-width: 92%;
    }

    .laravel-chatbot-starters {
        overflow-x: visible;
        flex-wrap: wrap;
        padding-bottom: 10px;
    }

    .laravel-chatbot-starters.has-question-list {
        display: grid;
        overflow-x: visible;
        flex-wrap: wrap;
    }

    .laravel-chatbot-chip {
        white-space: normal;
    }

    .laravel-chatbot-chip.is-question {
        white-space: normal;
    }

    .laravel-chatbot-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .laravel-chatbot-empty-grid {
        grid-template-columns: 1fr;
    }

    .laravel-chatbot-form {
        gap: 8px;
    }

    .laravel-chatbot-submit {
        min-width: 58px;
        padding: 0 14px;
    }
}

@media (max-width: 520px) {
    .laravel-chatbot-header {
        padding: 18px 16px 8px;
    }

    .laravel-chatbot-title-copy strong {
        font-size: 17px;
    }

    .laravel-chatbot-subtitle {
        max-width: none;
    }

    .laravel-chatbot-panel-actions {
        gap: 6px;
    }

    .laravel-chatbot-panel-action {
        width: 34px;
        height: 34px;
    }

    .laravel-chatbot-panel {
        width: min(360px, calc(100vw - 20px));
        height: min(620px, calc(100dvh - 88px));
    }

    .laravel-chatbot-header-top {
        gap: 10px;
    }

    .laravel-chatbot-header-title {
        min-width: 0;
    }

    .laravel-chatbot-title-copy {
        min-width: 0;
    }

    .laravel-chatbot-title-copy strong,
    .laravel-chatbot-subtitle {
        overflow-wrap: anywhere;
    }

    .laravel-chatbot-input {
        min-height: 54px;
        padding: 14px 16px;
    }
}
