.bse-contact-widget,
.bse-contact-widget * {
    box-sizing: border-box;
}

.bse-contact-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: Arial, sans-serif;
}

.bse-contact-widget[data-state="closed"] {
    display: none;
}

.bse-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 54px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: #234b78;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.bse-contact-button:hover,
.bse-contact-button:focus {
    background: #265ea5;
    outline: none;
}

.bse-contact-panel {
    display: none;
    width: 430px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: 20px;
    background: #ffffff;
    color: #4f4b4c;
}

.bse-contact-widget[data-state="open"] .bse-contact-button {
    display: none;
}

.bse-contact-widget[data-state="open"] .bse-contact-panel {
    display: block;
}

.bse-contact-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 30px 20px;
    border-bottom: 1px solid #d7e0ea;
}

.bse-contact-kicker {
    margin: 0 0 8px;
    color: #265ea5;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bse-contact-header h2 {
    margin: 0;
    color: #234b78;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 0.28em;
    line-height: 1.05;
    text-transform: uppercase;
}

.bse-contact-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.bse-contact-icon-button {
    width: 48px;
    height: 48px;
    border: 1px solid #d7e0ea;
    border-radius: 50%;
    background: #ffffff;
    color: #234b78;
    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.bse-contact-icon-button:hover,
.bse-contact-icon-button:focus {
    border-color: #234b78;
    outline: none;
}

.bse-contact-body {
    max-height: calc(100vh - 160px);
    overflow: auto;
    padding: 26px 30px 30px;
}

.bse-contact-intro {
    margin: 0 0 22px;
    color: #4f4b4c;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.bse-contact-errors {
    color: #990000;
    font-size: 14px;
}

.bse-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.bse-form-grid label {
    margin-top: 6px;
    color: #234b78;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.35;
}

.bse-form-grid input,
.bse-form-grid textarea {
    width: 100%;
    border: 1px solid #cfd9e4;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2933;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    padding: 11px 13px;
}

.bse-form-grid input:focus,
.bse-form-grid textarea:focus {
    border-color: #265ea5;
    outline: none;
}

.bse-form-grid textarea {
    min-height: 120px;
    resize: vertical;
}

.bse-submit-row {
    margin-top: 18px;
}

.bse-submit-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: #234b78;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    cursor: pointer;
}

.bse-submit-button:hover,
.bse-submit-button:focus {
    background: #265ea5;
    outline: none;
}

.bse-submit-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.bse-honeypot,
.bse-hidden-frame {
    display: none !important;
}

@media (max-width: 520px) {
    .bse-contact-widget {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .bse-contact-button {
        width: 100%;
    }

    .bse-contact-panel {
        width: 100%;
        border-radius: 18px;
    }

    .bse-contact-header {
        padding: 20px 18px 16px;
    }

    .bse-contact-header h2 {
        font-size: 24px;
        letter-spacing: 0.2em;
    }

    .bse-contact-icon-button {
        width: 42px;
        height: 42px;
    }

    .bse-contact-body {
        padding: 20px 18px 22px;
        max-height: calc(100vh - 132px);
    }
}

/* Keep the plugin trigger under plugin control, even when Keap validation scripts are present. */
.bse-contact-widget[data-state="button"] .bse-contact-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.bse-contact-widget[data-state="button"] .bse-contact-panel,
.bse-contact-widget[data-state="closed"] .bse-contact-button,
.bse-contact-widget[data-state="closed"] .bse-contact-panel,
.bse-contact-widget[data-state="open"] .bse-contact-button {
    display: none !important;
}

.bse-contact-embed,
.bse-contact-embed * {
    box-sizing: border-box;
}

.bse-contact-embed {
    width: 100%;
    margin: 32px 0;
    font-family: Arial, sans-serif;
}

.bse-contact-embed-inner {
    width: 100%;
    border: 1px solid #d7e0ea;
    border-radius: 20px;
    background: #ffffff;
    color: #4f4b4c;
    overflow: hidden;
}

.bse-contact-embed-header {
    padding: 28px 30px 20px;
    border-bottom: 1px solid #d7e0ea;
}

.bse-contact-embed-header h2 {
    margin: 0;
    color: #234b78;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 0.28em;
    line-height: 1.05;
    text-transform: uppercase;
}

.bse-contact-embed-body {
    max-height: none;
    overflow: visible;
}

.bse-contact-embed .bse-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
}

.bse-contact-embed .bse-form-grid input,
.bse-contact-embed .bse-form-grid textarea,
.bse-contact-embed .bse-submit-button {
    width: 100%;
    max-width: none;
}

.bse-contact-embed .bse-form-grid input {
    min-height: 54px;
}

.bse-contact-embed .bse-form-grid textarea {
    min-height: 190px;
}

@media (max-width: 720px) {

    .bse-contact-embed-header,
    .bse-contact-embed-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .bse-contact-embed-header h2 {
        font-size: 24px;
        letter-spacing: 0.2em;
    }
}
