/* ==========================================================================
   WebKeyIndia — contact dock + call-back / live-chat popups  (2026-09-16)
   Markup: webkey-footer.php (dock), call.php (call-back popup), chatsty.php (chat).
   One launcher bottom-right fans out WhatsApp, call-back and live chat (on phones:
   WhatsApp and a call link, because the call-back and chat popups are desktop-only).
   The original call and chat buttons stay in the page, hidden; the dock clicks them,
   so their popups open exactly as before. Loaded after css/wk-hf.css.
   ========================================================================== */
.wkw-left, .wkw-dock, .wkw-modal, #mymodaldollychat1 {
  --w-ink:     #0E0F12;
  --w-muted:   #6B7080;
  --w-line:    #E4E7EF;
  --w-field:   #F7F8FB;
  --w-orange:  #FF7A1A;
  --w-crimson: #E11D2A;
  --w-grad:    linear-gradient(135deg, #FF7A1A 0%, #F0471E 55%, #E11D2A 100%);
  --w-font:    "Poppins","Segoe UI",Roboto,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
}

/* ---------- contact dock ---------- */
.wp-styd1, #myImgcall.cp-widget-button { display: none !important; }

/* ---------- left rail: call back + WhatsApp (their original corner) ---------- */
.wkw-left {
  position: fixed; left: 22px; bottom: 22px; z-index: 9990;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  font-family: var(--w-font);
}
.wkw-act {
  position: relative; display: flex; align-items: center; margin: 0; padding: 0;
  border: 0; background: none; font: inherit; text-decoration: none !important; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wkw-act__ic {
  position: relative;                  /* the WhatsApp pulse ring anchors to this circle */
  width: 52px; height: 52px; flex: none; display: grid; place-items: center;
  border-radius: 50%; color: #fff; box-shadow: 0 12px 26px -8px rgba(0,0,0,.55);
  transition: transform .22s ease, box-shadow .22s ease;
}
.wkw-act__ic svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.wkw-act--wa   .wkw-act__ic { background: linear-gradient(135deg, #3BE07A 0%, #1EBE5B 100%); box-shadow: 0 12px 26px -8px rgba(30,190,91,.7); }
.wkw-act--call .wkw-act__ic,
.wkw-act--tel  .wkw-act__ic { background: var(--w-grad); box-shadow: 0 12px 26px -8px rgba(225,29,42,.7); }

/* the name pill: plain and always visible inside the launcher (see .wkw-dock below) */
.wkw-act__label {
  padding: 9px 14px; border-radius: 10px; white-space: nowrap;
  background: #0E0F12; color: #fff; font-size: 13px; font-weight: 500; line-height: 1;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
}
/* On the left rail it appears BESIDE the circle on hover / keyboard focus.
   It is positioned out of the flow and fully hidden at rest: an earlier version
   collapsed it with max-width:0 while its padding stayed, which painted a small
   black box over the icon before the name slid out. */
.wkw-left .wkw-act__label {
  position: absolute; left: 100%; top: 50%; margin-left: 12px;
  opacity: 0; visibility: hidden; transform: translate(-8px, -50%); pointer-events: none;
  transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
}
@media (hover: hover) {
  .wkw-act:hover .wkw-act__ic { transform: scale(1.08); }
  .wkw-left .wkw-act:hover .wkw-act__label {
    opacity: 1; visibility: visible; transform: translate(0, -50%);
    transition: opacity .2s ease, transform .25s ease, visibility 0s;
  }
}
.wkw-act:focus-visible { outline: none; }
.wkw-act:focus-visible .wkw-act__ic { outline: 3px solid rgba(255,122,26,.85); outline-offset: 3px; }
.wkw-left .wkw-act:focus-visible .wkw-act__label {
  opacity: 1; visibility: visible; transform: translate(0, -50%);
  transition: opacity .2s ease, transform .25s ease, visibility 0s;
}

/* WhatsApp keeps a gentle pulse so it still catches the eye, as the old one did */
.wkw-left .wkw-act--wa .wkw-act__ic::before {
  content: ""; position: absolute; left: 0; top: 0; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,.75); animation: wkwRing 2.8s ease-out infinite; pointer-events: none;
}
@keyframes wkwRing { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- right: the launcher, unchanged from the earlier version ---------- */
.wkw-dock {
  position: fixed; right: 22px; bottom: 22px; z-index: 9990;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  font-family: var(--w-font); pointer-events: none;
}
.wkw-dock > * { pointer-events: auto; }
.wkw-dock__menu { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.wkw-dock:not(.is-open) .wkw-dock__menu { pointer-events: none; }

/* inside the launcher the items fan out, label first — the left rail's collapsed
   label and always-visible state are undone here */
.wkw-dock .wkw-act {
  gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.9,.3,1.3), visibility 0s linear .28s;
}
.wkw-dock.is-open .wkw-act {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.9,.3,1.3), visibility 0s;
}
.wkw-dock.is-open .wkw-act:nth-last-child(2) { transition-delay: .04s; }
.wkw-dock.is-open .wkw-act:nth-last-child(3) { transition-delay: .08s; }
.wkw-dock .wkw-act__label {
  position: static; margin-left: 0; padding: 8px 13px;
  opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: none;
}
.wkw-dock .wkw-act__ic { width: 46px; height: 46px; }
.wkw-dock .wkw-act__ic svg { width: 22px; height: 22px; }
.wkw-dock .wkw-act--chat .wkw-act__ic { background: linear-gradient(135deg, #3A3D48 0%, #17181D 100%); }
@media (hover: hover) { .wkw-dock .wkw-act:hover .wkw-act__ic { transform: scale(1.1); } }
.wkw-dock .wkw-act:focus-visible .wkw-act__label { box-shadow: 0 0 0 3px rgba(255,122,26,.75); }

.wkw-dock__toggle {
  position: relative; width: 60px; height: 60px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  background: var(--w-grad); box-shadow: 0 16px 32px -10px rgba(225,29,42,.7);
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.wkw-dock__toggle:hover { transform: translateY(-2px) scale(1.04); }
.wkw-dock__toggle:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px rgba(255,122,26,.65); }
.wkw-dock__toggle svg {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  fill: currentColor; transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .2s ease;
}
.wkw-dock__x { opacity: 0; transform: rotate(-90deg) scale(.6); }
.wkw-dock.is-open .wkw-dock__chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.wkw-dock.is-open .wkw-dock__x { opacity: 1; transform: none; }
.wkw-dock__toggle::before {          /* soft attention ring while closed */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,122,26,.75); animation: wkwRing 2.8s ease-out infinite;
}
.wkw-dock.is-open .wkw-dock__toggle::before { animation: none; opacity: 0; }
.wkw-dock__toggle::after {           /* "online" dot */
  content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: #22C55E; border: 2px solid #fff;
  transition: transform .2s ease;
}
.wkw-dock.is-open .wkw-dock__toggle::after { transform: scale(0); }

/* ---------- phones: the call-back popup and chat panel are desktop-only (.hidden-xs),
     so the left rail offers WhatsApp and a plain call link, and the launcher —
     which would only repeat those two — is hidden ---------- */
@media (min-width: 768px) { .wkw-act--tel { display: none; } }
@media (max-width: 767px) {
  .wkw-left { left: 16px; bottom: 16px; gap: 10px; }
  .wkw-left .wkw-act--call { display: none; }
  .wkw-act__ic { width: 48px; height: 48px; }
  .wkw-left .wkw-act--wa .wkw-act__ic::before { width: 48px; height: 48px; }
  .wkw-dock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wkw-left .wkw-act--wa .wkw-act__ic::before { animation: none; opacity: 0; }
  .wkw-dock__toggle::before { animation: none; opacity: 0; }
  .wkw-dock .wkw-act, .wkw-dock.is-open .wkw-act, .wkw-dock__toggle svg,
  .wkw-act__ic, .wkw-act__label { transition: none; }
}

/* ---------- call-back popup ---------- */
#myModal1.wkw-modal {
  display: none; position: fixed; inset: 0; z-index: 100000;
  margin: 0; padding: 40px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: rgba(10,11,14,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--w-font);
}
.wkw-dialog {
  position: relative; width: 100%; max-width: 540px; margin: 0 auto;
  overflow: hidden; border-radius: 22px; background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.65);
  animation: wkwPop .3s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes wkwPop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.wkw-dialog__head {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 24px 64px 22px 24px; color: #fff;
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(255,122,26,.28), transparent 70%),
    linear-gradient(135deg, #1B1C22 0%, #0E0F12 100%);
}
.wkw-dialog__head--ok {
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(255,255,255,.18), transparent 70%),
    linear-gradient(135deg, #16A34A 0%, #0F7A37 100%);
}
.wkw-dialog__ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--w-grad); box-shadow: 0 10px 22px -8px rgba(225,29,42,.7); }
.wkw-dialog__head--ok .wkw-dialog__ic { background: rgba(255,255,255,.2); box-shadow: none; }
.wkw-dialog__ic svg { width: 22px; height: 22px; fill: #fff; }
#myModal1 .wkw-dialog__title {
  margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
  font-family: var(--w-font) !important; font-size: 19px !important; font-weight: 600 !important;
  line-height: 1.3 !important; text-align: left !important; color: #fff !important;
}
.wkw-dialog__head p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.7); }
#myModal1 .close1 {
  position: absolute !important; top: 16px !important; right: 16px !important; float: none;
  width: 36px; height: 36px; margin: 0; padding: 0 !important;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.12) !important;
  font-family: Arial, sans-serif; font-size: 24px !important; font-weight: 400; line-height: 36px !important;
  text-align: center; color: #fff !important; text-shadow: none; opacity: 1; cursor: pointer;
  transition: background .2s, transform .2s;
}
#myModal1 .close1:hover { background: rgba(255,255,255,.24) !important; transform: rotate(90deg); }
#myModal1 .close1:focus-visible { outline: 3px solid rgba(255,122,26,.7); outline-offset: 2px; }

