.whatsapp-connection-modal { width: min(94vw, 480px); max-height: 90dvh; overflow: auto; }
.whatsapp-connection-modal .perm-modal-head { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center; justify-content: space-between; gap: 12px; }
.whatsapp-connection-modal .card-title { margin: 0; min-width: 0; flex: 1 1 auto; white-space: nowrap; font-size: clamp(.8rem, 3.5vw, 1rem); }
.whatsapp-connection-modal .perm-modal-close { flex: 0 0 40px !important; width: 40px !important; min-width: 40px !important; max-width: 40px !important; height: 40px; padding: 0; display: grid; place-items: center; }
.whatsapp-connection-body { display: grid; gap: 12px; padding: 18px 0 6px; text-align: start; line-height: 1.8; }
.whatsapp-connection-body p { margin: 0; }
.whatsapp-connection-body img { max-width: 100%; height: auto; background: white; padding: 8px; border-radius: 10px; }
.whatsapp-connection-modal footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wa-panel { min-width: 0; padding: 16px; border: 1px solid #efdce1; background: #fff; border-radius: 14px; display: grid; gap: 12px; }
.wa-panel-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wa-panel-heading strong { font-size: .95rem; flex: 1; min-width: 0; }
.wa-panel-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 10px; color: #9f2038; background: #fbe5e9; }
.wa-panel p { color: #5c687e; font-size: .9rem; line-height: 1.9; }
.wa-connection-badge { padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.wa-connection-badge.is-ready { color: #176147; background: #e9f7ef; }
.wa-connection-badge.is-waiting { color: #785c1a; background: #fff5dd; }
.wa-account-number { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: #fbf8f9; border-radius: 10px; font-size: .82rem; color: #5c687e; }
.wa-account-number strong { color: #27364c; font-size: 1rem; font-variant-numeric: tabular-nums; }
.whatsapp-connection-modal .wa-change-account { justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wa-notification-panel { background: #fffafb; }
.wa-change-confirm { border-color: #e8c795; background: #fffbf1; }
.wa-change-confirm > strong { color: #73521a; }
.wa-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wa-panel-error { color: #a32238; background: #fff1f3; }
.wa-qr-frame { justify-self: center; padding: 8px; border: 1px solid #efdce1; border-radius: 14px; background: white; }
.clinic-whatsapp-icon { display: inline-block; flex: 0 0 20px; vertical-align: middle; }
.dental-whatsapp-connect { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.dental-whatsapp-status {
    --wa-text: #27364c;
    --wa-muted: #65718a;
    --wa-accent: #9f2038;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 14px;
    margin: 16px 0;
    padding: 16px 18px;
    border: 1px solid #f0cbd2;
    border-radius: 14px;
    background: #fff8f9;
    color: var(--wa-text);
    text-align: start;
}
.dental-whatsapp-status > * { min-width: 0; }
.dental-whatsapp-status-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #fbe5e9; color: var(--wa-accent); }
.dental-whatsapp-status-icon .clinic-whatsapp-icon { width: 25px; height: 25px; }
.dental-whatsapp-status-copy { display: grid; gap: 4px; }
.dental-whatsapp-status-title { font-size: .95rem; line-height: 1.65; }
.dental-whatsapp-status-description { margin: 0; color: var(--wa-muted); font-size: .88rem; line-height: 1.8; overflow-wrap: anywhere; }
.dental-whatsapp-status-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.dental-whatsapp-status-time { display: grid; gap: 3px; font-size: .78rem; color: var(--wa-muted); line-height: 1.6; }
.dental-whatsapp-status-time time { color: var(--wa-text); font-variant-numeric: tabular-nums; }
.dental-whatsapp-status .btn { display: inline-flex; align-items: center; gap: 8px; }
.dental-whatsapp-status-error { grid-column: 2 / -1; color: #b42332; font-size: .88rem; line-height: 1.8; }
@media (max-width: 600px) {
    .dental-whatsapp-status { grid-template-columns: 36px minmax(0, 1fr); align-items: start; padding: 14px; gap: 10px 12px; }
    .dental-whatsapp-status-icon { width: 36px; height: 36px; border-radius: 10px; }
    .dental-whatsapp-status-icon .clinic-whatsapp-icon { width: 23px; height: 23px; }
    .dental-whatsapp-status-actions { grid-column: 2; justify-content: flex-start; }
}
