/* WhatsApp-chat concept — sosloan / הלוואות נט (brand multicolor + WhatsApp green) */
:root {
  --wa-wall:    #E5DDD5;
  --wa-wall-2:  #DDD4CB;
  --wa-header:  #0C2A36;
  --wa-bubble-in: #FFFFFF;
  --wa-bubble-out:#D9FDD3;
  --wa-meta:    #667781;
  --wa-input:   #F0F2F5;
  --wa-tick:    #53BDEB;
  --br-red:     #EA4335;
  --br-blue:    #4285F4;
  --br-yellow:  #FBBC04;
  --br-green:   #34A853;
  --br-green-dk:#1B7A36;
  --ink:        #111B21;
  --muted:      #54656F;
  --line:       #E9EDEF;
  --sans: 'Heebo', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans); font-weight: 400; color: var(--ink); background: var(--wa-wall);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(0,0,0,.025) 0 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.025) 0 2px, transparent 2px),
    radial-gradient(circle at 30% 80%, rgba(0,0,0,.025) 0 1.5px, transparent 1.5px),
    radial-gradient(circle at 70% 30%, rgba(0,0,0,.02) 0 2px, transparent 2px),
    linear-gradient(135deg, rgba(0,0,0,.012) 0 12%, transparent 12% 88%, rgba(0,0,0,.012) 88%);
  background-size: 220px 220px, 280px 280px, 200px 200px, 240px 240px, 120px 120px;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
}

.wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 22px 14px; }

/* PHONE FRAME */
.phone {
  width: 100%; max-width: 440px; min-height: 720px;
  background: var(--wa-wall);
  border-radius: 36px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow:
    0 0 0 10px #1F2937,
    0 0 0 12px #374151,
    0 30px 60px -10px rgba(0,0,0,.45),
    0 18px 36px -18px rgba(0,0,0,.30);
}
.phone::before {
  content: ""; position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #1F2937; border-radius: 0 0 16px 16px;
  z-index: 30;
}

