.service-cms-section-whatsapp-live {
    padding-top: 96px;
}

.whatsapp-live-heading {
    max-width: 82ch;
}

.whatsapp-live-shell {
    display: grid;
    gap: 26px;
}

.whatsapp-live-setup {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
    gap: 24px;
    align-items: stretch;
}

.whatsapp-live-launch-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
}

.whatsapp-live-setup-single {
    grid-template-columns: minmax(0, 1fr);
}

.whatsapp-live-setup-single .whatsapp-live-form-card {
    width: min(100%, 780px);
    margin: 0 auto;
}

.whatsapp-live-chat-wrap {
    display: grid;
}

.whatsapp-live-card {
    border: 1px solid var(--service-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 38%),
        var(--service-surface);
    border-radius: 30px;
    padding: 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(3, 7, 18, 0.12);
}

.whatsapp-live-card-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.whatsapp-live-card-head h3 {
    margin: 6px 0 0;
    color: var(--service-text);
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    line-height: 1.2;
}

.whatsapp-live-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--service-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.whatsapp-live-chip,
.whatsapp-live-badge,
.whatsapp-live-chat-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.whatsapp-live-chip {
    color: var(--primary-color);
    background: rgba(233, 30, 99, 0.12);
    border: 1px solid rgba(233, 30, 99, 0.18);
}

.whatsapp-live-badge {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-live-badge.is-connecting {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

.whatsapp-live-badge.is-connected,
.whatsapp-live-chat-state.is-connected {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.whatsapp-live-badge.is-error,
.whatsapp-live-chat-state.is-error {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.whatsapp-live-form {
    display: grid;
    gap: 16px;
}

.whatsapp-live-field {
    display: grid;
    gap: 8px;
}

.whatsapp-live-field span {
    color: var(--service-text);
    font-weight: 700;
}

.whatsapp-live-field input {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 11, 23, 0.28);
    border-radius: 18px;
    padding: 0 16px;
    color: var(--service-text);
    font: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

html[data-site-theme='light'] .whatsapp-live-field input {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.whatsapp-live-field input:focus {
    outline: none;
    border-color: rgba(233, 30, 99, 0.35);
    transform: translateY(-1px);
}

.whatsapp-live-submit {
    justify-content: center;
    min-height: 56px;
    font-weight: 700;
}

.whatsapp-live-status {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: var(--service-text-soft);
    line-height: 1.6;
}

.whatsapp-live-status.is-error {
    border-color: rgba(239, 68, 68, 0.24);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.18);
}

.whatsapp-live-status.is-success {
    border-color: rgba(34, 197, 94, 0.24);
    color: #bbf7d0;
    background: rgba(20, 83, 45, 0.18);
}

.whatsapp-live-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.whatsapp-live-open {
    min-height: 48px;
    justify-content: center;
}

.whatsapp-live-qr-stage {
    position: relative;
    min-height: 300px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 36%),
        radial-gradient(circle at bottom right, rgba(233, 30, 99, 0.14), transparent 32%),
        rgba(6, 11, 23, 0.32);
    display: grid;
    place-items: center;
}

html[data-site-theme='light'] .whatsapp-live-qr-stage {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 36%),
        radial-gradient(circle at bottom right, rgba(233, 30, 99, 0.12), transparent 32%),
        rgba(255, 255, 255, 0.55);
}

.whatsapp-live-flow-stage {
    min-height: 260px;
}

.whatsapp-live-qr-placeholder {
    width: min(100%, 340px);
    text-align: center;
    padding: 24px;
    color: var(--service-text-soft);
}

.whatsapp-live-qr-placeholder strong {
    display: block;
    margin-bottom: 10px;
    color: var(--service-text);
    font-size: 1.05rem;
}

.whatsapp-live-qr-placeholder p {
    margin: 0;
    line-height: 1.6;
}

.whatsapp-live-qr-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(233, 30, 99, 0.2)),
        rgba(255, 255, 255, 0.08);
    position: relative;
}

