/* Pet House — contact form with live WhatsApp preview + floating WhatsApp button */

/* ---------- quick message ---------- */
.msg-grid { align-items: start; grid-template-columns: .95fr 1.05fr; }
.msg-perks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.msg-perks li { display: flex; align-items: center; gap: 12px; }
.msg-perks span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--orange-soft); color: var(--brown); flex: none; }
.msg-perks svg { width: 19px; height: 19px; }
.msg-perks b { color: var(--brown-deep); font-weight: 700; }

.chat-mock {
  position: relative; margin-top: 30px; max-width: 420px; border-radius: 26px; overflow: hidden;
  background: #EFE6DA; box-shadow: var(--shadow); border: 6px solid var(--white);
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #075E54; color: #fff; }
.chat-av { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; overflow: hidden; flex: none; }
.chat-av img { width: 30px; height: auto; }
.chat-head b { display: block; font-family: 'Nunito', sans-serif; font-size: .98rem; line-height: 1.2; }
.chat-head small { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; opacity: .85; }
.chat-head small i { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; }
.chat-paw { width: 26px; height: 26px; margin-inline-start: auto; color: var(--orange-2); opacity: .9; rotate: 18deg; }
.chat-body {
  display: grid; gap: 10px; padding: 18px 14px 20px; min-height: 210px; align-content: start;
  background-color: #EFE6DA;
  background-image: radial-gradient(rgba(138, 51, 7, .07) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
}
.bub { position: relative; max-width: 82%; padding: 9px 12px 18px; border-radius: 14px; font-size: .92rem; line-height: 1.6; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); word-break: break-word; }
.bub.in { justify-self: start; background: #fff; color: var(--ink); border-start-start-radius: 4px; padding-bottom: 10px; }
.bub.out { justify-self: end; background: #D9FDD3; color: var(--ink); border-start-end-radius: 4px; min-width: 120px; white-space: pre-wrap; }
.bub.out em { display: block; font-style: normal; font-weight: 800; font-size: .74rem; color: #128C7E; margin-bottom: 2px; }
.bub.out.sample span { color: #6B7A6B; font-style: italic; }
.bub small { position: absolute; bottom: 4px; inset-inline-end: 8px; display: flex; color: #53BDEB; }
.bub small svg { width: 13px; height: 13px; }
.bub small svg + svg { margin-inline-start: -8px; }
.typing { justify-self: start; display: inline-flex; gap: 4px; padding: 10px 12px; border-radius: 14px; background: #fff; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA59A; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -4px; opacity: 1; } }

.msg-form { display: grid; grid-template-columns: 1fr; gap: 18px; position: relative; overflow: hidden; }
.msg-form::after {
  content: ''; position: absolute; width: 150px; height: 150px; bottom: -40px; inset-inline-end: -40px; opacity: .05; rotate: -24deg; pointer-events: none;
  background: var(--orange); -webkit-mask: var(--paw-mask) center / contain no-repeat; mask: var(--paw-mask) center / contain no-repeat;
}
.mf-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1.5px dashed var(--line); }
.mf-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--wa); color: #fff; box-shadow: 0 10px 22px -10px rgba(31, 175, 84, .9); }
.mf-ico svg { width: 26px; height: 26px; }
.mf-head b { display: block; font-family: var(--head); font-size: 1.3rem; color: var(--brown-deep); line-height: 1.2; }
.mf-head small { color: var(--muted); font-size: .88rem; }
.msg-form .mf-field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.mf-label { padding: 0; font-weight: 800; font-size: .9rem; color: var(--brown); }
.mf-input { position: relative; display: block; }
.mf-input svg { position: absolute; top: 50%; inset-inline-start: 16px; width: 19px; height: 19px; translate: 0 -50%; color: var(--muted); pointer-events: none; transition: color .2s; }
.msg-form .mf-input input { padding-inline-start: 46px; min-height: 54px; }
.mf-input:focus-within svg { color: var(--orange); }
.topic-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.topic-chips label { position: relative; display: block; cursor: pointer; }
.topic-chips input { position: absolute; opacity: 0; pointer-events: none; }
.topic-chips label > span {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--brown); transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s;
}
.topic-chips svg { width: 20px; height: 20px; flex: none; color: var(--orange); transition: color .2s, rotate .35s var(--ease); }
.topic-chips b { font-weight: 700; font-size: .9rem; line-height: 1.3; }
.topic-chips label:hover > span { border-color: var(--orange-2); }
.topic-chips input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--brown-deep); box-shadow: 0 10px 22px -12px rgba(245, 138, 7, .9); }
.topic-chips input:checked + span svg { color: var(--brown-deep); rotate: -12deg; }
.topic-chips input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.mf-area { position: relative; display: block; }
.msg-form .mf-area textarea { padding-bottom: 30px; min-height: 140px; }
.mf-count { position: absolute; bottom: 10px; inset-inline-end: 14px; font: 700 .76rem 'Nunito', sans-serif; color: var(--muted); direction: ltr; }
.mf-err { color: #B3261E; font-weight: 700; font-size: .85rem; }
.mf-send { width: 100%; }
.mf-note { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); font-size: .82rem; text-align: center; }
.mf-note svg { width: 15px; height: 15px; flex: none; color: #1A8A55; }

/* ---------- floating WhatsApp ---------- */
.wa-fab { position: fixed; z-index: 40; bottom: 22px; inset-inline-start: 22px; display: grid; justify-items: start; gap: 12px; transition: bottom .4s var(--ease); }
.wa-float {
  position: relative; display: inline-flex; align-items: center; height: 62px; padding: 6px; border-radius: 999px;
  background: linear-gradient(135deg, #2FD06A, #1FAF54 55%, #128C3E); color: #fff;
  box-shadow: 0 14px 30px -10px rgba(18, 140, 62, .75), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: translate .35s var(--ease), box-shadow .35s;
}
.wa-float::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(31, 175, 84, .45); animation: waring 2.6s infinite;
}
.wa-ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.wa-ico svg { width: 28px; height: 28px; transition: rotate .4s var(--ease); }
.wa-label {
  max-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--head); font-weight: 700; font-size: 1rem;
  opacity: 0; transition: max-width .45s var(--ease), opacity .3s, padding .45s var(--ease);
}
.wa-dot {
  position: absolute; top: -6px; inset-inline-end: -6px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: var(--orange); color: var(--brown-deep); border: 3px solid var(--cream); animation: wadot 3s ease-in-out infinite;
}
.wa-dot svg { width: 12px; height: 12px; }
@media (hover: hover) {
  .wa-float:hover { translate: 0 -3px; box-shadow: 0 18px 36px -10px rgba(18, 140, 62, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
  .wa-float:hover .wa-label, .wa-float:focus-visible .wa-label { max-width: 220px; opacity: 1; padding-inline: 10px 14px; }
  .wa-float:hover .wa-ico svg { rotate: -12deg; }
}
@keyframes waring { 0% { box-shadow: 0 0 0 0 rgba(31, 175, 84, .45); } 75%, 100% { box-shadow: 0 0 0 16px rgba(31, 175, 84, 0); } }
@keyframes wadot { 0%, 100% { rotate: 0deg; } 10% { rotate: -16deg; } 20% { rotate: 12deg; } 30% { rotate: 0deg; } }

.wa-tip {
  position: relative; display: flex; align-items: flex-start; gap: 10px; width: min(290px, calc(100vw - 44px)); padding: 14px 38px 14px 14px;
  border-radius: 20px; background: var(--white); box-shadow: 0 20px 44px -14px rgba(74, 32, 6, .35);
  opacity: 0; translate: 0 10px; scale: .96; transform-origin: bottom left; transition: opacity .3s, translate .4s var(--ease), scale .4s var(--ease);
}
[dir="rtl"] .wa-tip { padding: 14px 14px 14px 38px; transform-origin: bottom right; }
.wa-tip.show { opacity: 1; translate: 0 0; scale: 1; }
.wa-tip::after {
  content: ''; position: absolute; bottom: -7px; inset-inline-start: 24px; width: 16px; height: 16px; background: var(--white);
  rotate: 45deg; border-radius: 3px;
}
.wa-tip-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--orange-soft); }
.wa-tip-av img { width: 26px; height: auto; }
.wa-tip b { display: block; font-family: 'Nunito', sans-serif; color: var(--brown-deep); font-size: .92rem; }
.wa-tip p { color: var(--muted); font-size: .88rem; line-height: 1.55; margin-top: 2px; }
.wa-tip-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.wa-tip-x:hover { background: var(--sand); color: var(--brown); }
.wa-tip-x svg { width: 14px; height: 14px; }

@media (max-width: 960px) {
  .msg-grid { grid-template-columns: 1fr; }
  .chat-mock { max-width: none; }
}
@media (max-width: 640px) {
  .topic-chips { grid-template-columns: 1fr 1fr; }
  .topic-chips label > span { min-height: 48px; padding: 8px 10px; gap: 7px; }
  .topic-chips b { font-size: .82rem; }
  .mf-head b { font-size: 1.15rem; }
  .wa-fab { bottom: 16px; inset-inline-start: 16px; }
  .wa-float { height: 56px; padding: 5px; }
  .wa-ico { width: 46px; height: 46px; }
  .wa-ico svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float::before, .wa-dot, .typing i { animation: none; }
}
