/* PWA_KIRIM_PESAN_WA_STYLE_V1 */

.pwa-wa-page {
  --pwa-wa-green: #0ca678;
  --pwa-wa-green-dark: #08775a;
  --pwa-wa-green-soft: #e6faf4;
  --pwa-wa-navy: #142235;
  --pwa-wa-text: #1b2738;
  --pwa-wa-muted: #708094;
  --pwa-wa-border: #e1e8ef;
  --pwa-wa-bg: #f3f6f9;
  --pwa-wa-danger: #d94359;

  min-height: 100dvh;
  color: var(--pwa-wa-text);
  background: var(--pwa-wa-bg);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.pwa-wa-page *,
.pwa-wa-page *::before,
.pwa-wa-page *::after {
  box-sizing: border-box;
}

.pwa-wa-page .hidden {
  display: none !important;
}

.pwa-wa-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns:
    42px
    minmax(0, 1fr)
    42px;
  align-items: center;
  min-height: 68px;
  padding:
    max(8px, env(safe-area-inset-top))
    14px
    8px;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #10283a,
      #08785b
    );
  box-shadow:
    0 8px 26px
    rgba(18, 45, 61, .18);
}

.pwa-wa-back,
.pwa-wa-refresh {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid
    rgba(255, 255, 255, .18);
  border-radius: 13px;
  color: #fff;
  background:
    rgba(255, 255, 255, .1);
  font-size: 25px;
}

.pwa-wa-refresh {
  font-size: 20px;
}

.pwa-wa-header-title {
  min-width: 0;
  padding: 0 9px;
}

.pwa-wa-header-title strong,
.pwa-wa-header-title span {
  display: block;
}

.pwa-wa-header-title strong {
  font-size: 16px;
}

.pwa-wa-header-title span {
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
}

.pwa-wa-content {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.pwa-wa-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(91, 255, 202, .28),
      transparent 33%
    ),
    linear-gradient(
      140deg,
      #122538,
      #0b8e68
    );
  box-shadow:
    0 16px 35px
    rgba(15, 99, 78, .17);
}

.pwa-wa-hero::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -87px;
  width: 190px;
  height: 190px;
  border: 28px solid
    rgba(255, 255, 255, .06);
  border-radius: 50%;
}

.pwa-wa-hero-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid
    rgba(255, 255, 255, .18);
  border-radius: 20px;
  background:
    rgba(255, 255, 255, .12);
  font-size: 30px;
}

.pwa-wa-hero > div:nth-child(2) {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.pwa-wa-hero span {
  color: #95f0d3;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}

.pwa-wa-hero h1 {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 1.15;
}

.pwa-wa-hero p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: 10px;
  line-height: 1.5;
}

.pwa-wa-secure {
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ddfff4;
  background:
    rgba(0, 0, 0, .16);
  font-size: 8px;
  font-weight: 800;
}

.pwa-wa-card {
  padding: 15px;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 10px 28px
    rgba(42, 59, 78, .055);
}

.pwa-wa-section-title {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.pwa-wa-section-title strong,
.pwa-wa-section-title small {
  display: block;
}

.pwa-wa-section-title strong {
  color: var(--pwa-wa-navy);
  font-size: 13px;
}

.pwa-wa-section-title small {
  margin-top: 2px;
  color: var(--pwa-wa-muted);
  font-size: 8px;
}

.pwa-wa-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--pwa-wa-green-dark);
  background: var(--pwa-wa-green-soft);
  font-size: 10px;
  font-weight: 900;
}

.pwa-wa-count {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 29px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--pwa-wa-green-dark);
  background: var(--pwa-wa-green-soft);
  font-size: 9px;
  font-weight: 900;
}

.pwa-wa-sender {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid #d9eee7;
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      #f8fffc,
      #eefbf7
    );
}

.pwa-wa-avatar {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      var(--pwa-wa-green-dark),
      var(--pwa-wa-green)
    );
  font-size: 15px;
  font-weight: 900;
}

.pwa-wa-sender strong,
.pwa-wa-sender small {
  display: block;
}

.pwa-wa-sender strong {
  font-size: 12px;
}

