/**
 * @author Gilles Capelluto - MOLDEREZ-CONSULT
 * @purpose-fr Barre de marque claire du chat : texte sombre et logo d’origine sur fond clair.
 * @purpose-en Light chat brand bar: dark text and original logo on the light canvas.
 * @audit-scope asset
 * @inputs-fr Classes .ufm-chat-brand et voisines rendues par la page de chat.
 * @inputs-en The .ufm-chat-brand classes and neighbours rendered by the chat page.
 * @effects-fr Règles de présentation uniquement ; surcharge avec !important.
 * @effects-en Presentation rules only; overrides with !important.
 */
/* The chat page is light only: the top bar uses dark text and the original logo on the light canvas. */
.ufm-chat-brand {
  padding: 5px 14px;
  justify-content: center;
  background: rgb(255 255 255 / 0.85) !important;
}

.ufm-chat-brand:hover,
.ufm-chat-brand:focus-visible {
  background: #fff !important;
  outline: 3px solid #5b3a80;
}

.ufm-chat-brand img {
  width: 94px;
  height: auto;
}

.ufm-chat-server-header a,
.ufm-chat-language {
  border-color: #e2dcea;
  color: #251a3d;
  background: rgb(255 255 255 / 0.85);
  box-shadow: 0 6px 18px #2417370f;
}

.ufm-chat-server-header a:focus-visible {
  outline: 3px solid #5b3a80;
  outline-offset: 2px;
}

.ufm-chat-language-search small {
  color: #5f5869;
}

.ufm-chat-language-search input,
.ufm-chat-language select {
  border: 1px solid #d9d1df;
}

.ufm-chat-language-search input:focus {
  outline: 3px solid #5b3a80;
}

/* Send button: readable waiting state (no white text on grey), clear active state, 48 px target.
   Fixed height, aligned with the bottom of the composer: spanning the text and counter rows made it too tall. */
.ufm-chat-composer {
  align-items: end;
}

.ufm-chat-composer > button {
  height: 48px;
  min-height: 48px;
  align-self: end;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.ufm-chat-composer > button:not(:disabled):hover {
  background: #4b3575;
}

.ufm-chat-composer > button:not(:disabled):active {
  transform: scale(0.97);
}

.ufm-chat-composer > button:focus-visible {
  outline: 3px solid #5b3a80;
  outline-offset: 2px;
}

.ufm-chat-composer > button:disabled {
  opacity: 1;
  color: #5f5869;
  background: #ece7f2;
}

.ufm-chat-composer > button:disabled b {
  color: #5f5869;
  background: #fff;
}

@media (max-width: 620px) {
  .ufm-chat-composer > button {
    width: 48px;
    min-width: 48px;
    justify-self: end;
  }

  .ufm-chat-composer > button:disabled b {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ufm-chat-composer > button {
    transition: none;
  }
}

@media (forced-colors: active) {
  .ufm-chat-composer > button,
  .ufm-chat-server-header a,
  .ufm-chat-language {
    border: 1px solid ButtonText;
  }
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 11px 15px;
  border-radius: 11px;
  color: #171327;
  background: #fff;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

@media (max-width: 620px) {
  .ufm-chat-brand img {
    width: 82px;
  }
}

@media (max-width: 380px) {
  .ufm-chat-brand {
    padding: 4px 8px;
  }

  .ufm-chat-brand img {
    width: 74px;
  }
}

/* Each message follows its own text direction (a French message stays correct on a Hebrew or Arabic page). */
.ufm-chat-message > p,
.ufm-chat-system {
  unicode-bidi: plaintext;
  text-align: start;
}

/* Shared phone number: readable label, the number as a 44 px call button, always left-to-right. */
.ufm-chat-phone-message {
  min-width: 220px;
  display: grid;
  gap: 6px;
}

.ufm-chat-phone-message > small {
  color: #5f5869;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ufm-chat-phone-message.mine > small {
  color: #e6dcf3;
}

.ufm-chat-phone-message > a {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  color: #251a3d;
  background: #f3eff7;
  direction: ltr;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.ufm-chat-phone-message > a::before {
  content: "☎";
  font-size: 1rem;
}

.ufm-chat-phone-message.mine > a {
  color: #fff;
  background: rgb(255 255 255 / 0.14);
}

.ufm-chat-phone-message > a:focus-visible {
  outline: 3px solid #ffb347;
  outline-offset: 2px;
}
/* Conversation wallpaper (pets, badges, homes, paw trails): a light tile behind the bubbles, like a messaging app.
   A 60 % veil in the background colour keeps the pattern discreet. */
.ufm-chat-timeline{background-color:#f7f6f3;background-image:linear-gradient(#f7f6f399,#f7f6f399),url('/ufoundme/assets/chat-ui/chat-wallpaper-627.webp');background-image:linear-gradient(#f7f6f399,#f7f6f399),image-set(url('/ufoundme/assets/chat-ui/chat-wallpaper-627.webp') 1x,url('/ufoundme/assets/chat-ui/chat-wallpaper-1254.webp') 2x);background-size:420px 420px;background-repeat:repeat;background-attachment:local}
@media (forced-colors:active){.ufm-chat-timeline{background-image:none}}
