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

.bwp-widget {
    --bwp-primary: #25D366;
    --bwp-accent: #075E54;
    --bwp-text: #1f2937;
    --bwp-panel: #ffffff;
    font-family: inherit;
    color: var(--bwp-text);
}

.bwp-floating-button-wrap {
    position: fixed;
    z-index: 99998;
    bottom: 22px;
}

.bwp-bottom-right .bwp-floating-button-wrap {
    right: 22px;
}

.bwp-bottom-left .bwp-floating-button-wrap {
    left: 22px;
}

.bwp-floating-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--bwp-primary), var(--bwp-accent));
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 16px 34px rgba(7, 94, 84, 0.28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.bwp-floating-button:hover,
.bwp-floating-button:focus-visible {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 18px 42px rgba(7, 94, 84, 0.34);
    outline: none;
}

.bwp-whatsapp-icon,
.bwp-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.bwp-whatsapp-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.bwp-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 22px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(5px);
}

.bwp-bottom-left .bwp-overlay {
    justify-content: flex-start;
}

.bwp-overlay[hidden] {
    display: none;
}

.bwp-modal {
    position: relative;
    width: min(540px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 44px));
    overflow-y: auto;
    padding: 24px;
    border-radius: 26px;
    background: var(--bwp-panel);
    box-shadow: 0 26px 80px rgba(15, 23, 42, .28);
    animation: bwp-modal-in .22s ease-out both;
}

@keyframes bwp-modal-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bwp-widget .bwp-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    background: #e9eef6;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.bwp-widget .bwp-close:hover,
.bwp-widget .bwp-close:focus-visible {
    background: #dbe3ef;
    color: #ffffff;
    outline: 2px solid color-mix(in srgb, var(--bwp-primary) 35%, transparent);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.bwp-header {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: start;
    padding-right: 64px;
    margin-bottom: 18px;
}

.bwp-header-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bwp-primary) 15%, white);
    color: var(--bwp-accent);
}

.bwp-header-icon svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

.bwp-eyebrow {
    margin: 0 0 4px;
    color: var(--bwp-accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.bwp-header h2 {
    margin: 0;
    color: var(--bwp-text);
    font-size: clamp(22px, 4vw, 30px);
    line-height: 1.12;
}

.bwp-intro,
.bwp-card-text {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.bwp-card-grid {
    display: grid;
    gap: 14px;
}

.bwp-card {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
}

.bwp-card-emergency {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff, #fff7f7);
}

.bwp-card-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bwp-primary) 15%, white);
    color: var(--bwp-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.bwp-card-badge-emergency {
    background: #fee2e2;
    color: #b91c1c;
}

.bwp-card h3 {
    margin: 0;
    color: var(--bwp-text);
    font-size: 18px;
    line-height: 1.2;
}

.bwp-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 14px;
}

.bwp-action {
    display: block;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none !important;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.bwp-action:hover,
.bwp-action:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--bwp-primary) 45%, #e2e8f0);
    background: #ffffff;
    outline: none;
}

.bwp-action small {
    display: inline-block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.bwp-action-primary {
    border-color: transparent;
    background: var(--bwp-primary);
    color: #ffffff;
}

.bwp-action-primary small {
    color: rgba(255, 255, 255, .86);
}

.bwp-action-danger {
    border-color: transparent;
    background: #dc2626;
    color: #ffffff;
}

@media (min-width: 560px) {
    .bwp-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bwp-action-primary,
    .bwp-action-danger {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .bwp-floating-button-wrap {
        right: 16px;
        left: 16px;
        bottom: 16px;
    }

    .bwp-floating-button {
        width: 100%;
        justify-content: center;
    }

    .bwp-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 10px;
    }

    .bwp-modal {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 20px;
        border-radius: 22px;
    }

    .bwp-widget .bwp-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        font-size: 27px;
    }

    .bwp-header {
        grid-template-columns: 48px 1fr;
        gap: 12px;
        padding-right: 46px;
    }

    .bwp-header-icon {
        width: 48px;
        height: 48px;
    }

    .bwp-header-icon svg {
        width: 30px;
        height: 30px;
    }
}