.pwa-wa-sender small {
  margin-top: 3px;
  color: var(--pwa-wa-muted);
  font-size: 8px;
}

.pwa-wa-locked {
  font-size: 14px;
}

.pwa-wa-tabs {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 15px;
  background: #eef2f5;
}

.pwa-wa-tabs button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 5px 2px;
  border: 0;
  border-radius: 11px;
  color: #778598;
  background: transparent;
  font-size: 8px;
  font-weight: 800;
}

.pwa-wa-tabs button span {
  font-size: 17px;
}

.pwa-wa-tabs button.active {
  color: var(--pwa-wa-green-dark);
  background: #fff;
  box-shadow:
    0 4px 14px
    rgba(38, 57, 78, .09);
}

.pwa-wa-lookup-panel,
.pwa-wa-manual-panel {
  margin-top: 11px;
}

.pwa-wa-search {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  min-height: 45px;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 14px;
  background: #fff;
}

.pwa-wa-search:focus-within {
  border-color: var(--pwa-wa-green);
  box-shadow:
    0 0 0 4px
    rgba(12, 166, 120, .1);
}

.pwa-wa-search > span {
  padding-left: 12px;
  color: #8a98aa;
  font-size: 20px;
}

.pwa-wa-search input {
  min-width: 0;
  height: 43px;
  padding: 0 9px;
  border: 0;
  outline: 0;
  color: var(--pwa-wa-text);
  background: transparent;
  font: inherit;
  font-size: 11px;
}

.pwa-wa-search button {
  width: 37px;
  height: 37px;
  border: 0;
  color: #8593a5;
  background: transparent;
  font-size: 21px;
}

.pwa-wa-results {
  display: grid;
  gap: 6px;
  max-height: 285px;
  margin-top: 8px;
  overflow: auto;
}

.pwa-wa-result {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid #e5ebf1;
  border-radius: 14px;
  background: #fff;
}

.pwa-wa-result-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--pwa-wa-green-dark);
  background: var(--pwa-wa-green-soft);
  font-size: 11px;
  font-weight: 900;
}

.pwa-wa-result strong,
.pwa-wa-result small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pwa-wa-result strong {
  font-size: 10px;
}

.pwa-wa-result small {
  margin-top: 3px;
  color: var(--pwa-wa-muted);
  font-size: 7px;
}

.pwa-wa-result button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--pwa-wa-green);
  font-size: 17px;
}

.pwa-wa-loading {
  display: grid;
  place-items: center;
  min-height: 90px;
  color: var(--pwa-wa-muted);
  font-size: 9px;
  text-align: center;
}

.pwa-wa-manual-panel {
  display: grid;
  gap: 8px;
}

.pwa-wa-manual-panel textarea,
.pwa-wa-message,
.pwa-wa-dynamic-fields input,
.pwa-wa-location-fields input {
  width: 100%;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 14px;
  outline: 0;
  color: var(--pwa-wa-text);
  background: #fff;
  font: inherit;
  font-size: 11px;
}

.pwa-wa-manual-panel textarea,
.pwa-wa-message {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.pwa-wa-manual-panel textarea:focus,
.pwa-wa-message:focus,
.pwa-wa-dynamic-fields input:focus,
.pwa-wa-location-fields input:focus {
  border-color: var(--pwa-wa-green);
  box-shadow:
    0 0 0 4px
    rgba(12, 166, 120, .1);
}

.pwa-wa-secondary-button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--pwa-wa-green);
  font-size: 10px;
  font-weight: 800;
}

.pwa-wa-selected {
  display: flex;
  gap: 6px;
  margin-top: 11px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pwa-wa-selected::-webkit-scrollbar {
  display: none;
}

.pwa-wa-selected-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 54px;
  border: 1px dashed #d7e0e8;
  border-radius: 13px;
  color: var(--pwa-wa-muted);
  font-size: 9px;
}

.pwa-wa-chip {
  display: grid;
  grid-template-columns:
    minmax(80px, auto)
    auto;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  max-width: 195px;
  min-height: 39px;
  padding: 5px 5px 5px 10px;
  border: 1px solid #cceade;
  border-radius: 12px;
  color: var(--pwa-wa-green-dark);
  background: #f2fcf8;
}

