body:has(.customer-portal-send-dialog) .chat-container {
    display: none;
}

.customer-portal-send-dialog {
    width: min(980px, calc(100vw - 2rem));
    max-width: 100%;
    margin: 0 auto;
    color: #1d2939;
    background: #ffffff;
    border: 1px solid rgba(223, 229, 238, 0.95);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: none;
}

.customer-portal-send-dialog .customer-portal-send-dialog__form {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

.customer-portal-send-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.375rem 1.5rem 1.125rem;
    border-bottom: 1px solid #dfe5ee;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.customer-portal-send-dialog .customer-portal-send-dialog__close {
    flex: 0 0 auto;
    width: 2.625rem;
    height: 2.625rem;
    min-height: 2.625rem;
    padding: 0;
    border-color: #dfe5ee;
    border-radius: 12px;
    background: #ffffff;
    color: #344054;
}

.customer-portal-send-dialog__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #2f6fed;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.customer-portal-send-dialog__eyebrow span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.customer-portal-send-dialog__header h2 {
    margin: 0 0 0.35rem;
    color: #1d2939;
    font-size: clamp(1.65rem, 4vw, 2.125rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.customer-portal-send-dialog__header p {
    margin: 0;
    max-width: 44rem;
    color: #667085;
    font-size: 0.94rem;
    line-height: 1.55;
}

.customer-portal-send-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
}

.customer-portal-send-dialog__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #f4dfb2;
    border-radius: 14px;
    background: #fff7e7;
    color: #7a5511;
}

.customer-portal-send-dialog__notice .rzi {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    font-size: 1.25rem;
}

.customer-portal-send-dialog__notice strong,
.customer-portal-send-dialog__copy-row strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.82rem;
}

.customer-portal-send-dialog__notice span,
.customer-portal-send-dialog__copy-row span,
.customer-portal-send-dialog__why p {
    display: block;
    color: #667085;
    font-size: 0.8rem;
    line-height: 1.45;
}

.customer-portal-send-dialog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 1.25rem;
    align-items: start;
}

.customer-portal-send-dialog__side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-portal-send-dialog__panel {
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    padding: 1.125rem;
}

.customer-portal-send-dialog__message-panel {
    min-width: 0;
}

.customer-portal-send-dialog__panel h3 {
    margin: 0 0 1rem;
    color: #1d2939;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.customer-portal-send-dialog__message-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-portal-send-dialog__field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
}

.customer-portal-send-dialog__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.customer-portal-send-dialog__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.customer-portal-send-dialog__label-row label,
.customer-portal-send-dialog__label-row .rz-label {
    color: #344054;
    font-size: 0.82rem;
    font-weight: 700;
}

.customer-portal-send-dialog__label-row span {
    color: #667085;
    font-size: 0.75rem;
}

.customer-portal-send-dialog .rz-textbox,
.customer-portal-send-dialog .rz-textarea {
    width: 100%;
    border-color: #cfd8e6;
    border-radius: 12px;
    color: #1d2939;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.customer-portal-send-dialog .rz-textarea {
    min-height: 10.5rem;
    resize: vertical;
    line-height: 1.5;
}

.customer-portal-send-dialog__copy-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #f8fbff;
}

.customer-portal-send-dialog__copy-row .rz-switch {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.customer-portal-send-dialog__tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.customer-portal-send-dialog__tokens span {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0 0.65rem;
    border: 1px solid #dfe5ee;
    border-radius: 999px;
    background: #f3f6fb;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 650;
}

.customer-portal-send-dialog__pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    margin-bottom: 0.875rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #e9f8ee;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 750;
}

.customer-portal-send-dialog__summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.customer-portal-send-dialog__summary-grid div,
.customer-portal-send-dialog__stat-wide {
    padding: 0.8rem 0.875rem;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #f8fbff;
}

.customer-portal-send-dialog__summary-grid span,
.customer-portal-send-dialog__stat-wide span {
    display: block;
    margin-bottom: 0.35rem;
    color: #667085;
    font-size: 0.75rem;
}

.customer-portal-send-dialog__summary-grid strong,
.customer-portal-send-dialog__stat-wide strong {
    display: block;
    color: #1d2939;
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.customer-portal-send-dialog__why p {
    margin: 0;
}

.customer-portal-send-dialog__result {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: #f0fdf4;
    color: #166534;
}

.customer-portal-send-dialog__result span {
    font-weight: 750;
}

.customer-portal-send-dialog__result code {
    color: #14532d;
    white-space: normal;
    overflow-wrap: anywhere;
}

.customer-portal-send-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 1.125rem 1.5rem;
    border-top: 1px solid #dfe5ee;
    background: #ffffff;
    flex: 0 0 auto;
}

.customer-portal-send-dialog__footer-text {
    max-width: 34rem;
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.45;
}

.customer-portal-send-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.customer-portal-send-dialog__actions .rz-button {
    min-height: 2.75rem;
    border-radius: 12px;
    font-weight: 750;
}

@media (max-width: 900px) {
    .customer-portal-send-dialog__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .customer-portal-send-dialog {
        border-radius: 18px;
        max-height: none;
    }

    .customer-portal-send-dialog__body {
        overflow: visible;
    }

    .customer-portal-send-dialog__header,
    .customer-portal-send-dialog__body,
    .customer-portal-send-dialog__footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .customer-portal-send-dialog__header {
        gap: 0.75rem;
    }

    .customer-portal-send-dialog__header h2 {
        font-size: 1.75rem;
    }

    .customer-portal-send-dialog .customer-portal-send-dialog__close {
        width: 2.375rem;
        height: 2.375rem;
        min-height: 2.375rem;
    }

    .customer-portal-send-dialog__field-row,
    .customer-portal-send-dialog__summary-grid {
        grid-template-columns: 1fr;
    }

    .customer-portal-send-dialog__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-portal-send-dialog__actions {
        width: 100%;
        justify-content: stretch;
    }

    .customer-portal-send-dialog__actions .rz-button {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 430px) {
    .customer-portal-send-dialog__actions {
        flex-direction: column;
    }

    .customer-portal-send-dialog__actions .rz-button {
        width: 100%;
    }
}
