.template-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #54656f;
  background: transparent;
}
.template-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.template-button:hover:not(:disabled) { background: #dfe5e7; }
.template-button:disabled { cursor: not-allowed; color: #aeb8bd; }
.template-menu-button { width: auto; min-width: 94px; padding: 0 12px; grid-auto-flow: column; gap: 7px; border-radius: 21px; font-size: .78rem; font-weight: 700; }
.quick-reply-menu-button { min-width: 86px; }
.mobile-actions-button, .mobile-actions-picker { display: none; }
.empty-chat[hidden] { display: none; }
.picker-content { display: grid; gap: 15px; padding: 24px; }
.template-option { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 14px; border: 1px solid #dfe5e7; border-radius: 12px; color: var(--ink); text-align: left; background: #fff; }
.template-option:hover { border-color: #9bd9ca; background: #f3fffa; }
.template-option:disabled { cursor: not-allowed; opacity: .72; background: #f7f8f8; }
.template-status { padding: 5px 8px; border-radius: 999px; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.template-status.pending { color: #8a5a00; background: #fff1c7; }
.template-option-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #087a65; background: #d9fdd3; font-size: .82rem; font-weight: 800; }
.template-option-copy { display: grid; min-width: 0; gap: 3px; }
.template-option-copy strong { font-size: .9rem; }
.template-option-copy code { overflow: hidden; color: #087a65; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.template-option-copy small { color: #667781; font-size: .75rem; line-height: 1.35; }
.template-option-arrow { color: #8696a0; font-size: 1.7rem; }
.template-dialog { width: min(92vw, 560px); max-height: 90dvh; padding: 0; border: 0; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px #0b141a55; }
.template-dialog::backdrop { background: #0b141a99; }
.template-dialog form { display: grid; gap: 15px; padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-heading .eyebrow { margin: 0 0 4px; color: #087a65; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #54656f; background: #f0f2f5; font-size: 1.5rem; line-height: 1; }
.dialog-note { margin: 0; padding: 11px 13px; border-radius: 9px; color: #40545e; background: #e7fce9; font-size: .82rem; line-height: 1.45; }
.template-dialog label { display: grid; gap: 6px; color: #40545e; font-size: .79rem; font-weight: 700; }
.template-dialog input { height: 43px; padding: 0 12px; border: 1px solid #d5dcdf; border-radius: 8px; outline: 0; }
.template-dialog input:focus { border-color: #00a884; box-shadow: 0 0 0 3px #00a8841f; }
.template-preview { min-height: 150px; padding: 13px; border: 1px solid #dfe5e7; border-radius: 10px; background: #f7f8f8; }
.template-preview strong { display: block; margin-bottom: 9px; color: #60717b; font-size: .72rem; text-transform: uppercase; }
.template-preview div { white-space: pre-wrap; font-size: .84rem; line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.dialog-actions button { padding: 0 17px; }
.secondary-button { height: 47px; border: 1px solid #d5dcdf; border-radius: 9px; color: #40545e; background: #fff; font-weight: 700; }
.dialog-actions .primary-button:disabled { cursor: not-allowed; opacity: .6; }
@media (max-width: 760px) {
  .template-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .template-dialog form { padding: 19px; }
  .template-preview { max-height: 190px; overflow: auto; }
  .composer .template-menu-button { display: none; }
  .composer #attachButton { display: none; }
  .mobile-actions-button { display: grid; width: 38px; height: 38px; }
  .mobile-actions-picker[open] { display: block; }
}