.pwa-wa-chip div {
  min-width: 0;
}

.pwa-wa-chip strong,
.pwa-wa-chip small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pwa-wa-chip strong {
  font-size: 8px;
}

.pwa-wa-chip small {
  margin-top: 2px;
  font-size: 6px;
}

.pwa-wa-chip button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  color: var(--pwa-wa-danger);
  background: #fff;
  font-size: 15px;
}

.pwa-wa-text-danger {
  width: 100%;
  margin-top: 8px;
  padding: 5px;
  border: 0;
  color: var(--pwa-wa-danger);
  background: transparent;
  font-size: 8px;
  font-weight: 800;
}

.pwa-wa-message {
  min-height: 150px;
}

.pwa-wa-tokens {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pwa-wa-tokens::-webkit-scrollbar {
  display: none;
}

.pwa-wa-token {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid #cceade;
  border-radius: 9px;
  color: var(--pwa-wa-green-dark);
  background: #f6fffc;
  font-family:
    ui-monospace,
    SFMono-Regular,
    monospace;
  font-size: 8px;
  font-weight: 800;
}

.pwa-wa-signature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  color: #537266;
  background: var(--pwa-wa-green-soft);
  font-size: 7px;
}

.pwa-wa-signature strong {
  font-size: 8px;
}

.pwa-wa-message-types {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pwa-wa-message-types button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 58px;
  padding: 6px;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 13px;
  color: #718094;
  background: #fff;
  font-size: 8px;
  font-weight: 800;
}

.pwa-wa-message-types button span {
  font-size: 19px;
}

.pwa-wa-message-types button.active {
  border-color: var(--pwa-wa-green);
  color: var(--pwa-wa-green-dark);
  background: var(--pwa-wa-green-soft);
}

.pwa-wa-dynamic-fields {
  display: grid;
  gap: 6px;
  margin-top: 11px;
}

.pwa-wa-dynamic-fields label,
.pwa-wa-location-fields label {
  color: #425167;
  font-size: 9px;
  font-weight: 800;
}

.pwa-wa-dynamic-fields input,
.pwa-wa-location-fields input {
  min-height: 44px;
  padding: 0 11px;
}

.pwa-wa-location-fields {
  display: grid;
  grid-template-columns:
    1fr
    1fr;
  gap: 9px;
  margin-top: 11px;
}

.pwa-wa-location-fields > div {
  display: grid;
  gap: 6px;
}

.pwa-wa-location-fields .wide {
  grid-column: 1 / -1;
}

.pwa-wa-send-modes {
  display: grid;
  grid-template-columns:
    1fr
    1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 14px;
  background: #edf2f5;
}