.wkw-dialog__body { padding: 24px; }
.wkw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.wkw-full { grid-column: 1 / -1; }
.wkw-field { display: flex; flex-direction: column; min-width: 0; }
#myModal1 .wkw-field label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #1B1D24; }
.wkw-field label em { font-style: normal; color: var(--w-crimson); }

#myModal1 .wkw-input {
  position: relative;               /* the validation shake animates `left` */
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px;
  font-family: var(--w-font); font-size: 15px; color: #1B1D24;
  background: var(--w-field); border: 1.5px solid var(--w-line); border-radius: 12px;
  box-shadow: none; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#myModal1 textarea.wkw-input { height: 88px; padding: 12px 14px; line-height: 1.5; resize: none; }
#myModal1 .wkw-input::placeholder { color: #A3A8B5; opacity: 1; }
#myModal1 .wkw-input:focus { background: #fff; border-color: var(--w-orange); box-shadow: 0 0 0 4px rgba(255,122,26,.16); }
#myModal1 #error_style_callback {
  margin: 6px 0 0; padding: 0; background: none; box-shadow: none; border-radius: 0;
  font-family: var(--w-font); font-size: 12.5px; font-weight: 500; color: #D11A2A;
}

.wkw-captcha { display: flex; align-items: center; gap: 10px; }
#myModal1 .wkw-code {
  width: 104px; height: 48px; flex: none; margin: 0; padding: 0;
  font-family: "Courier New", Consolas, monospace; font-size: 23px; font-weight: 700;
  letter-spacing: 5px; text-indent: 5px; text-align: center; color: var(--w-ink);
  background: repeating-linear-gradient(-45deg, rgba(14,15,18,.035) 0 6px, transparent 6px 12px), #EEF1F6;
  border: 1.5px dashed #C9CFDB; border-radius: 12px; outline: none; user-select: none; cursor: default;
}
.wkw-reload {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  padding: 0; border: 1.5px solid var(--w-line); border-radius: 50%; background: #fff;
  color: var(--w-muted); font-size: 15px; cursor: pointer;
  transition: color .2s, border-color .2s, transform .45s;
}
.wkw-reload:hover { color: var(--w-orange); border-color: var(--w-orange); transform: rotate(180deg); }
#myModal1 .wkw-captcha .wkw-input { flex: 1 1 auto; min-width: 0; text-align: center; letter-spacing: 3px; font-weight: 600; }

