/* Messages workspace */
.sms-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px auto 12px;
}

.sms-top h2 { font-size: 16px; font-weight: 600; }
.sms-top p { color: #4a5578; font-size: 13px; line-height: 1.5; margin-top: 2px; }

html body .sms-top .sms-new {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px !important;
  background: var(--orange, #FF7A1A) !important;
  border: 1px solid var(--orange, #FF7A1A) !important;
  color: #fff !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body .sms-top .sms-new:hover { background: #e86a12 !important; }

.sms-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.55fr);
  min-height: min(620px, calc(100dvh - 260px));
  max-height: calc(100dvh - 220px);
  background: #fff;
  border: 1px solid var(--line-warm, #F3DDC2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(20, 33, 61, 0.12);
}

.sms-list,
.sms-thread {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sms-thread { border-left: 1px solid #e3e8f2; }

.sms-list-head,
.sms-thread-head {
  flex: none;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e3e8f2;
  background: #fff;
}

.sms-list-head h2 { font-size: 16px; }
.sms-search {
  display: block;
  margin-top: 10px;
}

.sms-search input,
.sms-compose input:not([type="checkbox"]),
.sms-compose select,
.sms-compose textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #aab7cd;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  background: #fff6ea;
}

.sms-compose textarea { min-height: 96px; resize: vertical; line-height: 1.5; }

.sms-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

html body .sms-filters button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px !important;
  border: 1px solid #C9D9FA !important;
  background: var(--blue-100, #E8F0FF) !important;
  color: var(--ink, #14213D) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

html body .sms-filters button:hover {
  background: var(--orange, #FF7A1A) !important;
  border-color: var(--orange, #FF7A1A) !important;
  color: #fff !important;
}

html body .sms-filters button[aria-pressed="true"],
html body .sms-filters button[aria-pressed="true"]:hover {
  background: var(--ink, #14213D) !important;
  border-color: var(--ink, #14213D) !important;
  color: #fff !important;
}

.sms-coming {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f7fb;
  color: #4a5578;
  font-size: 12px;
  line-height: 1.45;
}

.sms-people {
  flex: 1;
  overflow: auto;
  padding: 6px;
}

.sms-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 10px 10px;
  margin-top: 2px;
  cursor: pointer;
}

.sms-person:hover { background: #edf2fa; }

.sms-person[aria-current="true"],
.sms-person[aria-current="true"]:hover {
  background: #e0e9f8;
  box-shadow: none;
  border-left: 3px solid #244d8b;
}

.sms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #25407A;
  flex: none;
  grid-row: 1 / span 2;
  align-self: start;
}

.sms-person-top,
.sms-person-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  grid-column: 2;
}

.sms-person-top strong {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-time {
  font-size: 12px;
  color: #5A6B93;
  flex: none;
  grid-column: 3;
  grid-row: 1;
}

.sms-snippet {
  grid-column: 2;
  font-size: 13px;
  color: #4a5578;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sms-person-meta {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25407A;
  flex: none;
}

.sms-state,
.sms-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.sms-state { background: #EEF0F6; color: #5A6B93; }
.sms-state.waiting { background: #FFE7D3; color: #C2510A; }
.sms-state.approved, .sms-state.sent { background: #E8F0FF; color: #25407A; }
.sms-state.delivered { background: #E8F5ED; color: #195934; }
.sms-state.failed, .sms-state.opted { background: #FDECEC; color: #AE291C; }
.sms-state.check { background: #FFF4D6; color: #714400; }

.sms-tag.urgent {
  background: var(--orange, #FF7A1A);
  color: #fff;
}
.sms-tag.to-act { background: #fff0d2; color: #714400; }
.sms-tag.heads { background: #E8F0FF; color: #25407A; }

.sms-thread-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

html body .sms-back {
  display: none;
  flex: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 999px !important;
  border: 1px solid #aab7cd !important;
  background: #fff !important;
  color: var(--ink) !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sms-thread-who { min-width: 0; flex: 1; }
.sms-thread-who h2 { font-size: 16px; font-weight: 600; }
.sms-thread-who p { color: #4a5578; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }

.sms-thread-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}

.sms-credit {
  font-size: 12px;
  color: #4a5578;
  text-align: right;
  line-height: 1.4;
  max-width: 16rem;
}

.sms-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #FDECEC;
  color: #AE291C;
}

.sms-chat {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f7f8fb;
}

.sms-day {
  align-self: center;
  font-size: 12px;
  color: #5A6B93;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
}

.sms-block { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }

.sms-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(78%, 440px);
}

.sms-row.from-nora { align-self: flex-end; align-items: flex-end; }
.sms-row.from-them { align-self: flex-start; align-items: flex-start; }

.sms-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sms-row.from-nora .sms-bubble {
  background: #11192e;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.sms-row.from-them .sms-bubble {
  background: #E8F0FF;
  color: #0b1230;
  border-bottom-left-radius: 6px;
}

.sms-loose .sms-bubble {
  background: #fff;
  border: 1px solid #e3e8f2;
  color: #0b1230;
}

.sms-loose-label,
.sms-meta {
  font-size: 11px;
  color: #5A6B93;
  line-height: 1.35;
}

.sms-row.from-nora .sms-meta { text-align: right; }

.sms-opted-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF4D6;
  color: #714400;
  font-size: 13px;
  line-height: 1.5;
}

.sms-draft-card {
  align-self: stretch;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid #e3e8f2;
  box-shadow: 0 2px 8px rgba(20, 33, 61, 0.05);
}

.sms-draft-card .draft-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sms-draft-card .draft-title img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.sms-draft-card h3 { font-size: 14px; font-weight: 600; }
.sms-draft-card .reason { font-size: 13px; color: #4a5578; margin-bottom: 10px; line-height: 1.45; }

.sms-draft-card textarea {
  width: 100%;
  min-height: 76px;
  padding: 8px 10px;
  border: 1px solid #aab7cd;
  border-radius: 10px;
  font: inherit;
  line-height: 1.5;
  color: inherit;
  background: #f7f8fb;
}

.sms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

html body .sms-actions .primary,
html body .sms-modal .primary,
html body .sms-compose .primary {
  background: var(--orange, #FF7A1A) !important;
  border: 1px solid var(--orange, #FF7A1A) !important;
  color: #fff !important;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body .sms-actions button,
html body .sms-compose .ghost,
html body .sms-modal .ghost {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px !important;
  border: 1px solid #aab7cd !important;
  background: #fff !important;
  color: var(--ink) !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body .sms-actions .skip {
  margin-inline-start: auto;
  background: transparent !important;
  border-color: transparent !important;
  color: #4a5578 !important;
}

.sms-draft-result { margin-top: 8px; font-size: 13px; color: #195934; }
.sms-draft-result:empty { display: none; }

.sms-composer {
  flex: none;
  padding: 12px 16px 16px;
  border-top: 1px solid #e3e8f2;
  background: #fff;
}

.sms-composer form,
.sms-compose {
  display: grid;
  gap: 8px;
}

.sms-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid #aab7cd;
  border-radius: 14px;
  font: inherit;
  line-height: 1.45;
  resize: none;
  color: inherit;
}

.sms-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sms-composer-row p { font-size: 12px; color: #5A6B93; }

.sms-compose {
  padding: 16px;
  overflow: auto;
  background: #f7f8fb;
  flex: 1;
}

.sms-compose label.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.sms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #0b1230;
}

.sms-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--navy, #25407A);
}

.sms-foot-note {
  margin: 10px auto 0;
  font-size: 12px;
  color: #5A6B93;
  line-height: 1.45;
}

/* Centre modal for cost review */
.sms-modal[hidden] { display: none !important; }

.sms-modal {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 16px;
}

.sms-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 51, 0.45);
}

.sms-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 16px 48px rgba(20, 33, 61, 0.24);
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.sms-modal-card h2 { font-size: 18px; }
.sms-modal-card .preview {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #11192e;
  color: #fff;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sms-modal-card .cost {
  background: #FFF6EA;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.sms-modal-card .cost strong { display: block; font-size: 16px; margin-bottom: 4px; }
.sms-modal-card .sms-actions { margin-top: 16px; }
.sms-modal-card .to { font-size: 13px; color: #4a5578; margin-top: 8px; }

.sms-empty {
  padding: 24px 16px;
  color: #5A6B93;
  font-size: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Author display:flex must not override the hidden attribute. */
.sms-thread[hidden],
.sms-compose-pane[hidden],
[data-thread][hidden] {
  display: none !important;
}

/* Colourful.css styles [data-review] as navy. Keep SMS actions orange. */
html body .sms-composer button.primary,
html body .sms-composer button.primary[data-sms-review],
html body .sms-compose button.primary,
html body .sms-actions button.primary,
html body #review-new,
html body #modal-approve {
  background: var(--orange, #FF7A1A) !important;
  border-color: var(--orange, #FF7A1A) !important;
  color: #fff !important;
  background-image: none !important;
}

.sms-search input,
.sms-compose input:not([type="checkbox"]),
.sms-compose select,
.sms-compose textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #aab7cd;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  background: #fff6ea;
}

.sms-compose textarea { min-height: 96px; resize: vertical; line-height: 1.5; }

.sms-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

html body .sms-filters button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px !important;
  border: 1px solid #C9D9FA !important;
  background: var(--blue-100, #E8F0FF) !important;
  color: var(--ink, #14213D) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

html body .sms-filters button:hover {
  background: var(--orange, #FF7A1A) !important;
  border-color: var(--orange, #FF7A1A) !important;
  color: #fff !important;
}

html body .sms-filters button[aria-pressed="true"],
html body .sms-filters button[aria-pressed="true"]:hover {
  background: var(--ink, #14213D) !important;
  border-color: var(--ink, #14213D) !important;
  color: #fff !important;
}

.sms-coming {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f7fb;
  color: #4a5578;
  font-size: 12px;
  line-height: 1.45;
}

.sms-people {
  flex: 1;
  overflow: auto;
  padding: 6px;
}

.sms-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 10px 10px;
  margin-top: 2px;
  cursor: pointer;
}

.sms-person:hover { background: #edf2fa; }

.sms-person[aria-current="true"],
.sms-person[aria-current="true"]:hover {
  background: #e0e9f8;
  box-shadow: none;
  border-left: 3px solid #244d8b;
}

.sms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #25407A;
  flex: none;
  grid-row: 1 / span 2;
  align-self: start;
}

.sms-person-top,
.sms-person-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  grid-column: 2;
}

.sms-person-top strong {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-time {
  font-size: 12px;
  color: #5A6B93;
  flex: none;
  grid-column: 3;
  grid-row: 1;
}

.sms-snippet {
  grid-column: 2;
  font-size: 13px;
  color: #4a5578;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sms-person-meta {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25407A;
  flex: none;
}

.sms-state,
.sms-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.sms-state { background: #EEF0F6; color: #5A6B93; }
.sms-state.waiting { background: #FFE7D3; color: #C2510A; }
.sms-state.approved, .sms-state.sent { background: #E8F0FF; color: #25407A; }
.sms-state.delivered { background: #E8F5ED; color: #195934; }
.sms-state.failed, .sms-state.opted { background: #FDECEC; color: #AE291C; }
.sms-state.check { background: #FFF4D6; color: #714400; }

.sms-tag.urgent {
  background: var(--orange, #FF7A1A);
  color: #fff;
}
.sms-tag.to-act { background: #fff0d2; color: #714400; }
.sms-tag.heads { background: #E8F0FF; color: #25407A; }

.sms-thread-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

html body .sms-back {
  display: none;
  flex: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 999px !important;
  border: 1px solid #aab7cd !important;
  background: #fff !important;
  color: var(--ink) !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sms-thread-who { min-width: 0; flex: 1; }
.sms-thread-who h2 { font-size: 16px; font-weight: 600; }
.sms-thread-who p { color: #4a5578; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }

.sms-thread-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}

.sms-credit {
  font-size: 12px;
  color: #4a5578;
  text-align: right;
  line-height: 1.4;
  max-width: 16rem;
}

.sms-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #FDECEC;
  color: #AE291C;
}

.sms-chat {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f7f8fb;
}

.sms-day {
  align-self: center;
  font-size: 12px;
  color: #5A6B93;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
}

.sms-block { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }

.sms-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(78%, 440px);
}

.sms-row.from-nora { align-self: flex-end; align-items: flex-end; }
.sms-row.from-them { align-self: flex-start; align-items: flex-start; }

.sms-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sms-row.from-nora .sms-bubble {
  background: #11192e;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.sms-row.from-them .sms-bubble {
  background: #E8F0FF;
  color: #0b1230;
  border-bottom-left-radius: 6px;
}

.sms-loose .sms-bubble {
  background: #fff;
  border: 1px solid #e3e8f2;
  color: #0b1230;
}

.sms-loose-label,
.sms-meta {
  font-size: 11px;
  color: #5A6B93;
  line-height: 1.35;
}

.sms-row.from-nora .sms-meta { text-align: right; }

.sms-opted-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF4D6;
  color: #714400;
  font-size: 13px;
  line-height: 1.5;
}

.sms-draft-card {
  align-self: stretch;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid #e3e8f2;
  box-shadow: 0 2px 8px rgba(20, 33, 61, 0.05);
}

.sms-draft-card .draft-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sms-draft-card .draft-title img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.sms-draft-card h3 { font-size: 14px; font-weight: 600; }
.sms-draft-card .reason { font-size: 13px; color: #4a5578; margin-bottom: 10px; line-height: 1.45; }

.sms-draft-card textarea {
  width: 100%;
  min-height: 76px;
  padding: 8px 10px;
  border: 1px solid #aab7cd;
  border-radius: 10px;
  font: inherit;
  line-height: 1.5;
  color: inherit;
  background: #f7f8fb;
}

.sms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

html body .sms-actions .primary,
html body .sms-modal .primary,
html body .sms-compose .primary {
  background: var(--orange, #FF7A1A) !important;
  border: 1px solid var(--orange, #FF7A1A) !important;
  color: #fff !important;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body .sms-actions button,
html body .sms-compose .ghost,
html body .sms-modal .ghost {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px !important;
  border: 1px solid #aab7cd !important;
  background: #fff !important;
  color: var(--ink) !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body .sms-actions .skip {
  margin-inline-start: auto;
  background: transparent !important;
  border-color: transparent !important;
  color: #4a5578 !important;
}

.sms-draft-result { margin-top: 8px; font-size: 13px; color: #195934; }
.sms-draft-result:empty { display: none; }

.sms-composer {
  flex: none;
  padding: 12px 16px 16px;
  border-top: 1px solid #e3e8f2;
  background: #fff;
}

.sms-composer form,
.sms-compose {
  display: grid;
  gap: 8px;
}

.sms-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid #aab7cd;
  border-radius: 14px;
  font: inherit;
  line-height: 1.45;
  resize: none;
  color: inherit;
}

.sms-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sms-composer-row p { font-size: 12px; color: #5A6B93; }

.sms-compose {
  padding: 16px;
  overflow: auto;
  background: #f7f8fb;
  flex: 1;
}

.sms-compose label.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.sms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #0b1230;
}

.sms-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--navy, #25407A);
}

.sms-foot-note {
  margin: 10px auto 0;
  font-size: 12px;
  color: #5A6B93;
  line-height: 1.45;
}

/* Centre modal for cost review */
.sms-modal[hidden] { display: none !important; }

.sms-modal {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 16px;
}

.sms-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 51, 0.45);
}

.sms-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 16px 48px rgba(20, 33, 61, 0.24);
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.sms-modal-card h2 { font-size: 18px; }
.sms-modal-card .preview {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #11192e;
  color: #fff;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sms-modal-card .cost {
  background: #FFF6EA;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.sms-modal-card .cost strong { display: block; font-size: 16px; margin-bottom: 4px; }
.sms-modal-card .sms-actions { margin-top: 16px; }
.sms-modal-card .to { font-size: 13px; color: #4a5578; margin-top: 8px; }

.sms-empty {
  padding: 24px 16px;
  color: #5A6B93;
  font-size: 13px;
}

@media (max-width: 900px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  .shell-mobile {
    display: flex;
    align-items: center;
    gap: var(--s2);
    background: linear-gradient(180deg, var(--ink), var(--ink-deep));
    color: var(--surface, #fff);
    padding: var(--s2) var(--s4);
    flex: none;
    min-height: 52px;
  }

  html body .shell-mobile button {
    color: inherit !important;
    background: transparent !important;
    border: 0 !important;
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 10px !important;
    cursor: pointer;
  }

  .shell-rail {
    display: none;
    position: static;
    height: auto;
    max-height: 62dvh;
    flex: none;
  }

  .shell-rail.shell-open { display: block; }
  .shell-brand { display: none; }

  .shell-menu-close {
    display: inline-flex;
    margin-left: auto;
    color: inherit;
    background: transparent;
    border: 0;
    min-height: 44px;
    min-width: 44px;
    font-size: 24px;
    cursor: pointer;
  }

  .board-main {
    flex: 1;
    height: auto;
    padding: 12px 16px 80px;
  }

  .tubis-launch { display: none; }
}

@media (max-width: 580px) {
  html body .nora-shared-header { padding: 16px 16px 8px; }
  .nora-shared-header .tabs { margin-top: 16px; }
  html body .nora-shared-header .tabs a { padding-inline: 10px; }

  .sms-grid {
    display: block;
    min-height: 0;
    max-height: none;
  }

  .sms-grid[data-view="list"] .sms-thread,
  .sms-grid[data-view="list"] .sms-compose-pane { display: none; }

  .sms-grid[data-view="thread"] .sms-list,
  .sms-grid[data-view="compose"] .sms-list { display: none; }

  html body .sms-back { display: inline-flex; }

  .sms-thread, .sms-list, .sms-compose-pane {
    min-height: 0;
  }

  .sms-row { max-width: 88%; }
}

@media (max-width: 479px) {
  .sms-credit { max-width: 11rem; font-size: 11px; }
  .board-main { padding: 10px 12px 72px; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .shell-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 26, 51, 0.4);
    z-index: 5;
    border: 0;
  }
  .shell-scrim.is-on { display: block; }
  .shell-rail.shell-open { position: relative; z-index: 6; }
}

/* Author display:flex must not override the hidden attribute. */
.sms-thread[hidden],
.sms-compose-pane[hidden],
[data-thread][hidden] {
  display: none !important;
}

/* Keep the composer in view on desktop; let the list and chat scroll inside the grid. */
@media (min-width: 901px) {
  .board-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 20px;
  }

  .hello.page-hello,
  .nora-shared-header,
  .sms-top,
  .sms-foot-note {
    flex: none;
    width: 100%;
  }

  .sms-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    width: 100%;
  }

  .tubis-launch {
    right: 28px;
    bottom: 20px;
  }
}

/* Colourful.css styles [data-review] as navy. Keep SMS actions orange. */
html body .sms-composer button.primary,
html body .sms-composer button.primary[data-sms-review],
html body .sms-compose button.primary,
html body .sms-actions button.primary,
html body #review-new,
html body #modal-approve {
  background: var(--orange, #FF7A1A) !important;
  border-color: var(--orange, #FF7A1A) !important;
  color: #fff !important;
  background-image: none !important;
}

/* On a phone, opening a conversation should fill the screen. */
@media (max-width: 580px) {
  body:has(#sms-grid[data-view="thread"]) .page-hello,
  body:has(#sms-grid[data-view="compose"]) .page-hello,
  body:has(#sms-grid[data-view="thread"]) .nora-shared-header,
  body:has(#sms-grid[data-view="compose"]) .nora-shared-header,
  body:has(#sms-grid[data-view="thread"]) .sms-top,
  body:has(#sms-grid[data-view="compose"]) .sms-top,
  body:has(#sms-grid[data-view="thread"]) .sms-foot-note,
  body:has(#sms-grid[data-view="compose"]) .sms-foot-note {
    display: none !important;
  }

  body:has(#sms-grid[data-view="thread"]) .board-main,
  body:has(#sms-grid[data-view="compose"]) .board-main {
    padding: 8px 10px 12px;
    overflow: hidden;
  }

  .sms-grid[data-view="thread"],
  .sms-grid[data-view="compose"] {
    min-height: calc(100dvh - 68px);
    max-height: calc(100dvh - 68px);
  }

  .sms-top {
    align-items: center;
    flex-wrap: nowrap;
  }

  .sms-top .sms-new { flex: none; }

  .sms-thread-head {
    flex-wrap: wrap;
  }

  .sms-thread-aside {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .sms-credit { text-align: right; }
}

/* Tighten the Nora banner slightly so the conversation keeps more height. */
html body .nora-shared-header {
  padding: 18px 20px 6px;
}
.nora-shared-header .tabs { margin-top: 18px; }

/* Kill the earlier 70dvh floor that pushed phone thread headers under the top bar. */
@media (max-width: 580px) {
  .sms-thread,
  .sms-list,
  .sms-compose-pane {
    min-height: 0;
  }

  .sms-grid[data-view="list"] {
    min-height: 0;
    max-height: none;
    height: auto;
  }

  body:has(#sms-grid[data-view="thread"]) .board-main,
  body:has(#sms-grid[data-view="compose"]) .board-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 10px 10px;
    min-height: 0;
  }

  .sms-grid[data-view="thread"],
  .sms-grid[data-view="compose"] {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .sms-grid[data-view="thread"] .sms-thread,
  .sms-grid[data-view="compose"] .sms-thread,
  .sms-grid[data-view="compose"] .sms-compose-pane {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }
  .sms-thread .sms-composer,
  .sms-compose-pane .sms-compose {
    flex: none;
  }
}

/* Tablet: fill leftover height like desktop, so the composer stays on screen. */
@media (min-width: 581px) and (max-width: 900px) {
  html body .page-hello:has(> .clock-widget) {
    padding-bottom: 112px !important;
  }
  .board-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 16px;
    min-height: 0;
  }
  .sms-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    width: 100%;
  }
}

/* Keep the weather card on screen at tablet widths. */
@media (max-width: 900px) {
  html body .page-hello,
  html body .page-hello:has(> .clock-widget) {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: auto !important;
  }
  /* padding-bottom is applied in the tablet band only */
  html body .page-hello .hello-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 auto !important;
    position: static !important;
  }
  html body .page-hello .clock-widget,
  html body .page-hello .clock-widget.weather-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 auto !important;
    left: auto !important;
    right: auto !important;
    position: relative !important;
  }
}

.sms-search input,
.sms-compose input:not([type="checkbox"]),
.sms-compose select,
.sms-compose textarea {
  padding-left: 14px;
}

/* SMS workspace inside the v68 Nora Inbox frame. Board chrome comes from pack CSS. */
[hidden], .sms-thread[hidden], .sms-compose-pane[hidden], [data-thread][hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  height: 100%;
  min-height: 0;
}

html.embedded, html.embedded body {
  height: 100%;
}

body.nora-inbox-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--gray-1, #f3f4f6);
}

body.nora-inbox-page > main {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
}

body.nora-inbox-page .page-hello,
body.nora-inbox-page #bot-bar {
  flex: none;
  width: 100%;
}

.sms-board {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sms-top {
  flex: none;
  width: 100%;
  margin: 12px 0;
}

.sms-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
}

.sms-foot-note { flex: none; }

/* Phone: list first, then a full-frame conversation with the composer on screen. */
@media (max-width: 580px) {
  body.nora-inbox-page > main { padding: 10px 12px 12px; }

  .sms-grid {
    display: block;
    min-height: 0;
    max-height: none;
  }

  .sms-grid[data-view="list"] .sms-thread,
  .sms-grid[data-view="list"] .sms-compose-pane { display: none; }

  .sms-grid[data-view="thread"] .sms-list,
  .sms-grid[data-view="compose"] .sms-list { display: none; }

  html body .sms-back { display: inline-flex; }

  .sms-row { max-width: 88%; }

  body:has(#sms-grid[data-view="thread"]) .page-hello,
  body:has(#sms-grid[data-view="compose"]) .page-hello,
  body:has(#sms-grid[data-view="thread"]) #bot-bar,
  body:has(#sms-grid[data-view="compose"]) #bot-bar,
  body:has(#sms-grid[data-view="thread"]) .sms-top,
  body:has(#sms-grid[data-view="compose"]) .sms-top,
  body:has(#sms-grid[data-view="thread"]) .sms-foot-note,
  body:has(#sms-grid[data-view="compose"]) .sms-foot-note {
    display: none !important;
  }

  body:has(#sms-grid[data-view="thread"]) > main,
  body:has(#sms-grid[data-view="compose"]) > main {
    padding: 8px 10px 10px;
    overflow: hidden;
  }

  .sms-grid[data-view="thread"],
  .sms-grid[data-view="compose"] {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .sms-grid[data-view="thread"] .sms-thread,
  .sms-grid[data-view="compose"] .sms-thread,
  .sms-grid[data-view="compose"] .sms-compose-pane {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .sms-thread .sms-composer,
  .sms-compose-pane .sms-compose {
    flex: none;
  }

  .sms-top { align-items: center; flex-wrap: nowrap; }
  .sms-top .sms-new { flex: none; }
  .sms-thread-head { flex-wrap: wrap; }
  .sms-thread-aside {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
  .sms-credit { text-align: right; max-width: 11rem; font-size: 11px; }
}

@media (min-width: 581px) and (max-width: 900px) {
  body.nora-inbox-page > main { padding: 12px 16px 16px; }
}

/* Frame fill and no horizontal overflow (overrides pack main width). */
html body.nora-inbox-page,
html.embedded body.nora-inbox-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

html body.nora-inbox-page > main {
  flex: 1 1 0%;
  min-height: 0;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
  align-self: stretch !important;
}

html body.nora-inbox-page .page-hello,
html body.nora-inbox-page #bot-bar,
html body.nora-inbox-page .sms-board,
html body.nora-inbox-page .sms-top,
html body.nora-inbox-page .sms-grid {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html body.nora-inbox-page .bot-tabs {
  flex-wrap: wrap;
  min-width: 0;
}

html body.nora-inbox-page .tubis-launch { display: none !important; }

html body.nora-inbox-page .page-hello,
html body.nora-inbox-page .page-hello .hello-copy,
html body.nora-inbox-page .clock-widget,
html body.nora-inbox-page .clock-widget.weather-card {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 580px) {
  html body.nora-inbox-page .page-hello {
    flex-wrap: wrap !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  html body.nora-inbox-page .page-hello .hello-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    position: static !important;
  }
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    position: relative !important;
  }
  html body.nora-inbox-page .sms-composer textarea,
  html body.nora-inbox-page .sms-compose input:not([type="checkbox"]),
  html body.nora-inbox-page .sms-compose select,
  html body.nora-inbox-page .sms-compose textarea {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Give the people list a real slice of the pane; the coming-next note stays short. */
.sms-coming {
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  margin: 8px 0 0;
}
.sms-list-head { padding-bottom: 8px; }
.sms-people { min-height: 140px; }

@media (max-width: 580px) {
  /* List view: scroll the frame so people below the header are reachable. */
  html body.nora-inbox-page:has(#sms-grid[data-view="list"]) > main {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  html body.nora-inbox-page .bot-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
  }
  .sms-grid[data-view="list"] {
    display: flex;
    flex-direction: column;
    min-height: 320px;
  }
  .sms-grid[data-view="list"] .sms-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .sms-grid[data-view="list"] .sms-people {
    flex: 1 1 auto;
    min-height: 200px;
    overflow: auto;
  }
}

/* ---- WhatsApp-style list fixes (win over colourful nora-page button pills) ---- */
html body.nora-page button.sms-person,
html body.nora-inbox-page button.sms-person,
html body.nora-page .sms-people button.sms-person {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) max-content !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  gap: 2px 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #e8ecf3 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #14213D !important;
  text-align: left !important;
  font: inherit !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  overflow: visible !important;
  transform: none !important;
}

html body.nora-page button.sms-person:hover,
html body.nora-inbox-page button.sms-person:hover {
  background: #f4f7fb !important;
  background-image: none !important;
  color: #14213D !important;
}

html body.nora-page button.sms-person[aria-current="true"],
html body.nora-inbox-page button.sms-person[aria-current="true"],
html body.nora-page button.sms-person[aria-current="true"]:hover,
html body.nora-inbox-page button.sms-person[aria-current="true"]:hover {
  background: #e8eef8 !important;
  background-image: none !important;
  color: #14213D !important;
  box-shadow: inset 3px 0 0 #25407A !important;
  border-bottom-color: #e8ecf3 !important;
}

html body.nora-inbox-page .sms-avatar {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
}

html body.nora-inbox-page .sms-person-top {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

html body.nora-inbox-page .sms-person-top strong,
html body.nora-inbox-page button.sms-person strong {
  color: #14213D !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

html body.nora-inbox-page .sms-time,
html body.nora-inbox-page button.sms-person .sms-time {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  flex: none !important;
  font-size: 12px !important;
  color: #3d4a66 !important;
  line-height: 1.3 !important;
}

html body.nora-inbox-page .sms-snippet,
html body.nora-inbox-page button.sms-person .sms-snippet {
  grid-column: 2 !important;
  grid-row: 2 !important;
  color: #3d4a66 !important;
  font-size: 13px !important;
  -webkit-line-clamp: 1 !important;
  line-clamp: 1;
  max-height: 1.4em;
}

html body.nora-inbox-page .sms-person-meta {
  grid-column: 3 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  flex-wrap: nowrap !important;
}

/* New text: a normal orange pill, not a clipped blob */
html body.nora-page .sms-top button.sms-new,
html body.nora-inbox-page .sms-top button.sms-new,
html body.nora-page button.sms-new {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: auto !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: #FF7A1A !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  overflow: visible !important;
  transform: none !important;
  white-space: nowrap !important;
}

html body.nora-page .sms-top button.sms-new:hover,
html body.nora-inbox-page .sms-top button.sms-new:hover {
  background: #e86a12 !important;
  background-image: none !important;
  color: #fff !important;
}

/* Filter chips: light rest, only the active one filled */
html body.nora-page .sms-filters button,
html body.nora-inbox-page .sms-filters button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #d5dbe8 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #14213D !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  overflow: visible !important;
  transform: none !important;
}

html body.nora-page .sms-filters button:hover,
html body.nora-inbox-page .sms-filters button:hover {
  background: #f4f7fb !important;
  background-image: none !important;
  color: #14213D !important;
}

html body.nora-page .sms-filters button[aria-pressed="true"],
html body.nora-inbox-page .sms-filters button[aria-pressed="true"],
html body.nora-page .sms-filters button[aria-pressed="true"]:hover,
html body.nora-inbox-page .sms-filters button[aria-pressed="true"]:hover {
  background: #25407A !important;
  background-image: none !important;
  border-color: #25407A !important;
  color: #fff !important;
}

/* Composer stays inside the thread card */
html body.nora-inbox-page .sms-composer,
html body.nora-inbox-page .sms-composer form,
html body.nora-inbox-page .sms-thread,
html body.nora-inbox-page .sms-compose,
html body.nora-inbox-page .sms-compose-pane {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html body.nora-inbox-page .sms-composer textarea,
html body.nora-inbox-page .sms-compose textarea,
html body.nora-inbox-page .sms-compose input:not([type="checkbox"]),
html body.nora-inbox-page .sms-compose select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Tighter chrome so 6–8 conversation rows fit */
html body.nora-inbox-page .sms-top {
  margin: 8px 0 8px;
  align-items: center;
}
html body.nora-inbox-page .sms-list-head {
  padding: 10px 12px 8px;
}
html body.nora-inbox-page .sms-search { margin-top: 8px; }
html body.nora-inbox-page .sms-search input { min-height: 36px; padding: 6px 12px; }
html body.nora-inbox-page .sms-filters { margin-top: 8px; }
html body.nora-inbox-page .sms-coming { display: none !important; }
html body.nora-inbox-page .sms-people { padding: 0; min-height: 0; }
html body.nora-inbox-page .sms-grid {
  min-height: 0;
  /* Fill leftover frame height so the list can show 6–8 compact rows */
  flex: 1 1 auto;
}

/* Beat colourful's 8-class button:not(...) { border-radius: 999px } and fill the frame. */
html.embedded,
html.embedded body.nora-inbox-page,
html body.nora-inbox-page {
  height: 100%;
  max-height: 100%;
  min-height: 100%;
}

html body.nora-inbox-page > main {
  padding-bottom: 80px;
}

html body.nora-inbox-page .sms-board,
html body.nora-inbox-page .sms-grid,
html body.nora-inbox-page .sms-list,
html body.nora-inbox-page .sms-thread {
  flex: 1 1 auto;
  min-height: 0;
}

html body.nora-page.nora-inbox-page button.sms-person:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-page.nora-inbox-page .sms-people button.sms-person {
  border-radius: 0 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 1px solid #e8ecf3 !important;
  color: #14213D !important;
}

html body.nora-page.nora-inbox-page button.sms-person:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row):hover {
  background: #f4f7fb !important;
  background-image: none !important;
  color: #14213D !important;
  border-radius: 0 !important;
}

html body.nora-page.nora-inbox-page button.sms-person[aria-current="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-page.nora-inbox-page button.sms-person[aria-current="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row):hover {
  background: #e8eef8 !important;
  background-image: none !important;
  color: #14213D !important;
  border-radius: 0 !important;
  box-shadow: inset 3px 0 0 #25407A !important;
}

html body.nora-page.nora-inbox-page .sms-top button.sms-new:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: #FF7A1A !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  line-height: 1 !important;
  overflow: visible !important;
}

html body.nora-page.nora-inbox-page .sms-filters button:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1px solid #d5dbe8 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #14213D !important;
  line-height: 1 !important;
}

html body.nora-page.nora-inbox-page .sms-filters button[aria-pressed="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-page.nora-inbox-page .sms-filters button[aria-pressed="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row):hover {
  background: #25407A !important;
  background-image: none !important;
  border-color: #25407A !important;
  color: #fff !important;
}

/* Two-panel widths (incl. 1000px Safari: 250px rail + ~750px frame):
   keep greeting + weather on one row, bot-bar on one row, and give
   the conversation list the leftover height so 6–8 rows can show. */
@media (min-width: 581px) {
  html body.nora-inbox-page .page-hello,
  html body.nora-inbox-page .page-hello:has(> .clock-widget) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 10px !important;
    gap: 12px 16px !important;
  }
  html body.nora-inbox-page .page-hello .hello-copy {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    position: static !important;
  }
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    flex: 0 1 340px !important;
    width: min(340px, 46%) !important;
    max-width: 360px !important;
    min-width: 220px !important;
    margin: 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
  }

  html body.nora-inbox-page.bot-page #bot-bar,
  html body.nora-inbox-page #bot-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px 12px !important;
    margin: 0 0 8px !important;
  }
  html body.nora-inbox-page.bot-page #bot-bar .bot-bar-who,
  html body.nora-inbox-page #bot-bar .bot-bar-who {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  html body.nora-inbox-page.bot-page #bot-bar .bot-tabs,
  html body.nora-inbox-page #bot-bar .bot-tabs {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
  }
  html body.nora-inbox-page.bot-page #bot-bar .bot-settings,
  html body.nora-inbox-page #bot-bar .bot-settings {
    flex: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin-left: 0 !important;
  }

  html body.nora-inbox-page > main {
    padding-bottom: 28px;
  }
  html body.nora-inbox-page .sms-top {
    margin: 4px 0 8px;
  }
  html body.nora-inbox-page .sms-list-head {
    padding: 8px 12px 8px;
  }
  html body.nora-inbox-page .sms-list-head h2 {
    font-size: 15px;
    margin: 0;
  }
  html body.nora-inbox-page .sms-search { margin-top: 6px; }
  html body.nora-inbox-page .sms-search input { min-height: 34px; }
  html body.nora-inbox-page .sms-filters { margin-top: 6px; }
  html body.nora-inbox-page .sms-foot-note {
    margin: 6px 0 0;
    font-size: 12px;
  }
}

/* Pack reserves 120px under main for the T.U.B.I.S. launcher. In this
   iframe the launcher already sits on the shell, so reclaim that space
   for the conversation list. */
html body.nora-inbox-page,
html body.nora-inbox-page.bot-page {
  --tubis-launch-clear: 24px;
}
html body.nora-inbox-page > main,
html body.nora-inbox-page.bot-page > main,
html body.bot-page.nora-inbox-page main {
  padding-top: 16px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-bottom: 24px !important;
}

html body.nora-page.nora-inbox-page button.sms-person:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row) {
  padding: 6px 12px !important;
}

@media (max-width: 580px) {
  html body.nora-inbox-page > main,
  html body.nora-inbox-page.bot-page > main {
    padding: 10px 12px 72px !important;
  }
}

@media (min-width: 581px) and (max-width: 900px) {
  /* 1000px Safari window → ~750px iframe: shrink the weather card so it
     stays on one row with the greeting and is not clipped. */
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    flex: 0 1 260px !important;
    width: 260px !important;
    max-width: 260px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html body.nora-inbox-page .sms-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto;
  }
  html body.nora-inbox-page .bot-bar-name {
    white-space: nowrap !important;
  }
  html body.nora-inbox-page .bot-bar-name span,
  html body.nora-inbox-page .bot-bar-who .bot-bar-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Phone list: let the conversation rows sit in normal flow so they can be
   scrolled to. Height-locked iframe + overflow:hidden was clipping them. */
@media (max-width: 580px) {
  html.embedded:has(#sms-grid[data-view="list"]),
  html body.nora-inbox-page:has(#sms-grid[data-view="list"]),
  html.embedded body.nora-inbox-page:has(#sms-grid[data-view="list"]) {
    height: auto !important;
    max-height: none !important;
    min-height: 100%;
    overflow: visible !important;
  }
  html body.nora-inbox-page:has(#sms-grid[data-view="list"]) > main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
  }
  html body.nora-inbox-page .sms-grid[data-view="list"],
  html body.nora-inbox-page .sms-grid[data-view="list"] .sms-list,
  html body.nora-inbox-page .sms-grid[data-view="list"] .sms-people,
  html body.nora-inbox-page:has(#sms-grid[data-view="list"]) .sms-board {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
  }
  html body.nora-inbox-page .bot-tabs {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
}

/* Keep chip labels on one line; give the mid-width weather card enough
   room for Brisbane + temperature so they are not clipped. */
html body.nora-inbox-page .sms-filters button {
  white-space: nowrap !important;
}

@media (min-width: 581px) and (max-width: 900px) {
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    flex: 0 0 340px !important;
    width: 340px !important;
    max-width: 340px !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  html body.nora-inbox-page .page-hello .hello-copy {
    min-width: 0 !important;
    flex: 1 1 0 !important;
  }
}

@media (min-width: 581px) {
  html body.nora-inbox-page .sms-composer-row {
    padding-right: 88px;
    box-sizing: border-box;
  }
}

@media (max-width: 580px) {
  html body.nora-inbox-page.bot-page .bot-bar .bot-tabs,
  html body.nora-inbox-page .bot-bar .bot-tabs {
    flex-wrap: wrap !important;
    overflow-x: auto !important;
  }
  html body.nora-inbox-page.bot-page .bot-bar .bot-tabs a,
  html body.nora-inbox-page .bot-tabs a {
    padding: 0 8px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 581px) and (max-width: 900px) {
  html body.nora-inbox-page .sms-filters {
    flex-wrap: wrap !important;
  }
  html body.nora-page.nora-inbox-page .sms-filters button:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row) {
    padding: 0 8px !important;
    font-size: 12px !important;
  }
}

/* ---- T.U.B.I.S. chat colours and a taller two-panel inbox ---- */
/* Colours from tubis-colourful.css ("T.U.B.I.S. chat light blue 30 Nov"):
   .tubis-msg.bot #F1F6FF / #D6E4FF, .tubis-msg.me #DCEBFF / #C3D8FF, text var(--ink). */
html body.nora-inbox-page .sms-bubble {
  font-size: 14px;
  line-height: 1.4;
  padding: 7px 11px;
  color: var(--ink, #14213D);
}
html body.nora-inbox-page .sms-row.from-them .sms-bubble {
  background: #F1F6FF;
  border: 1px solid #D6E4FF;
  color: var(--ink, #14213D);
}
html body.nora-inbox-page .sms-row.from-nora .sms-bubble {
  background: #DCEBFF;
  border: 1px solid #C3D8FF;
  color: var(--ink, #14213D);
}
html body.nora-inbox-page .sms-loose .sms-bubble {
  background: #F1F6FF;
  border: 1px solid #D6E4FF;
  color: var(--ink, #14213D);
}
html body.nora-inbox-page .sms-meta,
html body.nora-inbox-page .sms-loose-label,
html body.nora-inbox-page .sms-chat .sms-day {
  color: #5A6B93;
}
html body.nora-inbox-page .sms-chat {
  padding: 10px 14px;
  gap: 8px;
  background: #f7f8fb;
}

/* Grow the two-panel card: tighten SMS chrome, not the v68 greeting look. */
html body.nora-inbox-page .sms-top {
  margin: 2px 0 6px;
}
html body.nora-inbox-page .sms-list-head,
html body.nora-inbox-page .sms-thread-head {
  padding: 8px 12px;
}
html body.nora-inbox-page .sms-composer {
  padding: 8px 12px 10px;
}
html body.nora-inbox-page .sms-composer form {
  gap: 6px;
}
html body.nora-inbox-page .sms-composer textarea,
html body.nora-inbox-page .sms-compose textarea {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
}

@media (min-width: 581px) {
  html body.nora-inbox-page,
  html body.nora-inbox-page.bot-page {
    --tubis-launch-clear: 16px;
  }
  html body.nora-inbox-page > main,
  html body.nora-inbox-page.bot-page > main,
  html body.bot-page.nora-inbox-page main {
    padding-bottom: 16px !important;
  }
  html body.nora-inbox-page .page-hello,
  html body.nora-inbox-page .page-hello:has(> .clock-widget) {
    margin-bottom: 6px !important;
  }
  html body.nora-inbox-page.bot-page #bot-bar,
  html body.nora-inbox-page #bot-bar {
    margin-bottom: 4px !important;
  }
  html body.nora-inbox-page .sms-foot-note {
    margin-top: 4px;
  }
}

/* ---- Thiago 3 Dec 7:59pm: Review button, launcher clearance, thin weather, tab-style chips ---- */

/* 1. Review and send: a real 40px primary pill, not a 17px tag. */
html body.nora-page.nora-inbox-page .sms-composer button.primary:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-inbox-page .sms-composer button.primary[data-sms-review],
html body.nora-inbox-page .sms-compose button.primary,
html body.nora-inbox-page #review-new,
html body.nora-inbox-page #modal-approve {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--orange, #FF7A1A) !important;
  background-image: none !important;
  color: var(--surface, #fff) !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.28) !important;
  overflow: visible !important;
  transform: none !important;
  white-space: nowrap !important;
  cursor: pointer;
}
html body.nora-page.nora-inbox-page .sms-composer button.primary:not(.shell-row):hover,
html body.nora-inbox-page .sms-composer button.primary[data-sms-review]:hover,
html body.nora-inbox-page #review-new:hover,
html body.nora-inbox-page #modal-approve:hover {
  background: #E86A12 !important;
  background-image: none !important;
  color: var(--surface, #fff) !important;
}

/* 2. Leave room in the composer for the 52px T.U.B.I.S. avatar launcher. */
@media (min-width: 581px) {
  html body.nora-inbox-page .sms-composer {
    padding-bottom: 72px;
  }
  html body.nora-inbox-page .sms-composer-row {
    padding-right: 64px;
    box-sizing: border-box;
  }
  html body.nora-inbox-page .sms-foot-note {
    padding-right: 72px;
    box-sizing: border-box;
  }
}

/* 3. Stop the mockup from locking the weather card at 340px (that made it
   fat). Use the official 114bbfc weather-card metrics, and keep greeting
   + card on one row so the inbox stays tall. */
@media (min-width: 581px) {
  html body.nora-inbox-page .page-hello,
  html body.nora-inbox-page .page-hello:has(> .clock-widget) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    padding-bottom: 0 !important;
  }
  html body.nora-inbox-page .page-hello .hello-copy {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  html body.nora-inbox-page .clock-widget,
  html body.nora-inbox-page .clock-widget.weather-card,
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 112px !important;
    height: auto !important;
    overflow: visible !important;
    padding: 16px 28px 16px 24px !important;
    align-self: flex-start !important;
    box-sizing: border-box !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
  }
}
@media (min-width: 581px) and (max-width: 900px) {
  /* Official tablet padding and min-height from colourful.css, still in one row. */
  html body.nora-inbox-page .clock-widget.weather-card,
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    min-height: 96px !important;
    padding: 14px 18px 14px 16px !important;
  }
}

/* 4. Filter chips use the same tab tokens as Today / Calendar / Inbox:
   rest light blue, hover orange, active navy. */
html body.nora-page.nora-inbox-page .sms-filters button:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-inbox-page .sms-filters button {
  background: var(--tab-rest-bg, var(--blue-100, #E8F0FF)) !important;
  background-image: none !important;
  color: var(--tab-rest-color, var(--ink, #14213D)) !important;
  border: 0 !important;
  border-color: var(--tab-rest-border, #C9D9FA) !important;
  border-radius: 999px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
html body.nora-page.nora-inbox-page .sms-filters button:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row):hover,
html body.nora-inbox-page .sms-filters button:hover {
  background: var(--tab-hover-bg, var(--orange, #FF7A1A)) !important;
  background-image: none !important;
  color: var(--tab-hover-color, var(--surface, #fff)) !important;
  border-color: var(--tab-hover-bg, var(--orange, #FF7A1A)) !important;
}
html body.nora-page.nora-inbox-page .sms-filters button[aria-pressed="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row),
html body.nora-page.nora-inbox-page .sms-filters button[aria-pressed="true"]:not(.shell-row):not(.mail):not(.folder):not(.mila-review-trigger):not(.deal):not(.action-row):not(.board-row):not(.mila-draft-row):hover,
html body.nora-inbox-page .sms-filters button[aria-pressed="true"],
html body.nora-inbox-page .sms-filters button[aria-pressed="true"]:hover {
  background: var(--tab-active-bg, var(--ink, #14213D)) !important;
  background-image: none !important;
  color: var(--tab-active-color, var(--surface, #fff)) !important;
  border-color: var(--tab-active-bg, var(--ink, #14213D)) !important;
}

/* Give the weather card enough width for time + Brisbane + temp in a
   row, so it stays the official thin bar instead of a crushed tile. */
@media (min-width: 581px) {
  html body.nora-inbox-page .page-hello .hello-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  html body.nora-inbox-page .clock-widget.weather-card,
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    flex: 1 1 380px !important;
    min-width: min(380px, 52%) !important;
    max-width: 100% !important;
  }
}

/* Don't let the greeting shrink into a tall skinny column at ~1000px. */
@media (min-width: 581px) {
  html body.nora-inbox-page .page-hello .hello-copy {
    flex: 1 1 42% !important;
    min-width: 240px !important;
  }
  html body.nora-inbox-page .clock-widget.weather-card,
  html body.nora-inbox-page .page-hello .clock-widget,
  html body.nora-inbox-page .page-hello .clock-widget.weather-card {
    flex: 1 1 48% !important;
    min-width: 280px !important;
    max-width: 56% !important;
  }
}


/* ---- New text compose pane (right panel) ---- */
html body.nora-inbox-page .sms-compose-pane .sms-compose,
html body .sms-compose-pane .sms-compose {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 14px 16px 16px;
}

html body.nora-inbox-page .sms-compose .sms-to-block,
html body .sms-compose .sms-to-block {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: end;
  min-width: 0;
  max-width: 100%;
}

html body.nora-inbox-page .sms-compose label.field,
html body .sms-compose label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #14213D);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
}

html body.nora-inbox-page .sms-compose input:not([type="checkbox"]),
html body.nora-inbox-page .sms-compose select,
html body.nora-inbox-page .sms-compose textarea,
html body .sms-compose input:not([type="checkbox"]),
html body .sms-compose select,
html body .sms-compose textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #aab7cd;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--ink, #14213D);
  background: #fff6ea; /* same beige as the conversation search box */
  appearance: none;
  -webkit-appearance: none;
}

html body.nora-inbox-page .sms-compose select,
html body .sms-compose select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%235A6B93' d='M4 6l4 5 4-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
  padding-right: 28px;
  cursor: pointer;
}

html body.nora-inbox-page .sms-compose textarea,
html body .sms-compose textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

html body.nora-inbox-page .sms-compose [data-parts],
html body .sms-compose [data-parts] {
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #5A6B93;
}

html body.nora-inbox-page .sms-compose label.sms-consent,
html body .sms-compose label.sms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100%;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink, #14213D);
}

html body.nora-inbox-page .sms-compose .sms-consent input[type="checkbox"],
html body .sms-compose .sms-consent input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: auto;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  border: 1px solid #8a97b3 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: none !important;
  accent-color: var(--navy, #25407A);
}

html body.nora-inbox-page .sms-compose .sms-consent span,
html body .sms-compose .sms-consent span {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

html body.nora-inbox-page .sms-compose .sms-actions,
html body .sms-compose .sms-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  width: 100%;
  max-width: 100%;
}

html body.nora-inbox-page .sms-compose .sms-draft-result,
html body .sms-compose .sms-draft-result {
  margin: 0;
  min-height: 0;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 580px) {
  html body.nora-inbox-page .sms-compose .sms-to-block,
  html body .sms-compose .sms-to-block {
    grid-template-columns: minmax(0, 1fr);
  }
  html body.nora-inbox-page .sms-compose .sms-actions,
  html body .sms-compose .sms-actions {
    justify-content: stretch;
  }
  html body.nora-inbox-page .sms-compose .sms-actions button,
  html body .sms-compose .sms-actions button {
    flex: 1 1 auto;
  }
}

html body.nora-inbox-page .sms-compose select,
html body .sms-compose select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.nora-inbox-page .sms-compose label.sms-consent,
html body .sms-compose label.sms-consent {
  min-height: 0;
  height: auto;
}

html body.nora-inbox-page .sms-compose .sms-actions button.ghost,
html body.nora-inbox-page .sms-compose button.ghost#save-draft,
html body .sms-compose .sms-actions button.ghost {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid #25407A !important;
  background: #fff !important;
  color: #25407A !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html body.nora-inbox-page .sms-compose .sms-actions button.primary,
html body.nora-inbox-page .sms-compose button.primary#review-new,
html body .sms-compose .sms-actions button.primary {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 18px !important;
}