.pwa-wa-send-modes button {
  min-height: 43px;
  padding: 0 7px;
  border: 0;
  border-radius: 11px;
  color: #748295;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}

.pwa-wa-send-modes button.active {
  color: var(--pwa-wa-green-dark);
  background: #fff;
  box-shadow:
    0 4px 13px
    rgba(42, 59, 78, .09);
}

.pwa-wa-alert {
  padding: 12px 13px;
  border-radius: 14px;
  font-size: 10px;
  line-height: 1.5;
}

.pwa-wa-alert.success {
  border: 1px solid #a7e6d2;
  color: #087052;
  background: #e9fbf5;
}

.pwa-wa-alert.error {
  border: 1px solid #efbac3;
  color: #ad3045;
  background: #fff0f3;
}

.pwa-wa-stats {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pwa-wa-stats > div {
  padding: 9px 6px;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 12px;
  background: #f8fafb;
  text-align: center;
}

.pwa-wa-stats span,
.pwa-wa-stats strong {
  display: block;
}

.pwa-wa-stats span {
  color: var(--pwa-wa-muted);
  font-size: 6px;
  font-weight: 800;
  text-transform: uppercase;
}

.pwa-wa-stats strong {
  margin-top: 3px;
  font-size: 16px;
}

.pwa-wa-stats .success {
  border-color: #bee9da;
  background: #effcf8;
}

.pwa-wa-stats .schedule {
  border-color: #c8daf5;
  background: #f2f7ff;
}

.pwa-wa-stats .failed {
  border-color: #efbec7;
  background: #fff2f4;
}

.pwa-wa-history {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.pwa-wa-history-item {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid #e4eaf0;
  border-radius: 14px;
  background: #fff;
}

.pwa-wa-history-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: #f0f4f7;
  font-size: 17px;
}

.pwa-wa-history-main {
  min-width: 0;
}

.pwa-wa-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pwa-wa-history-top strong {
  overflow: hidden;
  color: var(--pwa-wa-navy);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pwa-wa-history-main > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #5f6f83;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pwa-wa-history-main > small {
  display: block;
  margin-top: 5px;
  color: var(--pwa-wa-muted);
  font-size: 6px;
}

.pwa-wa-history-error {
  margin-top: 5px;
  color: var(--pwa-wa-danger);
  font-size: 7px;
}

.pwa-wa-status {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 6px;
  font-weight: 900;
}

.pwa-wa-status.sent {
  color: #087052;
  background: #dff8ef;
}

.pwa-wa-status.scheduled {
  color: #315e9b;
  background: #e7f0ff;
}

.pwa-wa-status.queued,
.pwa-wa-status.processing {
  color: #95600b;
  background: #fff1d5;
}

.pwa-wa-status.failed {
  color: #aa3044;
  background: #ffe3e8;
}

.pwa-wa-history-refresh {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--pwa-wa-border);
  border-radius: 10px;
  color: #67778b;
  background: #fff;
  font-size: 16px;
}

.pwa-wa-bottom-space {
  height: 98px;
}

.pwa-wa-send-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: grid;
  grid-template-columns:
    minmax(80px, .55fr)
    minmax(210px, 1.45fr);
  align-items: center;
  gap: 10px;
  padding:
    10px
    12px
    calc(
      10px
      + env(safe-area-inset-bottom)
    );
  border-top: 1px solid
    rgba(214, 224, 232, .9);
  background:
    rgba(255, 255, 255, .96);
  box-shadow:
    0 -10px 30px
    rgba(28, 48, 68, .1);
  backdrop-filter: blur(12px);
}

.pwa-wa-send-bar > div > span,
.pwa-wa-send-bar > div > strong {
  display: block;
}

.pwa-wa-send-bar > div > span {
  color: var(--pwa-wa-muted);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.pwa-wa-send-bar > div > strong {
  margin-top: 2px;
  color: var(--pwa-wa-navy);
  font-size: 13px;
}

.pwa-wa-send-bar > button {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 57px;
  padding: 8px 13px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      var(--pwa-wa-green-dark),
      var(--pwa-wa-green)
    );
  box-shadow:
    0 10px 25px
    rgba(12, 166, 120, .23);
  text-align: left;
}

.pwa-wa-send-bar > button:disabled {
  opacity: .6;
}

.pwa-wa-send-bar > button > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background:
    rgba(255, 255, 255, .16);
  font-size: 17px;
}

.pwa-wa-send-bar button strong,
.pwa-wa-send-bar button small {
  display: block;
}

.pwa-wa-send-bar button strong {
  font-size: 11px;
}

.pwa-wa-send-bar button small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .7);
  font-size: 7px;
}

@media (min-width: 720px) {
  .pwa-wa-page {
    max-width: 760px;
    margin: 0 auto;
    box-shadow:
      0 0 50px
      rgba(29, 47, 65, .1);
  }

  .pwa-wa-send-bar {
    right: 50%;
    left: auto;
    width: min(760px, 100%);
    transform: translateX(50%);
  }
}

/* =========================================================
 * PWA_WA_MOBILE_RESPONSIVE_V6
 *
 * Menghilangkan horizontal overflow pada HP.
 * Halaman WA hanya boleh bergerak vertikal.
 * ========================================================= */

html.pwa-wa-screen-active,
body.pwa-wa-screen-active {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
}