#myModal1 .wkw-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; margin: 6px 0 0; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--w-grad); color: #fff;
  font-family: var(--w-font); font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 14px 28px -10px rgba(225,29,42,.55);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
#myModal1 .wkw-submit:hover { transform: translateY(-2px); filter: saturate(1.1); }
#myModal1 .wkw-submit:focus-visible { outline: 3px solid rgba(255,122,26,.5); outline-offset: 3px; }
.wkw-note { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--w-muted); }
.wkw-note i { color: #16A34A; margin-right: 5px; }

/* ---------- live-chat panel ---------- */
#mymodaldollychat1.modaldolly {
  padding: 0 !important; z-index: 100000 !important;
  background: rgba(10,11,14,.45) !important;
}
#mymodaldollychat1 .modaldolly-content2 {
  position: fixed; right: 24px; bottom: 96px; top: auto;
  display: flex; flex-direction: column;
  width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 130px));
  margin: 0; padding: 0; overflow: hidden;
  border: 0; border-radius: 20px; background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.65);
  font-family: var(--w-font);
  animation: wkwPop .3s cubic-bezier(.2,.9,.3,1.15);
}
.wkw-chat__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff;
  background:
    radial-gradient(260px 120px at 100% 0%, rgba(255,122,26,.25), transparent 70%),
    linear-gradient(135deg, #1B1C22 0%, #0E0F12 100%);
}
.wkw-chat__ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--w-grad); }
.wkw-chat__ic svg { width: 20px; height: 20px; fill: #fff; }
.wkw-chat__head b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.wkw-chat__head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.7); }
.wkw-chat__head small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; }
#mymodaldollychat1 .closechat2 {
  margin-left: auto; float: none; flex: none;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff;
  font-family: Arial, sans-serif; font-size: 22px; font-weight: 400; line-height: 34px; text-align: center;
  cursor: pointer; transition: background .2s, transform .2s;
}
#mymodaldollychat1 .closechat2:hover, #mymodaldollychat1 .closechat2:focus { background: rgba(255,255,255,.24); color: #fff; transform: rotate(90deg); }
.wkw-chat__body { position: relative; flex: 1 1 auto; background: #F4F6FA; }
.wkw-chat__body::before {
  content: "Loading chat…"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; color: var(--w-muted);
}
.wkw-chat__body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 767px) {
  #mymodaldollychat1 .modaldolly-content2 { right: 16px; bottom: 80px; height: min(560px, calc(100vh - 110px)); }
}
@media (max-width: 480px) {
  #myModal1.wkw-modal { padding: 16px 12px; }
  .wkw-dialog { border-radius: 18px; }
  .wkw-dialog__head { padding: 20px 58px 18px 18px; }
  #myModal1 .wkw-dialog__title { font-size: 17px !important; }
  .wkw-dialog__body { padding: 18px; }
  .wkw-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .wkw-dock__toggle::before { animation: none; opacity: 0; }
  .wkw-act, .wkw-dock.is-open .wkw-act, .wkw-dock__toggle svg { transition: none; }
  .wkw-dialog, #mymodaldollychat1 .modaldolly-content2 { animation: none; }
}