.whatsapp-live-qr-icon::before,
.whatsapp-live-qr-icon::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

.whatsapp-live-qr-icon::after {
    inset: 34px;
    border-radius: 8px;
}

.whatsapp-live-qr-image {
    width: min(100%, 320px);
    aspect-ratio: 1;
    object-fit: contain;
    padding: 18px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 28px 50px rgba(15, 23, 42, 0.16);
}

.whatsapp-live-qr-image[hidden],
.whatsapp-live-pairing[hidden],
.whatsapp-live-warnings[hidden] {
    display: none !important;
}

.whatsapp-live-pairing {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.whatsapp-live-steps {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: live-steps;
}

.whatsapp-live-steps li {
    counter-increment: live-steps;
    position: relative;
    padding: 0 0 0 54px;
    color: var(--service-text-soft);
    line-height: 1.6;
}

.whatsapp-live-steps li::before {
    content: counter(live-steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--service-text);
    font-weight: 800;
}

.whatsapp-live-warnings {
    margin: 18px 0 0;
    padding: 16px 18px 16px 36px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: #fde68a;
    display: grid;
    gap: 8px;
}

.whatsapp-live-chat-card {
    padding: 0;
    overflow: hidden;
}

.whatsapp-live-modal[hidden] {
    display: none !important;
}

.whatsapp-live-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 28px;
}

.whatsapp-live-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
}

.whatsapp-live-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    display: grid;
    gap: 14px;
}

.whatsapp-live-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.whatsapp-live-phone {
    border-radius: 42px;
    background: #0f172a;
    padding: 16px 14px 14px;
    box-shadow: 0 34px 90px rgba(2, 6, 23, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-live-phone-screen {
    overflow: hidden;
    border-radius: 30px 30px 34px 34px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.whatsapp-live-phone-top {
    width: 128px;
    height: 28px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-live-phone-top span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.whatsapp-live-chat-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.26), rgba(14, 116, 144, 0.18)),
        rgba(6, 11, 23, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-live-chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #0f766e);
    color: #f8fafc;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.whatsapp-live-chat-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.whatsapp-live-chat-meta strong {
    color: #f8fafc;
    font-size: 1rem;
}

.whatsapp-live-chat-meta span {
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.9rem;
}

.whatsapp-live-chat-state {
    margin-left: auto;
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.18);
}

.whatsapp-live-chat-body {
    min-height: 420px;
    max-height: 560px;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.06), transparent 26%),
        linear-gradient(180deg, rgba(7, 12, 23, 0.14), rgba(7, 12, 23, 0.24)),
        #e7efe7;
}

html[data-site-theme='light'] .whatsapp-live-chat-body {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(226, 232, 240, 0.88)),
        #eef3ef;
}

.whatsapp-live-chat-footer {
    display: grid;
    gap: 6px;
    padding: 16px 18px 20px;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-site-theme='dark'] .whatsapp-live-chat-footer {
    background: rgba(10, 15, 27, 0.92);
}

.whatsapp-live-chat-footer strong {
    color: #0f172a;
}

.whatsapp-live-chat-footer span {
    color: #64748b;
    line-height: 1.55;
}

html[data-site-theme='dark'] .whatsapp-live-chat-footer strong {
    color: #f8fafc;
}

html[data-site-theme='dark'] .whatsapp-live-chat-footer span {
    color: rgba(226, 232, 240, 0.78);
}