/* CHAT HEADER */
.chat-header { background: var(--wa-header); color: #fff; padding: 38px 18px 14px; display: flex; align-items: center; gap: 12px; position: relative; z-index: 10; }
.chat-header .back { font-size: 22px; line-height: 1; color: rgba(255,255,255,.85); margin-inline-start: -4px; transform: scaleX(-1); text-decoration: none; }
.chat-header .avatar {
  width: 40px; height: 40px;
  background: #fff url('/assets/agent.png') center/cover no-repeat;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
}
.chat-header .avatar-disc { display: none; }
.chat-header .meta { flex: 1; min-width: 0; }
.chat-header .name { font-weight: 700; font-size: 15.5px; color: #fff; display: flex; align-items: center; gap: 8px; letter-spacing: -0.005em; }
.chat-header .verified { width: 14px; height: 14px; border-radius: 50%; background: var(--br-blue); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; font-weight: 900; }
.chat-header .status { font-size: 12px; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-header .online-dot { width: 7px; height: 7px; background: var(--br-green); border-radius: 50%; box-shadow: 0 0 0 2px rgba(52,168,83,.30); }
.chat-header .icons { display: flex; gap: 14px; color: rgba(255,255,255,.75); }
.chat-header .icons svg { width: 20px; height: 20px; }

/* CHAT BODY */
.chat-body { flex: 1; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; position: relative; }
.chat-day { align-self: center; background: rgba(225,245,254,.92); color: var(--wa-meta); font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 8px; margin: 6px 0 14px; box-shadow: 0 1px 0.5px rgba(0,0,0,.05); }

/* BUBBLES */
.bubble { max-width: 86%; padding: 7px 10px 5px; border-radius: 8px; position: relative; box-shadow: 0 1px 0.5px rgba(0,0,0,.13); font-size: 14.5px; line-height: 1.45; word-wrap: break-word; margin-bottom: 4px; animation: pop .3s cubic-bezier(.22,1,.36,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.bubble .time { display: inline-block; font-size: 11px; color: var(--wa-meta); margin-inline-start: 6px; vertical-align: -1px; white-space: nowrap; }
.bubble strong { font-weight: 700; color: var(--ink); }
.bubble.in { background: var(--wa-bubble-in); color: var(--ink); align-self: flex-start; border-top-right-radius: 0; }
.bubble.in::before { content: ""; position: absolute; top: 0; right: -7px; width: 0; height: 0; border-top: 7px solid var(--wa-bubble-in); border-right: 7px solid transparent; }
.bubble.out { background: var(--wa-bubble-out); color: var(--ink); align-self: flex-end; border-top-left-radius: 0; }
.bubble.out::before { content: ""; position: absolute; top: 0; left: -7px; width: 0; height: 0; border-top: 7px solid var(--wa-bubble-out); border-left: 7px solid transparent; }
.bubble .tick { color: var(--wa-tick); font-size: 13px; margin-inline-start: 3px; }

/* CTA CARD (form / thanks card inside chat) */
.cta-card { background: #fff; align-self: stretch; max-width: 96%; padding: 0; border-radius: 12px; overflow: hidden; margin: 8px 0 6px; box-shadow: 0 1px 0.5px rgba(0,0,0,.13); }
.cta-head { background: linear-gradient(135deg, var(--br-blue), var(--br-green)); color: #fff; padding: 14px 16px; font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cta-head .check { width: 22px; height: 22px; background: rgba(255,255,255,.2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.cta-head.red { background: linear-gradient(135deg, var(--br-red), #FF7A57); }
.cta-head.yellow { background: linear-gradient(135deg, var(--br-yellow), #FFD46B); color: #5c4900; }
.cta-head.green { background: linear-gradient(135deg, var(--br-green), #5EE89E); }
.cta-body { padding: 14px 16px 16px; }

/* FIELDS / FORM */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 12px 14px; background: #F7F8FA; border: 1.5px solid transparent; border-radius: 10px; font-family: var(--sans); font-size: 15.5px; font-weight: 500; color: var(--ink); outline: none; transition: all .18s ease; direction: rtl; }
.field input::placeholder { color: rgba(17,27,33,.30); font-weight: 400; }
.field input:focus { background: #fff; border-color: var(--br-green); box-shadow: 0 0 0 4px rgba(52,168,83,.10); }
.field-error { display: none; color: var(--br-red); font-size: 12px; font-weight: 600; margin-top: 5px; }
.field-error.show { display: block; }

/* CONSENT */
.consent-line { margin: 12px 0 6px; padding: 10px 12px; background: rgba(251,188,4,.12); border: 1.5px solid var(--br-yellow); border-radius: 10px; position: relative; transition: all .2s ease; }
.consent-line.checked { background: rgba(52,168,83,.10); border-color: var(--br-green); }
.consent-line .req { position: absolute; top: -8px; inset-inline-end: 10px; background: var(--br-yellow); color: #5c4900; font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.consent-line.checked .req { background: var(--br-green); color: #fff; }
.consent-line.checked .req::before { content: "✓ "; }
.consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink); line-height: 1.4; cursor: pointer; font-weight: 500; }
.consent input[type="checkbox"] { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--br-green); flex-shrink: 0; cursor: pointer; }
.consent a { color: var(--br-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent.optional { margin-top: 8px; padding: 8px 12px; font-size: 12px; color: var(--muted); font-weight: 500; background: #F7F8FA; border-radius: 10px; }
.consent-required { display: none; color: var(--br-red); font-size: 11.5px; font-weight: 600; margin-top: 4px; padding-inline-start: 2px; }
.consent-required.show { display: block; }

/* CTA BUTTON */
.cta-btn { margin-top: 12px; width: 100%; padding: 14px 18px; background: var(--br-green); color: #fff; border: 0; border-radius: 24px; font-family: var(--sans); font-weight: 700; font-size: 15px; cursor: pointer; transition: all .15s ease; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cta-btn:not(:disabled):hover { background: var(--br-green-dk); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(52,168,83,.32); }
.cta-btn:not(:disabled):active { transform: translateY(0); }
.cta-btn:disabled { background: #B8C4CE; color: rgba(255,255,255,.85); cursor: not-allowed; }
.cta-btn .send-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.cta-btn.cta-red { background: var(--br-red); }
.cta-btn.cta-red:hover { background: #BC2B1F; box-shadow: 0 8px 20px rgba(234,67,53,.32); }
.cta-btn.cta-blue { background: var(--br-blue); }
.cta-btn.cta-blue:hover { background: #1C5BC4; box-shadow: 0 8px 20px rgba(66,133,244,.32); }
.cta-btn.cta-yellow { background: var(--br-yellow); color: #5c4900; }
.cta-btn.cta-yellow:hover { background: #DCA404; }

.submit-hint { margin-top: 8px; font-size: 11.5px; color: var(--br-red); text-align: center; font-weight: 500; display: block; }
.submit-hint.hidden { display: none; }
.secure-row { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.secure-row .dot { width: 4px; height: 4px; background: var(--muted); border-radius: 50%; opacity: .5; }

/* QUICK REPLIES (chips) */
.quick-replies { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 4px 0 8px; }
.quick-reply { background: #fff; color: var(--br-blue); border: 1px solid var(--br-blue); border-radius: 18px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s ease; }
.quick-reply:hover { background: var(--br-blue); color: #fff; }

/* CROSS-SELL TILES (in chat) */
.tile-grid { display: grid; gap: 6px; margin-top: 2px; }
.chat-tile { background: #fff; border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 0.5px rgba(0,0,0,.13); border: 1px solid transparent; transition: all .18s ease; }
.chat-tile:hover { border-color: var(--br-green); transform: translateY(-1px); }
.chat-tile .ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.chat-tile .ic.red { background: var(--br-red); }
.chat-tile .ic.blue { background: var(--br-blue); }
.chat-tile .ic.yellow { background: var(--br-yellow); color: #5c4900; }
.chat-tile .ic.green { background: var(--br-green); }
.chat-tile .tt { flex: 1; min-width: 0; }
.chat-tile .tt h3 { font-size: 14px; font-weight: 800; color: var(--ink); margin: 0 0 2px; }
.chat-tile .tt p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.35; }
.chat-tile .arr { color: var(--muted); font-size: 18px; }

/* INPUT BAR */
.chat-input-bar { background: var(--wa-input); padding: 8px 10px; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.input-mock { flex: 1; background: #fff; border-radius: 24px; padding: 9px 14px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.input-mock .smiley { font-size: 18px; opacity: .55; }
.input-mock .ph { flex: 1; }
.input-mock .clip { color: var(--muted); transform: rotate(-30deg); font-size: 18px; opacity: .55; }
.chat-input-bar .mic { width: 42px; height: 42px; background: var(--br-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 2px 6px rgba(52,168,83,.32); }

/* BRAND STRIP */
.brand-strip { display: flex; gap: 4px; justify-content: center; padding: 6px 0 10px; background: var(--wa-input); }
.brand-strip span { width: 28px; height: 4px; border-radius: 2px; opacity: .8; }
.brand-strip .b1 { background: var(--br-red); }
.brand-strip .b2 { background: var(--br-blue); }
.brand-strip .b3 { background: var(--br-yellow); }
.brand-strip .b4 { background: var(--br-green); }

/* BELOW-PHONE FOOTER */
.below-phone { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; font-size: 12.5px; color: var(--muted); font-weight: 500; text-align: center; }
.below-phone a { color: #1F2937; text-decoration: none; border-bottom: 1px solid var(--br-green); padding-bottom: 1px; font-weight: 600; }
.below-phone a:hover { color: var(--br-green); }

/* ARTICLE (for content pages inside phone) */
.article-card { background: #fff; align-self: stretch; max-width: 96%; padding: 18px 18px 16px; border-radius: 12px; box-shadow: 0 1px 0.5px rgba(0,0,0,.13); margin: 8px 0 6px; }
.article-card h1 { font-size: 22px; font-weight: 900; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 10px; line-height: 1.15; }
.article-card h2 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 18px 0 6px; padding-inline-start: 10px; border-inline-start: 3px solid var(--br-green); line-height: 1.25; }
.article-card h2:first-of-type { margin-top: 4px; }
.article-card h3 { font-size: 14px; font-weight: 800; color: var(--ink); margin: 14px 0 4px; }
.article-card p { font-size: 13.5px; line-height: 1.6; color: var(--ink); margin: 8px 0; }
.article-card a { color: var(--br-blue); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.article-card strong { color: var(--ink); font-weight: 700; }
.article-card ul { list-style: none; padding: 0; margin: 8px 0; }
.article-card ul li { position: relative; padding-inline-start: 22px; font-size: 13.5px; line-height: 1.55; color: var(--ink); margin: 6px 0; }
.article-card ul li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--br-green); font-weight: 800; }

/* LEGAL DISCLOSURE (collapsible — Google Ads policy compliance) */
.legal-disclosure {
  align-self: center;
  margin: 12px 0 4px;
  max-width: 96%;
  width: 96%;
  font-family: var(--sans);
}
.legal-disclosure summary {
  cursor: pointer;
  list-style: none;
  font-size: 10.5px;
  color: var(--wa-meta);
  padding: 5px 12px;
  background: rgba(255,255,255,.6);
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: all .15s ease;
  letter-spacing: .02em;
}
.legal-disclosure summary::-webkit-details-marker { display: none; }
.legal-disclosure summary::after {
  content: "▾";
  font-size: 8px;
  opacity: .7;
  transition: transform .15s;
  margin-inline-start: 2px;
}
.legal-disclosure[open] summary::after { transform: rotate(180deg); }
.legal-disclosure summary:hover {
  background: rgba(255,255,255,.95);
  color: var(--ink);
}
.disclosure-body {
  margin-top: 8px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  text-align: start;
  box-shadow: 0 1px 0.5px rgba(0,0,0,.06);
  direction: rtl;
}
.disclosure-body p { margin: 5px 0; }
.disclosure-body p:first-child { margin-top: 0; }
.disclosure-body p:last-child { margin-bottom: 0; }
.disclosure-body strong { color: var(--ink); font-weight: 700; }

/* TYPING INDICATOR (WhatsApp-style 3 bouncing dots) */
.bubble.queued { display: none !important; }
.typing-bubble {
  align-self: flex-start;
  background: var(--wa-bubble-in);
  padding: 11px 12px;
  border-radius: 8px;
  border-top-right-radius: 0;
  box-shadow: 0 1px 0.5px rgba(0,0,0,.13);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  animation: pop .25s cubic-bezier(.22,1,.36,1) both;
}
.typing-bubble::before {
  content: ""; position: absolute;
  top: 0; right: -7px;
  width: 0; height: 0;
  border-top: 7px solid var(--wa-bubble-in);
  border-right: 7px solid transparent;
}
.typing-bubble .tdot {
  width: 7px; height: 7px;
  background: #B1B4B8;
  border-radius: 50%;
  display: inline-block;
  animation: tdot 1.2s infinite ease-in-out both;
}
.typing-bubble .tdot:nth-child(2) { animation-delay: .15s; }
.typing-bubble .tdot:nth-child(3) { animation-delay: .3s; }
@keyframes tdot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .wrap { padding: 0; }
  .phone { max-width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .phone::before { display: none; }
  .chat-header { padding-top: 18px; }
  .below-phone { display: none; }
}
