.spark-chat-launcher {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 10020;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #003b7a, #087fc1);
    box-shadow: 0 12px 30px rgba(0, 38, 82, .28);
    font: 700 15px/1.1 Arial, sans-serif;
    cursor: pointer;
}

.spark-chat-launcher:hover,
.spark-chat-launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 15px 34px rgba(0, 38, 82, .36);
}

.spark-chat-launcher svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.spark-chat-panel {
    position: fixed;
    right: 22px;
    bottom: 156px;
    z-index: 10021;
    display: none;
    flex-direction: column;
    width: min(390px, calc(100vw - 24px));
    height: min(610px, calc(100vh - 180px));
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(0, 55, 110, .16);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(0, 32, 68, .25);
    color: #152536;
    font: 15px/1.45 Arial, sans-serif;
}

.spark-chat-panel.is-open {
    display: flex;
}

.spark-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    color: #fff;
    background: linear-gradient(135deg, #002e5f, #087fc1);
}

.spark-chat-heading {
    margin: 0;
    color: inherit;
    font: 800 17px/1.2 Arial, sans-serif;
}

.spark-chat-status {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
}

.spark-chat-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    font-size: 24px;
    cursor: pointer;
}

.spark-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f8fc;
}

.spark-chat-message {
    width: fit-content;
    max-width: 88%;
    margin: 0 0 11px;
    padding: 10px 12px;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.spark-chat-message--assistant {
    border-bottom-left-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 36, 75, .07);
}

.spark-chat-message--user {
    margin-left: auto;
    border-bottom-right-radius: 4px;
    color: #fff;
    background: #075ea8;
}

.spark-chat-message--error {
    border: 1px solid #f1c6c6;
    color: #8a2020;
    background: #fff1f1;
}

.spark-chat-quick-actions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 14px 10px;
    background: #f5f8fc;
}

.spark-chat-chip {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #9cb9d5;
    border-radius: 999px;
    color: #003f78;
    background: #fff;
    font: 700 12px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.spark-chat-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 14px 10px;
    background: #f5f8fc;
}

.spark-chat-contact-action {
    flex: 1 1 auto;
    padding: 8px 10px;
    border: 1px solid #087fc1;
    border-radius: 9px;
    color: #00477e;
    background: #fff;
    font: 700 12px/1.2 Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.spark-chat-contact-action:hover,
.spark-chat-contact-action:focus-visible {
    color: #fff;
    background: #075ea8;
}

.spark-chat-email-form {
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 12px 14px;
    border-top: 1px solid #dce5ee;
    background: #fff;
}

.spark-chat-email-form[hidden],
.spark-chat-form[hidden],
.spark-chat-quick-actions[hidden],
.spark-chat-contact-actions[hidden] {
    display: none;
}

.spark-chat-email-heading {
    color: #003f78;
    font-size: 14px;
}

.spark-chat-email-input {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #aebdcb;
    border-radius: 9px;
    color: #172b3d;
    background: #fff;
    font: 14px/1.3 Arial, sans-serif;
}

.spark-chat-email-message {
    min-height: 76px;
    resize: vertical;
}

.spark-chat-email-input:focus {
    outline: 3px solid rgba(8, 127, 193, .18);
    border-color: #087fc1;
}

.spark-chat-email-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.spark-chat-email-cancel,
.spark-chat-email-submit {
    padding: 9px 12px;
    border-radius: 9px;
    font: 700 13px/1 Arial, sans-serif;
    cursor: pointer;
}

.spark-chat-email-cancel {
    border: 1px solid #9dafc0;
    color: #334b60;
    background: #fff;
}

.spark-chat-email-submit {
    border: 0;
    color: #fff;
    background: #00713d;
}

.spark-chat-form {
    display: flex;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid #dce5ee;
    background: #fff;
}

.spark-chat-input {
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
    border: 1px solid #aebdcb;
    border-radius: 12px;
    color: #172b3d;
    background: #fff;
    font: inherit;
}

.spark-chat-input:focus {
    outline: 3px solid rgba(8, 127, 193, .18);
    border-color: #087fc1;
}

.spark-chat-send {
    min-width: 68px;
    padding: 0 13px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: #00713d;
    font: 800 14px/1 Arial, sans-serif;
    cursor: pointer;
}

.spark-chat-send:disabled,
.spark-chat-input:disabled {
    cursor: wait;
    opacity: .58;
}

.spark-chat-disclosure {
    margin: 0;
    padding: 0 12px 10px;
    color: #647381;
    background: #fff;
    font-size: 11px;
    text-align: center;
}

.spark-chat-disclosure a {
    color: #075ea8;
    font-weight: 700;
}

@media (max-width: 560px) {
    .spark-chat-launcher {
        right: 12px;
        bottom: 82px;
    }

    .spark-chat-launcher span {
        display: none;
    }

    .spark-chat-panel {
        right: 12px;
        bottom: 145px;
        height: min(590px, calc(100vh - 160px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .spark-chat-launcher {
        transition: none;
    }
}
