/* WaggleTails web - applications queue, application details, messages list, the adoption thread and the two modals.
   Sources: ShelterApplicationsPage.xaml, ShelterApplicationDetailsPage.xaml, ShelterMessagesPage.xaml (phase 1). */

/* Glyphs these views use that wt-icons.css does not yet list (Font Awesome 6 Free code points). */
.fa-magnifying-glass::before { content: "\f002"; }
.fa-location-dot::before { content: "\f3c5"; }
.fa-phone::before { content: "\f095"; }
.fa-chevron-right::before { content: "\f054"; }
.fa-file-lines::before { content: "\f15c"; }
.fa-message::before { content: "\f27a"; }
.fa-paper-plane::before { content: "\f1d8"; }
.fa-xmark::before { content: "\f00d"; }
.fa-share-nodes::before { content: "\f1e0"; }
.fa-arrow-up::before { content: "\f062"; }
.fa-user::before { content: "\f007"; }

/* Page sub-head - ShelterApplicationDetailsPage.xaml:54-57 / ShelterMessagesPage.xaml:36-39 */
.wt-subhead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wt-subhead__text {
  flex: 1 1 auto;
  min-width: 0;
}
.wt-subhead__title {
  font-weight: 600;
  font-size: 20px;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-subhead__sub {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-subhead__back {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 20px;
  background: var(--wt-surface-muted);
  color: var(--wt-text-body-soft);
  text-decoration: none;
}

/* Search pill - ShelterApplicationsPage.xaml:36-56 (grey pill, 48 px, leading glyph); the .wt-search block itself is wt-shelter.css */
.wt-search--pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--wt-surface-muted);
  color: var(--wt-text-muted);
}
.wt-search--pill input {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--wt-text);
  font-family: var(--wt-font);
  font-size: 14px;
}
.wt-search--pill input:focus {
  outline: none;
}
.wt-search__go {
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--wt-primary);
  font-family: var(--wt-font);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}

/* Filter chips - ShelterApplicationsPage.xaml:58-96 (radius 18, 12/8 padding, PoppinsMedium 12). QC 2026-10-14 (Hiba,
   "Cropped word. Inactive"): a non-wrapping strip with its scrollbar hidden cut the last chip at the content edge, so the row
   wraps - the house rule for a chip group. */
.wt-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}
.wt-filter-row .wt-chip {
  border: 0;
  padding: 8px 12px;
  border-radius: 18px;
  font-weight: 500;
  font-size: 12px;
  text-decoration: none;
  color: var(--wt-text-body-soft);
}
.wt-filter-row .wt-chip.is-selected {
  color: #fff;
}

/* Avatar discs - 48 px teal (list), 64 px teal (details), 56 px amber (messages) */
.wt-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wt-primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.wt-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.wt-avatar--sm {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.wt-avatar--md {
  width: 56px;
  height: 56px;
}
.wt-avatar--amber {
  background: var(--wt-secondary);
}
.wt-stack--xs {
  gap: 2px;
}
.wt-stack--md {
  gap: 10px;
}
.wt-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.wt-avatar-wrap .wt-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 24px;
  border: 2px solid var(--wt-card);
  border-radius: 12px;
  font-size: 10px;
}