body.pwa-wa-screen-active {
  position: relative;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.pwa-wa-screen-active #app,
body.pwa-wa-screen-active #appRoot,
body.pwa-wa-screen-active #page,
body.pwa-wa-screen-active #content,
body.pwa-wa-screen-active #main,
body.pwa-wa-screen-active main,
body.pwa-wa-screen-active .app,
body.pwa-wa-screen-active .app-shell,
body.pwa-wa-screen-active .app-content,
body.pwa-wa-screen-active .page,
body.pwa-wa-screen-active .page-content,
body.pwa-wa-screen-active .main-content {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

.pwa-wa-page {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.pwa-wa-page *,
.pwa-wa-page *::before,
.pwa-wa-page *::after {
  max-width: 100%;
  min-width: 0;
}

.pwa-wa-header,
.pwa-wa-content,
.pwa-wa-hero,
.pwa-wa-card,
.pwa-wa-tabs,
.pwa-wa-lookup-panel,
.pwa-wa-manual-panel,
.pwa-wa-results,
.pwa-wa-result,
.pwa-wa-selected,
.pwa-wa-message-types,
.pwa-wa-send-modes,
.pwa-wa-history {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.pwa-wa-header {
  left: 0;
  right: 0;
}

.pwa-wa-content {
  padding-left:
    max(
      12px,
      env(safe-area-inset-left)
    );

  padding-right:
    max(
      12px,
      env(safe-area-inset-right)
    );

  overflow-x: hidden;
}

.pwa-wa-card,
.pwa-wa-hero {
  overflow: hidden;
}

.pwa-wa-section-title > div,
.pwa-wa-sender > div,
.pwa-wa-result > div,
.pwa-wa-history-main {
  min-width: 0;
  overflow: hidden;
}

.pwa-wa-tabs {
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
}

.pwa-wa-tabs button {
  width: 100%;
  min-width: 0;
  padding-right: 1px;
  padding-left: 1px;
  overflow: hidden;
  white-space: normal;
  word-break: normal;
}

.pwa-wa-tabs button span {
  max-width: none;
}

.pwa-wa-search {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.pwa-wa-search input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.pwa-wa-result {
  grid-template-columns:
    38px
    minmax(0, 1fr)
    31px;
}

.pwa-wa-result strong,
.pwa-wa-result small {
  max-width: 100%;
}

.pwa-wa-selected {
  overflow-x: auto;
  overflow-y: hidden;
}

.pwa-wa-message,
.pwa-wa-manual-panel textarea,
.pwa-wa-dynamic-fields input,
.pwa-wa-location-fields input {
  max-width: 100%;
  min-width: 0;
}

.pwa-wa-message-types {
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
}

.pwa-wa-message-types button {
  width: 100%;
  min-width: 0;
}

.pwa-wa-location-fields {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
}

.pwa-wa-send-bar {
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  transform: none !important;

  grid-template-columns:
    minmax(72px, .46fr)
    minmax(0, 1.54fr);

  padding-left:
    max(
      12px,
      env(safe-area-inset-left)
    );

  padding-right:
    max(
      12px,
      env(safe-area-inset-right)
    );
}

.pwa-wa-send-bar > div,
.pwa-wa-send-bar > button,
.pwa-wa-send-bar > button > div {
  min-width: 0;
  max-width: 100%;
}

.pwa-wa-send-bar > button {
  width: 100%;
}

.pwa-wa-send-bar button strong,
.pwa-wa-send-bar button small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 380px) {
  .pwa-wa-content {
    padding-left:
      max(
        9px,
        env(safe-area-inset-left)
      );

    padding-right:
      max(
        9px,
        env(safe-area-inset-right)
      );
  }

  .pwa-wa-card {
    padding: 13px 11px;
  }

  .pwa-wa-tabs button {
    font-size: 7px;
  }

  .pwa-wa-tabs button span {
    font-size: 15px;
  }

  .pwa-wa-send-bar {
    grid-template-columns:
      67px
      minmax(0, 1fr);

    gap: 7px;
  }

  .pwa-wa-send-bar > button {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@media (min-width: 720px) {
  .pwa-wa-page {
    width: min(
      760px,
      100%
    ) !important;

    max-width: 760px !important;
    margin: 0 auto !important;
  }

  .pwa-wa-send-bar {
    right: auto !important;
    left: 50% !important;

    width: min(
      760px,
      100%
    ) !important;

    max-width: 760px !important;
    transform:
      translateX(-50%) !important;
  }
}

