.rpw-form-wrap,
.rpw-form-wrap * {
    box-sizing: border-box;
}

.rpw-form-wrap {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #10242b;
}

.rpw-form-card {
    background: #ffffff;
    border: 1px solid #d7edf1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 84, 97, 0.12);
}

.rpw-form-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #005f73 0%, #00a6b2 100%);
    color: #ffffff;
    padding: 28px;
}

.rpw-form-header h3 {
    margin: 6px 0 8px;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.1;
    color: #ffffff;
}

.rpw-form-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
}

.rpw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rpw-contact-chip {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 12px 14px;
    border-radius: 16px;
    min-width: 160px;
}

.rpw-contact-chip strong,
.rpw-contact-chip span {
    display: block;
    color: #ffffff;
}

.rpw-contact-chip span {
    margin-top: 4px;
    font-size: 14px;
}

.rpw-lead-form {
    padding: 26px;
}

.rpw-label,
.rpw-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: #14343c;
}

.rpw-step-block {
    margin-bottom: 22px;
}

.rpw-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rpw-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #d6e8ec;
    border-radius: 16px;
    background: #f8fcfd;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.rpw-choice:hover,
.rpw-choice:has(input:checked) {
    border-color: #00a6b2;
    background: #edfbfc;
    transform: translateY(-1px);
}

.rpw-choice input {
    width: 18px;
    height: 18px;
    accent-color: #007f89;
}

.rpw-choice span {
    font-weight: 700;
    line-height: 1.2;
}

.rpw-choice-warning {
    border-color: #fed7aa;
    background: #fffaf3;
}

.rpw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rpw-field-full {
    grid-column: 1 / -1;
}

.rpw-field input,
.rpw-field select,
.rpw-field textarea {
    width: 100%;
    border: 1px solid #c9dfe4;
    background: #ffffff;
    border-radius: 14px;
    padding: 13px 14px;
    min-height: 48px;
    font-size: 16px;
    color: #10242b;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rpw-field textarea {
    resize: vertical;
}

.rpw-field input:focus,
.rpw-field select:focus,
.rpw-field textarea:focus {
    border-color: #00a6b2;
    box-shadow: 0 0 0 4px rgba(0, 166, 178, 0.14);
}

.rpw-hp {
    position: absolute !important;
    left: -99999px !important;
    opacity: 0 !important;
}