/* Application card - ShelterApplicationsPage.xaml:144-238 */
.wt-app-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-app-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}
.wt-app-card__who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wt-app-card__name {
  font-weight: 500;
  font-size: 15px;
  color: var(--wt-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-app-card__for {
  font-size: 13px;
  color: var(--wt-text-secondary);
}
.wt-app-card__applied {
  font-size: 11px;
  color: var(--wt-text-secondary);
}
.wt-app-card .wt-badge {
  padding: 5px 9px;
  border-radius: 14px;
  font-size: 10px;
}
.wt-pet-strip {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--wt-surface-subtle);
  color: inherit;
  text-decoration: none;
}
.wt-pet-strip__image {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
  font-size: 20px;
}
.wt-pet-strip__image--lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.wt-pet-strip__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wt-pet-strip__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wt-pet-strip__name {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-pet-strip__meta {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-pet-strip__chevron {
  color: var(--wt-text-muted);
  font-size: 16px;
}
.wt-app-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.wt-app-fact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 11px;
  color: var(--wt-text-secondary);
}
.wt-app-fact i {
  color: var(--wt-primary);
  font-size: 13px;
}
.wt-app-fact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-unread-line {
  font-weight: 500;
  font-size: 11px;
  color: var(--wt-warm-border);
}
.wt-btn--soft {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-primary);
  font-weight: 500;
  font-size: 13px;
}

/* Details page cards - ShelterApplicationDetailsPage.xaml:66-173 */
.wt-mission-card {
  padding: 16px;
  border-radius: var(--wt-radius-card);
  background: linear-gradient(90deg, var(--wt-soft-teal-bg), var(--wt-soft-gold-bg));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-applicant {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.wt-applicant__name {
  font-weight: 500;
  font-size: 17px;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-applicant__where {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-contact-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  font-size: 13px;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-contact-row i {
  width: 17px;
  margin-top: 2px;
  color: var(--wt-primary);
  font-size: 15px;
  text-align: center;
}
.wt-contact-row i.is-muted {
  color: var(--wt-text-muted);
}
.wt-warm-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--wt-gradient-warm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-warm-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 16px;
  color: var(--wt-text);
}
.wt-warm-card__title i {
  color: var(--wt-secondary);
  font-size: 18px;
}
.wt-subcard {
  padding: 12px;
  border: 1px solid var(--wt-card-border);
  border-radius: 16px;
  background: var(--wt-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wt-subcard--lg {
  padding: 14px;
  gap: 8px;
}
.wt-subcard__caption {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--wt-text-secondary);
}
.wt-subcard__title {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
}
.wt-subcard__tag {
  font-size: 11px;
  color: var(--wt-primary);
}
.wt-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  font-size: 13px;
}
.wt-kv dt {
  color: var(--wt-text-secondary);
}
.wt-kv dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-kv--plain dd {
  font-weight: 400;
}
.wt-kv--stacked {
  grid-template-columns: 1fr;
  gap: 2px;
}
.wt-kv--stacked dt {
  font-size: 11px;
}
.wt-kv--stacked dd {
  text-align: left;
  font-weight: 400;
  margin-bottom: 6px;
}
.wt-quote {
  font-style: italic;
  font-size: 13px;
  line-height: 1.3;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-gold-card {
  padding: 16px;
  border-radius: 20px;
  background: var(--wt-soft-gold-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-gold-card__title {
  font-weight: 500;
  font-size: 16px;
  color: var(--wt-text);
}

/* Application actions - ShelterApplicationDetailsPage.xaml:237-257 */
.wt-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wt-actions__title {
  font-weight: 600;
  font-size: 18px;
  color: var(--wt-text);
}
.wt-actions form {
  margin: 0;
}
.wt-actions__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wt-actions__pair form {
  min-width: 0;
}
.wt-btn--approve {
  background: var(--wt-success);
  color: #fff;
  font-weight: 500;
}
.wt-btn--decline {
  background: var(--wt-danger-accent);
  color: #fff;
  font-weight: 500;
}
.wt-adopted-banner {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--wt-soft-teal-bg), var(--wt-soft-gold-bg));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.wt-adopted-banner i {
  font-size: 36px;
  color: var(--wt-primary);
}
.wt-adopted-banner__title {
  font-weight: 600;
  font-size: 17px;
  color: var(--wt-text);
}
.wt-adopted-banner__text {
  font-size: 13px;
  color: var(--wt-text-secondary);
}

/* Thread - ShelterApplicationDetailsPage.xaml:264-308 and ShelterMessagesPage.xaml:145-220 */
.wt-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wt-thread__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wt-thread__title {
  font-weight: 600;
  font-size: 18px;
  color: var(--wt-text);
}
.wt-thread__older {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--wt-soft-teal-bg);
  border-radius: 18px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-primary);
  font-family: var(--wt-font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.wt-thread__list {
  list-style: none;
  margin: 0;
  padding: 12px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 16px;
  background: var(--wt-surface-subtle);
}
.wt-thread__list:empty {
  display: none;
}
.wt-thread__empty,
.wt-thread__notice {
  font-size: 13px;
  color: var(--wt-text-secondary);
}
.wt-thread__notice {
  padding: 12px;
  border-radius: 16px;
  background: var(--wt-surface-muted);
}
.wt-bubble {
  align-self: flex-start;
  max-width: min(310px, 85%);
  margin: 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--wt-border);
  border-radius: 22px;
  background: var(--wt-card);
  color: var(--wt-text);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wt-bubble--mine {
  align-self: flex-end;
  border-color: transparent;
  background: var(--wt-primary);
  color: #fff;
}
.wt-bubble__sender {
  font-weight: 600;
  font-size: 12px;
}
.wt-bubble__body {
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-bubble__time {
  font-size: 9px;
  color: var(--wt-text-secondary);
}
.wt-bubble--mine .wt-bubble__time {
  color: rgba(255, 255, 255, .75);
}
.wt-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  /* Islam 2026-10-16: the composer is a growing textarea, so the Send disc stays on its last line. */
  align-items: end;
  padding: 12px;
  border: 1px solid var(--wt-border);
  border-radius: 16px;
  background: var(--wt-card);
}
.wt-composer .wt-validation {
  grid-column: 1 / -1;
}
.wt-composer input,
.wt-composer textarea {
  /* QC 2026-10-14 (Hiba, "message space from shelter on application page"): an input keeps its intrinsic ~20ch width inside a
     1fr track unless told to fill it. */
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 24px;
  background: var(--wt-surface-muted);
  color: var(--wt-text);
  font-family: var(--wt-font);
  font-size: 14px;
}
.wt-composer input:focus,
.wt-composer textarea:focus {
  outline: 2px solid var(--wt-primary);
}
.wt-composer textarea {
  /* Islam 2026-10-16 ("change the textbox in send message to be multi line"): one line at rest, grows with the text to about
     six lines, then scrolls; no resize handle. */
  display: block;
  box-sizing: border-box;
  height: 48px;
  max-height: 160px;
  padding: 13px 14px;
  line-height: 22px;
  resize: none;
  overflow-y: auto;
  border-radius: 20px;
}
.wt-composer .wt-btn {
  width: auto;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 24px;
  font-weight: 500;
  font-size: 14px;
}

/* Messages page - ShelterMessagesPage.xaml:77-139 */
.wt-messages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.wt-messages--open .wt-messages__list {
  display: none;
}
@media (min-width: 1024px) {
  .wt-messages--open {
    grid-template-columns: minmax(280px, 2fr) 3fr;
  }
  .wt-messages--open .wt-messages__list {
    display: flex;
  }
}
.wt-messages__list,
.wt-messages__thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.wt-convo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}
.wt-convo.is-open {
  border-color: var(--wt-primary);
}
.wt-convo__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wt-convo__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: baseline;
}
.wt-convo__name {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-convo__time {
  font-size: 9px;
  color: var(--wt-text-secondary);
}
.wt-convo__re {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  font-size: 11px;
  color: var(--wt-primary);
}
.wt-convo__last {
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-convo__pet {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
}
.wt-convo__pet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wt-convo-total {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: var(--wt-primary);
  color: #fff;
}
.wt-convo-total__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, .2);
  font-size: 20px;
}
.wt-convo-total__value {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}
.wt-convo-total__label {
  font-size: 12px;
  opacity: .9;
}
.wt-discussing {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--wt-border);
  border-radius: 16px;
  background: linear-gradient(90deg, var(--wt-soft-teal-bg), var(--wt-soft-gold-bg));
}
.wt-discussing__caption {
  font-size: 11px;
  color: var(--wt-text-secondary);
}
.wt-discussing__pet {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
}

/* Native dialogs - the decline sheet (XAML-D:310-357) and the share card (XAML-D:359-424), opened by applications.js
   showModal(). Their own family: .wt-modal is the :target overlay of wt-shelter.css, whose display:none would out-cascade
   the UA dialog[open] rule. No display here, so [open] owns it. */
.wt-dialog {
  width: min(100% - 32px, 400px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--wt-card);
  color: var(--wt-text);
  box-shadow: var(--wt-shadow-strong);
  overflow: auto;
}
.wt-dialog::backdrop {
  background: rgba(0, 0, 0, .5);
}
.wt-dialog--sheet {
  width: min(100%, 560px);
  border-radius: 26px 26px 0 0;
  margin-bottom: 0;
  margin-top: auto;
}
@media (min-width: 768px) {
  .wt-dialog--sheet {
    border-radius: 24px;
    margin: auto;
  }
}
.wt-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.wt-dialog__head--mint {
  padding: 16px;
  background: var(--wt-gradient-mint);
}
.wt-dialog__title {
  font-weight: 600;
  font-size: 19px;
  color: var(--wt-text);
}
.wt-dialog__head--mint .wt-dialog__title {
  font-weight: 500;
  font-size: 18px;
}
.wt-dialog__close {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 19px;
  background: var(--wt-surface-muted);
  color: var(--wt-danger-accent);
  font-size: 16px;
  cursor: pointer;
}
.wt-dialog__close--white {
  width: 32px;
  height: 32px;
  background: var(--wt-card);
  color: var(--wt-text-body-soft);
}
.wt-dialog__body {
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-dialog__body--share {
  padding: 16px;
  gap: 16px;
}
.wt-dialog__label {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
}
.wt-dialog__label--sm {
  font-size: 13px;
}
.wt-reasons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 214px;
  overflow-y: auto;
}
.wt-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--wt-border);
  border-radius: 12px;
  background: var(--wt-surface-subtle);
  color: var(--wt-text-body);
  font-size: 12px;
  cursor: pointer;
}
.wt-reason input {
  accent-color: var(--wt-primary);
}
.wt-reason:has(input:checked) {
  border-color: var(--wt-primary);
  background: var(--wt-selection-bg);
  color: var(--wt-selection-text);
}
.wt-dialog__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wt-btn--muted {
  background: var(--wt-surface-muted);
  color: var(--wt-text-secondary);
  font-weight: 500;
}
.wt-btn--skip {
  background: var(--wt-border);
  color: var(--wt-text-body);
  font-weight: 500;
}
.wt-share-pet {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--wt-gradient-warm);
}
.wt-share-pet__name {
  font-weight: 500;
  font-size: 14px;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-share-pet__by {
  font-size: 12px;
  color: var(--wt-text-body-soft);
}
.wt-dialog textarea.wt-input {
  min-height: 96px;
  border-radius: 16px;
}
