/* =========================================================
   Floating WhatsApp button + enquiry form
   (ported from resources/views/farhan ecommerce/styles.css)
   ========================================================= */
.wa-widget {
  --wa: #25d366; --wa-dark: #128c7e;
  --wa-navy: #12306a; --wa-ink: #1b2333; --wa-grey: #5f6878;
  --wa-rule: #dde2ea; --wa-band: #f3f6f9; --wa-coral: #e04438;
  position: fixed; right: 22px; bottom: 22px; z-index: 1050; font-family: inherit;
}
.wa-widget *, .wa-widget *::before, .wa-widget *::after { box-sizing: border-box; }

.wa-fab { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(18,140,126,.65); cursor: pointer; transition: transform .2s ease, background-color .2s; position: relative; overflow: visible; padding: 0; }
.wa-fab svg { width: 34px; height: 34px; }
.wa-fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wa); z-index: -1; animation: wa-pulse 2.4s ease-out infinite; }
.wa-fab:hover { transform: scale(1.06); background: var(--wa-dark); }
.wa-widget.is-open .wa-fab::before { animation: none; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }

.wa-panel { position: absolute; right: 0; bottom: 78px; width: min(370px, calc(100vw - 32px)); max-height: calc(100vh - 120px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 18px; box-shadow: 0 30px 70px -25px rgba(18,48,106,.55), 0 0 0 1px var(--wa-rule); animation: wa-in .22s ease; text-align: left; }
.wa-panel[hidden] { display: none; }
@keyframes wa-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.wa-head { display: flex; align-items: center; gap: .8rem; background: var(--wa-dark); color: #fff; padding: 1rem 1.1rem; border-radius: 18px 18px 0 0; }
.wa-head-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.wa-head-icon svg { width: 24px; height: 24px; }
.wa-head h2 { color: #fff; font-size: 1.15rem; font-weight: 500; margin: 0; letter-spacing: 0; }
.wa-head p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.85); line-height: 1.3; }
.wa-close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; padding: 0 .25rem; opacity: .85; cursor: pointer; }
.wa-close:hover { opacity: 1; }

.wa-form { padding: 1.1rem; display: grid; gap: .85rem; margin: 0; }
.wa-field { margin: 0; border: 0; padding: 0; min-width: 0; }
.wa-field > label, .wa-field legend { display: block; font-size: .9rem; font-weight: 500; color: var(--wa-navy); margin-bottom: .3rem; float: none; width: auto; padding: 0; line-height: 1.4; }
.wa-field label span { font-weight: 400; color: var(--wa-grey); }
.wa-field input:not([type="radio"]), .wa-field textarea { width: 100%; background: var(--wa-band); border: 1px solid transparent; border-radius: 10px; padding: .65rem .85rem; font-size: 1rem; color: var(--wa-ink); font-family: inherit; line-height: 1.4; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.wa-field textarea { resize: vertical; min-height: 80px; }
.wa-field input::placeholder, .wa-field textarea::placeholder { color: #9aa3b2; }
.wa-field input:focus, .wa-field textarea:focus { outline: none; background: #fff; border-color: var(--wa); box-shadow: 0 0 0 3px rgba(37,211,102,.18); }

.wa-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.wa-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.wa-toggle label { margin: 0; cursor: pointer; border: 1.5px solid var(--wa-rule); border-radius: 10px; padding: .6rem .75rem; font-weight: 500; color: var(--wa-navy); font-size: .98rem; line-height: 1.3; transition: border-color .2s, background-color .2s; }
.wa-toggle label small { display: block; font-weight: 400; color: var(--wa-grey); font-size: .8rem; }
.wa-toggle label:hover { border-color: #b7c0cd; }
.wa-toggle input:checked + label { border-color: var(--wa); background: #eafaf0; }
.wa-toggle input:focus-visible + label { outline: 2px solid var(--wa-coral); outline-offset: 2px; }

.wa-error { display: none; color: var(--wa-coral); font-size: .82rem; margin-top: .25rem; }
.wa-form.was-validated input:invalid:not([type="radio"]), .wa-form.was-validated textarea:invalid { border-color: var(--wa-coral); }
.wa-form.was-validated .wa-field input:invalid ~ .wa-error, .wa-form.was-validated .wa-field textarea:invalid ~ .wa-error,
.wa-form.was-validated .wa-role:has(input:invalid) .wa-error { display: block; }

.wa-send { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; border: 0; border-radius: 10px; background: var(--wa); color: #fff; font-weight: 500; font-size: 1.02rem; padding: .8rem 1rem; transition: background-color .2s; cursor: pointer; }
.wa-send svg { width: 20px; height: 20px; }
.wa-send:hover { background: var(--wa-dark); }

@media (max-width: 575.98px) {
  .wa-widget { right: 16px; bottom: 16px; }
  .wa-fab { width: 56px; height: 56px; }
  .wa-fab svg { width: 30px; height: 30px; }
  .wa-panel {
    position: fixed; left: 12px; right: 12px; width: auto;
    bottom: calc(80px + env(safe-area-inset-bottom));
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 100px - env(safe-area-inset-bottom));
  }
  .wa-head { padding: .7rem .9rem; position: sticky; top: 0; z-index: 1; }
  .wa-head-icon { width: 34px; height: 34px; }
  .wa-head-icon svg { width: 20px; height: 20px; }
  .wa-head h2 { font-size: 1.05rem; }
  .wa-head p { font-size: .8rem; }
  .wa-form { padding: .85rem .9rem 1rem; gap: .6rem; }
  .wa-field > label, .wa-field legend { font-size: .85rem; margin-bottom: .2rem; }
  .wa-field input:not([type="radio"]), .wa-field textarea { padding: .55rem .75rem; font-size: 16px; } /* 16px stops iOS zoom on focus */
  .wa-field textarea { min-height: 64px; }
  .wa-toggle label { padding: .45rem .6rem; font-size: .92rem; }
  .wa-toggle label small { font-size: .74rem; }
  .wa-send { padding: .7rem 1rem; }
}
@media (max-width: 575.98px) and (max-height: 640px) {
  .wa-head p, .wa-toggle label small { display: none; }
  .wa-field textarea { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .wa-fab::before { animation: none; } }
@media print { .wa-widget { display: none !important; } }