.rpw-alert {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.rpw-alert-success {
    background: #eafaf0;
    color: #155c2f;
    border: 1px solid #bdebcf;
}

.rpw-alert-error {
    background: #fff7ed;
    color: #8a2020;
    border: 1px solid #fed7aa;
}

.rpw-submit-btn {
    width: 100%;
    margin-top: 18px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #005f73 0%, #00a6b2 100%);
    color: #ffffff;
    padding: 16px 18px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 14px 30px rgba(0, 127, 137, 0.25);
}

.rpw-submit-btn span,
.rpw-submit-btn small {
    display: block;
    color: #ffffff;
}

.rpw-submit-btn span {
    font-size: 18px;
    font-weight: 900;
}

.rpw-submit-btn small {
    margin-top: 4px;
    opacity: 0.86;
    font-size: 12px;
}

.rpw-submit-btn[disabled] {
    opacity: 0.68;
    cursor: wait;
}

.rpw-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.rpw-contact-row a {
    color: #006b7a;
    font-weight: 800;
    text-decoration: none;
}

.rpw-floating-lead {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

.rpw-floating-button {
    border: 0;
    border-radius: 999px;
    background: #19b861;
    color: #ffffff;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(25, 184, 97, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.rpw-wa-dot {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.rpw-floating-panel {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: min(440px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 100px));
    overflow: auto;
    border-radius: 24px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.rpw-floating-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #005f73;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.rpw-form-wrap-floating .rpw-form-card {
    border-radius: 24px;
}

.rpw-form-wrap-floating .rpw-form-header {
    display: block;
    padding: 22px 46px 18px 20px;
}

.rpw-form-wrap-floating .rpw-form-header h3 {
    font-size: 22px;
}

.rpw-form-wrap-floating .rpw-contact-chip {
    display: none;
}

.rpw-form-wrap-floating .rpw-lead-form {
    padding: 18px;
}

.rpw-form-wrap-floating .rpw-choice-grid,
.rpw-form-wrap-floating .rpw-form-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 720px) {
    .rpw-form-header {
        display: block;
        padding: 24px 20px;
    }

    .rpw-contact-chip {
        margin-top: 16px;
    }

    .rpw-lead-form {
        padding: 20px;
    }

    .rpw-choice-grid,
    .rpw-form-grid {
        grid-template-columns: 1fr;
    }

    .rpw-floating-lead {
        right: 12px;
        bottom: 12px;
    }

    .rpw-floating-panel {
        right: -2px;
        bottom: 60px;
        width: calc(100vw - 24px);
    }
}

/* Version 1.2 WhatsApp pre-qualification chat popup */
.rpw-chat-wrap {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #d9edf2;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.rpw-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 54px 16px 18px;
    background: linear-gradient(135deg, #005f73 0%, #00a6b2 100%);
    color: #ffffff;
}

.rpw-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    font-size: 22px;
}

.rpw-chat-head strong,
.rpw-chat-head span {
    display: block;
    color: #ffffff;
}

.rpw-chat-head strong {
    font-size: 17px;
    font-weight: 900;
}

.rpw-chat-head span {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.92;
    font-weight: 700;
}

.rpw-chat-form {
    padding: 16px;
    background: #f2fbff;
    background-image: radial-gradient(rgba(255,255,255,.42) 1px, transparent 1px);
    background-size: 18px 18px;
}

.rpw-chat-progress {
    display: flex;
    gap: 7px;
    margin: 0 0 12px;
}

.rpw-chat-progress span {
    height: 7px;
    flex: 1;
    border-radius: 99px;
    background: rgba(7, 94, 84, 0.22);
}

.rpw-chat-progress span.is-active {
    background: #00a6b2;
}

.rpw-chat-step[hidden] {
    display: none !important;
}

.rpw-chat-bubble {
    position: relative;
    width: fit-content;
    max-width: 96%;
    margin: 0 0 14px;
    padding: 12px 13px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
    box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.rpw-chat-bubble.rpw-bot {
    background: #ffffff;
    color: #12323a;
}

.rpw-chat-options {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.rpw-chat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid #d6e9ee;
    background: #ffffff;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.rpw-chat-option:hover,
.rpw-chat-option:has(input:checked) {
    transform: translateY(-1px);
    border-color: #00a6b2;
    box-shadow: 0 8px 22px rgba(18, 140, 126, .13);
    background: #eafcff;
}

.rpw-chat-option:has(input:checked) {
    border-color: #00a6b2;
}

.rpw-chat-option input {
    width: 18px;
    height: 18px;
    accent-color: #00a6b2;
    flex: 0 0 auto;
}

.rpw-chat-option span {
    color: #10242b;
    font-weight: 800;
    line-height: 1.25;
}

.rpw-chat-note {
    margin: 10px 2px 0;
    font-size: 12px;
    color: #5c6d70;
    font-weight: 700;
}

.rpw-chat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.rpw-chat-grid .rpw-field label,
.rpw-chat-step .rpw-label {
    color: #12323a;
    font-size: 13px;
    margin-bottom: 6px;
}

.rpw-chat-grid .rpw-field input,
.rpw-chat-grid .rpw-field select,
.rpw-chat-grid .rpw-field textarea {
    border-radius: 13px;
    min-height: 46px;
    padding: 11px 12px;
    font-size: 15px;
}

.rpw-chat-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 14px;
}

.rpw-chat-next,
.rpw-chat-back {
    border: 0;
    border-radius: 999px;
    padding: 13px 16px;
    font-weight: 900;
    cursor: pointer;
}

.rpw-chat-next {
    width: 100%;
    background: #00a6b2;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(18, 140, 126, .22);
}

.rpw-chat-back {
    flex: 0 0 auto;
    background: #ffffff;
    color: #005f73;
    border: 1px solid #cfe6ea;
}

.rpw-chat-submit {
    margin-top: 0;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(135deg, #00a6b2 0%, #25d366 100%);
}

.rpw-chat-error {
    margin-top: 12px;
    background: #fff7ed;
    color: #8a2020;
    border: 1px solid #fed7aa;
    padding: 11px 12px;
    border-radius: 13px;
    font-weight: 800;
    font-size: 13px;
}

.rpw-chat-footer {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px 16px;
    background: #ffffff;
}

.rpw-chat-footer a,
.rpw-whatsapp-continue {
    color: #005f73 !important;
    font-weight: 900;
    text-decoration: none;
}

.rpw-whatsapp-continue {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 13px;
    background: #e6fbff;
    border-radius: 999px;
}

.rpw-floating-panel .rpw-chat-wrap {
    border-radius: 24px;
}

@media (max-width: 720px) {
    .rpw-floating-panel {
        max-height: min(760px, calc(100vh - 90px));
    }

    .rpw-chat-grid {
        grid-template-columns: 1fr;
    }

    .rpw-chat-actions {
        flex-direction: column;
    }

    .rpw-chat-back,
    .rpw-chat-submit {
        width: 100%;
    }
}

/* Version 1.4 instant job blocking + stronger popup behaviour */
.rpw-job-block-inline {
    margin-top: 14px;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #8a1f1f;
    font-weight: 800;
    line-height: 1.45;
}

.rpw-job-block-inline strong,
.rpw-job-block-inline span {
    display: block;
}

.rpw-job-block-inline span {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
}

.rpw-choice-warning,
.rpw-chat-option.rpw-choice-warning {
    border-color: #fed7aa !important;
    background: #fffaf3 !important;
}

.rpw-choice-warning:has(input:checked),
.rpw-chat-option.rpw-choice-warning:has(input:checked) {
    border-color: #f59e0b !important;
    background: #fff7ed !important;
    box-shadow: 0 10px 28px rgba(239,68,68,.14) !important;
}

.rpw-lead-form.rpw-job-selected .rpw-form-grid,
.rpw-lead-form.rpw-job-selected .rpw-submit-btn,
.rpw-lead-form.rpw-job-selected .rpw-contact-row {
    display: none !important;
}

.rpw-chat-step.is-job-blocked .rpw-chat-next {
    display: none !important;
}

.rpw-chat-job-block {
    margin-top: 12px;
}

.rpw-alert-error {
    background: #fff7ed;
    color: #8a1f1f;
    border-color: #fed7aa;
}

.rpw-floating-lead.is-open .rpw-floating-button {
    background: #005f73;
}

.rpw-floating-panel {
    z-index: 1000000;
}

.rpw-floating-panel[hidden] {
    display: none !important;
}


/* Version 1.6 mobile fit fixes */
.rpw-form-wrap,
.rpw-form-card,
.rpw-lead-form,
.rpw-floating-lead,
.rpw-floating-panel,
.rpw-chat-wrap,
.rpw-chat-form,
.rpw-chat-step,
.rpw-chat-grid,
.rpw-chat-actions,
.rpw-submit-btn,
.rpw-chat-submit {
    max-width: 100%;
}

.rpw-floating-panel,
.rpw-floating-panel * {
    box-sizing: border-box;
}

.rpw-floating-panel {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.rpw-chat-wrap {
    width: 100%;
    max-width: 100%;
}

.rpw-chat-grid .rpw-field,
.rpw-form-grid .rpw-field,
.rpw-chat-option,
.rpw-choice {
    min-width: 0;
}

.rpw-field input,
.rpw-field select,
.rpw-field textarea,
.rpw-chat-grid .rpw-field input,
.rpw-chat-grid .rpw-field select,
.rpw-chat-grid .rpw-field textarea {
    max-width: 100%;
}

.rpw-submit-btn span,
.rpw-submit-btn small,
.rpw-chat-submit span,
.rpw-chat-submit small {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.rpw-chat-submit {
    min-width: 0;
    overflow: hidden;
    padding-left: 14px;
    padding-right: 14px;
}

@media (max-width: 540px) {
    .rpw-floating-lead {
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        display: flex;
        justify-content: flex-end;
        pointer-events: none;
    }

    .rpw-floating-button {
        pointer-events: auto;
        margin-left: auto;
        padding: 12px 15px;
        font-size: 14px;
        line-height: 1;
    }

    .rpw-floating-panel {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(64px + env(safe-area-inset-bottom));
        top: auto;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 84px);
        max-height: calc(100dvh - 84px);
        border-radius: 20px;
        pointer-events: auto;
    }

    .rpw-floating-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 22px;
    }

    .rpw-chat-wrap,
    .rpw-floating-panel .rpw-chat-wrap {
        border-radius: 20px;
    }

    .rpw-chat-head {
        gap: 9px;
        padding: 14px 48px 12px 14px;
    }

    .rpw-chat-avatar {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .rpw-chat-head strong {
        font-size: 15px;
        line-height: 1.15;
    }

    .rpw-chat-head span {
        font-size: 11px;
        line-height: 1.2;
    }

    .rpw-chat-form {
        padding: 12px;
        background-size: 14px 14px;
    }

    .rpw-chat-progress {
        gap: 5px;
        margin-bottom: 9px;
    }

    .rpw-chat-progress span {
        height: 5px;
    }

    .rpw-chat-bubble {
        max-width: 100%;
        padding: 10px 11px;
        margin-bottom: 10px;
        font-size: 12.5px;
        line-height: 1.35;
    }

    .rpw-chat-grid,
    .rpw-form-wrap-floating .rpw-chat-grid,
    .rpw-form-wrap-floating .rpw-form-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .rpw-chat-grid .rpw-field label,
    .rpw-chat-step .rpw-label,
    .rpw-form-wrap-floating .rpw-field label,
    .rpw-form-wrap-floating .rpw-label {
        font-size: 12px;
        line-height: 1.15;
        margin-bottom: 4px;
    }

    .rpw-chat-grid .rpw-field input,
    .rpw-chat-grid .rpw-field select,
    .rpw-chat-grid .rpw-field textarea,
    .rpw-form-wrap-floating .rpw-field input,
    .rpw-form-wrap-floating .rpw-field select,
    .rpw-form-wrap-floating .rpw-field textarea {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 12px;
        font-size: 14px;
    }

    .rpw-chat-grid .rpw-field textarea,
    .rpw-form-wrap-floating .rpw-field textarea {
        min-height: 72px;
        max-height: 96px;
    }

    .rpw-chat-options {
        gap: 7px;
        margin-top: 8px;
    }

    .rpw-chat-option,
    .rpw-form-wrap-floating .rpw-choice {
        min-height: 40px;
        padding: 8px 10px;
        border-radius: 12px;
        gap: 8px;
    }

    .rpw-chat-option input,
    .rpw-choice input {
        width: 16px;
        height: 16px;
    }

    .rpw-chat-option span,
    .rpw-choice span {
        font-size: 13px;
        line-height: 1.18;
    }

    .rpw-chat-note {
        font-size: 11px;
        line-height: 1.35;
        margin-top: 8px;
    }

    .rpw-chat-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }

    .rpw-chat-next,
    .rpw-chat-back,
    .rpw-chat-submit,
    .rpw-chat-actions .rpw-submit-btn {
        width: 100%;
        padding: 11px 13px;
        font-size: 14px;
        border-radius: 16px;
    }

    .rpw-chat-submit span,
    .rpw-chat-actions .rpw-submit-btn span {
        font-size: 15px;
    }

    .rpw-chat-submit small,
    .rpw-chat-actions .rpw-submit-btn small {
        font-size: 10.5px;
        line-height: 1.25;
    }

    .rpw-alert,
    .rpw-chat-error,
    .rpw-job-block-inline {
        padding: 10px 11px;
        font-size: 12px;
        line-height: 1.35;
    }

    .rpw-chat-footer {
        padding: 10px 12px 12px;
        font-size: 13px;
        line-height: 1.25;
    }

    .rpw-form-wrap-floating .rpw-lead-form {
        padding: 14px;
    }

    .rpw-form-wrap-floating .rpw-form-header {
        padding: 18px 18px 14px;
    }

    .rpw-form-wrap-floating .rpw-form-header h3 {
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .rpw-floating-panel {
        left: 6px;
        right: 6px;
        bottom: calc(60px + env(safe-area-inset-bottom));
        max-height: calc(100vh - 76px);
        max-height: calc(100dvh - 76px);
    }

    .rpw-chat-form {
        padding: 10px;
    }

    .rpw-chat-bubble {
        font-size: 12px;
    }

    .rpw-chat-submit small,
    .rpw-chat-actions .rpw-submit-btn small {
        display: none;
    }
}


/* Version 1.7 water-brand WhatsApp popup: no pink/beige styling */
.rpw-chat-head {
    background: linear-gradient(135deg, #005f73 0%, #00a6b2 100%) !important;
}

.rpw-chat-avatar {
    background: rgba(255, 255, 255, 0.18) !important;
}

.rpw-chat-form {
    background: #f2fbff !important;
    background-image: radial-gradient(rgba(0, 166, 178, .14) 1px, transparent 1px) !important;
    background-size: 18px 18px !important;
}

.rpw-chat-progress span {
    background: rgba(0, 166, 178, 0.22) !important;
}

.rpw-chat-progress span.is-active {
    background: #00a6b2 !important;
}

.rpw-chat-bubble.rpw-bot,
.rpw-chat-option,
.rpw-chat-back {
    background: #ffffff !important;
}

.rpw-chat-option:hover,
.rpw-chat-option:has(input:checked) {
    border-color: #00a6b2 !important;
    box-shadow: 0 8px 22px rgba(0, 166, 178, .13) !important;
    background: #eafcff !important;
}

.rpw-chat-option input,
.rpw-choice input {
    accent-color: #007f89 !important;
}

.rpw-chat-next,
.rpw-floating-lead.is-open .rpw-floating-button {
    background: #007f89 !important;
    color: #ffffff !important;
}

.rpw-chat-back {
    color: #005f73 !important;
    border-color: #cfe6ea !important;
}

.rpw-chat-submit {
    background: linear-gradient(135deg, #005f73 0%, #00a6b2 100%) !important;
}

.rpw-chat-footer a,
.rpw-whatsapp-continue {
    color: #005f73 !important;
}

.rpw-whatsapp-continue {
    background: #e6fbff !important;
}

.rpw-job-block-inline,
.rpw-alert-error,
.rpw-chat-error {
    background: #fff7ed !important;
    color: #8a3b00 !important;
    border-color: #fed7aa !important;
}

.rpw-choice-warning,
.rpw-chat-option.rpw-choice-warning {
    border-color: #fed7aa !important;
    background: #fffaf3 !important;
}

.rpw-choice-warning:has(input:checked),
.rpw-chat-option.rpw-choice-warning:has(input:checked) {
    border-color: #f59e0b !important;
    background: #fff7ed !important;
    box-shadow: 0 10px 28px rgba(245, 158, 11, .14) !important;
}

@media (max-width: 540px) {
    .rpw-chat-form {
        background-size: 14px 14px !important;
    }
}


/* Version 1.8 fixes: website form must not push to WhatsApp + popup width lock */
@media (min-width: 541px) {
    .rpw-floating-panel {
        width: 440px !important;
        min-width: 440px !important;
        max-width: calc(100vw - 36px) !important;
        right: 0 !important;
        left: auto !important;
    }
}

.rpw-floating-panel {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.rpw-floating-panel .rpw-chat-wrap,
.rpw-floating-panel .rpw-chat-form,
.rpw-floating-panel .rpw-chat-step,
.rpw-floating-panel .rpw-chat-grid,
.rpw-floating-panel .rpw-field,
.rpw-floating-panel input,
.rpw-floating-panel select,
.rpw-floating-panel textarea,
.rpw-floating-panel button {
    min-width: 0 !important;
}

.rpw-floating-panel .rpw-chat-head > div:last-child {
    min-width: 0 !important;
}

.rpw-floating-panel .rpw-chat-head strong,
.rpw-floating-panel .rpw-chat-head span,
.rpw-floating-panel .rpw-chat-bubble,
.rpw-floating-panel .rpw-label,
.rpw-floating-panel label,
.rpw-floating-panel .rpw-chat-option span,
.rpw-floating-panel .rpw-submit-btn span,
.rpw-floating-panel .rpw-submit-btn small {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

@media (max-width: 540px) {
    .rpw-floating-panel {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        bottom: calc(64px + env(safe-area-inset-bottom)) !important;
        width: calc(100vw - 16px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 84px) !important;
        border-radius: 20px !important;
    }

    .rpw-floating-panel .rpw-chat-grid {
        grid-template-columns: 1fr !important;
    }

    .rpw-floating-panel .rpw-chat-head {
        padding: 14px 48px 12px 14px !important;
    }
}

@media (max-width: 380px) {
    .rpw-floating-panel {
        left: 6px !important;
        right: 6px !important;
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
    }

    .rpw-floating-panel .rpw-chat-bubble,
    .rpw-floating-panel .rpw-chat-option span,
    .rpw-floating-panel .rpw-field label,
    .rpw-floating-panel .rpw-label {
        font-size: 12px !important;
    }
}