.whatsapp-live-phone-home-indicator {
    width: 132px;
    height: 5px;
    margin: 14px auto 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

.whatsapp-live-modal-actions {
    display: grid;
    gap: 10px;
}

.whatsapp-live-end {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    border: 1px solid rgba(239, 68, 68, 0.24);
    background: rgba(127, 29, 29, 0.92);
    color: #fff5f5;
}

.whatsapp-live-end:hover {
    background: rgba(153, 27, 27, 0.96);
    border-color: rgba(248, 113, 113, 0.3);
}

.whatsapp-live-end-feedback {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    text-align: center;
    line-height: 1.5;
}

.whatsapp-live-end-feedback.is-error {
    background: rgba(127, 29, 29, 0.92);
    color: #fecaca;
}

.whatsapp-live-end-feedback.is-success {
    background: rgba(20, 83, 45, 0.92);
    color: #bbf7d0;
}

.whatsapp-live-empty {
    margin: auto 0;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
    color: #475569;
    text-align: center;
    line-height: 1.7;
}

.whatsapp-live-message {
    display: flex;
    width: 100%;
}

.whatsapp-live-message.is-visitor {
    justify-content: flex-end;
}

.whatsapp-live-message.is-assistant,
.whatsapp-live-message.is-system {
    justify-content: flex-start;
}

.whatsapp-live-bubble {
    max-width: min(82%, 420px);
    padding: 14px 16px 12px;
    border-radius: 22px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.whatsapp-live-message.is-visitor .whatsapp-live-bubble {
    background: linear-gradient(135deg, #dcf8c6, #c3f2bb);
    color: #0f172a;
    border-bottom-right-radius: 8px;
}

.whatsapp-live-message.is-assistant .whatsapp-live-bubble,
.whatsapp-live-message.is-system .whatsapp-live-bubble {
    background: #ffffff;
    color: #0f172a;
    border-bottom-left-radius: 8px;
}

html[data-site-theme='light'] .whatsapp-live-message.is-assistant .whatsapp-live-bubble,
html[data-site-theme='light'] .whatsapp-live-message.is-system .whatsapp-live-bubble {
    background: #ffffff;
}

.whatsapp-live-bubble strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.84rem;
    color: #334155;
}

.whatsapp-live-bubble p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.whatsapp-live-attachment {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.whatsapp-live-attachment:first-child {
    margin-top: 0;
}

.whatsapp-live-attachment img,
.whatsapp-live-attachment video {
    width: 100%;
    max-width: 260px;
    border-radius: 16px;
    display: block;
    background: rgba(15, 23, 42, 0.08);
}

.whatsapp-live-attachment audio {
    width: 100%;
    max-width: 260px;
}

.whatsapp-live-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-weight: 700;
}

.whatsapp-live-message-notes {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.whatsapp-live-message-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.whatsapp-live-bubble time {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #64748b;
    text-align: right;
}

.whatsapp-live-chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 18px 18px;
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-site-theme='dark'] .whatsapp-live-chat-input {
    background: rgba(10, 15, 27, 0.92);
}

.whatsapp-live-chat-input input {
    flex: 1;
    min-height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0 18px;
    font: inherit;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.96);
}

html[data-site-theme='dark'] .whatsapp-live-chat-input input {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
}

.whatsapp-live-chat-input input:focus {
    outline: none;
    border-color: rgba(37, 211, 102, 0.4);
}

.whatsapp-live-chat-input button[disabled],
.whatsapp-live-chat-input input[disabled],
.whatsapp-live-submit[disabled] {
    opacity: 0.58;
    cursor: not-allowed;
}

@media (max-width: 1080px) {
    .whatsapp-live-setup {
        grid-template-columns: 1fr;
    }

    .whatsapp-live-chat-body {
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .whatsapp-live-card {
        padding: 22px;
        border-radius: 24px;
    }

    .whatsapp-live-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .whatsapp-live-chat-topbar {
        padding-inline: 16px;
    }

    .whatsapp-live-chat-body {
        padding: 16px;
        max-height: none;
        min-height: 320px;
    }

    .whatsapp-live-chat-input {
        flex-direction: column;
    }

    .whatsapp-live-chat-input button {
        width: 100%;
        justify-content: center;
    }

    .whatsapp-live-bubble {
        max-width: 90%;
    }
}
