.chat-shell {
    width: 100%;
}

.chat-header,
.chat-composer {
    width: 100%;
}

.chat-header {
    min-height: var(--rz-header-min-height, 3rem);
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--rz-header-background-color, #fff);
    color: var(--rz-header-color, inherit);
    border-bottom: var(--rz-header-border, 1px solid #ddd);
    box-shadow: var(--rz-header-shadow, none);
}

.chat-header .header-mic-button {
    position: relative;
    width: 2.5rem !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    padding: 0 !important;
    border-radius: 0.375rem;
}

.chat-header .header-mic-button::after {
    content: "";
    position: absolute;
    inset: -0.125rem;
}

.chat-header .header-mic-button .rzi {
    font-size: 1.25rem;
}

.chat-scroll-region {
    margin: 0 !important;
    padding: 0 0.25rem !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    background: var(--rz-layout-body-background-color, transparent);
}

.chat-scroll-content {
    display: block !important;
    width: 100%;
    min-height: 0;
    padding: 0.25rem;
    box-sizing: border-box;
}

.chat-messages {
    height: auto !important;
    overflow: visible !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
}

.chat-composer {
    z-index: 2;
    box-sizing: border-box;
    padding: 0.5rem max(0.5rem, env(safe-area-inset-right, 0px))
        max(0.5rem, env(safe-area-inset-bottom, 0px))
        max(0.5rem, env(safe-area-inset-left, 0px));
    background: var(--rz-footer-background-color, var(--rz-base-background-color, #fff));
    border-top: 1px solid var(--rz-base-300, #ddd);
}

.chat-quick-prompts {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.3125rem;
    padding-right: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.chat-input-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    box-sizing: border-box;
    border: 2px solid var(--rz-success, #169b62);
    border-radius: 1.75rem;
    background: #f4fbf7;
    box-shadow: 0 0.2rem 0.75rem rgba(32, 49, 53, 0.12);
}

.chat-prompt-input {
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0;
    height: 2.5rem !important;
    padding: 0 0.25rem !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.chat-input-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.chat-input-action {
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    height: 2.75rem !important;
    min-height: 2.75rem !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.chat-send-button:not(:disabled) {
    color: #fff !important;
    background: var(--rz-success, #169b62) !important;
}

.chat-send-button:disabled {
    color: #8a9692 !important;
    background: #e8efeb !important;
    opacity: 1;
}

.overlay {
    height: 100vh;
}

@media (max-width: 768px) {
    .chat-header .rz-sidebar-toggle,
    .chat-header .header-mic-button {
        width: 2.75rem !important;
        min-width: 2.75rem !important;
        height: 2.75rem !important;
        min-height: 2.75rem !important;
    }

    .chat-scroll-region {
        padding-inline: 0.125rem !important;
        scrollbar-gutter: auto;
    }

    .chat-scroll-content {
        padding: 0.375rem 0.25rem 0.75rem;
    }

    .chat-composer {
        padding-top: 0.375rem;
        padding-right: max(0.375rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
        padding-left: max(0.375rem, env(safe-area-inset-left, 0px));
    }

    .chat-quick-prompts {
        margin-bottom: 0.375rem;
        padding: 0 0.125rem 0.25rem;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .chat-quick-prompts::-webkit-scrollbar {
        display: none;
    }

    .chat-quick-prompts .rz-button {
        min-height: 2.75rem;
        padding-inline: 0.75rem;
        scroll-snap-align: start;
        touch-action: manipulation;
    }

    .chat-input-row {
        min-height: 3.5rem;
        padding-left: 0.625rem;
    }

    .chat-prompt-input {
        height: 2.75rem !important;
        font-size: 1rem !important;
    }

    .chat-input-action {
        touch-action: manipulation;
    }
}

@media (max-width: 360px) {
    .chat-input-row {
        padding-left: 0.5rem;
    }

    .chat-input-actions {
        gap: 0;
        margin-left: 0.125rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .chat-input-action,
    .chat-quick-prompts .rz-button,
    .chat-header button {
        -webkit-tap-highlight-color: transparent;
    }
}
