/* solarerp.in — conversion widgets (loaded after site.css; uses its tokens).
   Floating WhatsApp + call-back buttons (bottom-right; the chat launcher owns bottom-left), the call-back / contact
   faces of the popup form, the Contact page and the booking dialog. Static file, no build step. */

/* ---------------- Floating cluster ---------------- */
.cw-float {
    position: fixed; z-index: 60;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
    pointer-events: none;   /* only the buttons themselves catch clicks */
}
.cw-btn {
    pointer-events: auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-width: 52px; height: 52px; padding: 0 15px; border-radius: var(--r-pill);
    font: 700 14px/1 var(--ff-display); letter-spacing: -0.01em; white-space: nowrap;
    box-shadow: var(--shadow-lift); transition: transform .2s var(--ease), background-color .15s, box-shadow .2s;
}
.cw-btn .ico { width: 22px; height: 22px; }
.cw-btn:hover { transform: translateY(-2px); }
.cw-btn:active { transform: translateY(0); }
.cw-btn:focus-visible { outline: 2px solid var(--green-700); outline-offset: 3px; }
.cw-call { background: var(--ink); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
.cw-call:hover { background: #000; }
.cw-wa { background: var(--green); color: var(--onyx); }
.cw-wa:hover { background: #74cc64; }

/* On phones the buttons are round icons; the words stay available to screen readers. */
.cw-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 560px) {
    .cw-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
    .cw-btn { padding: 0 20px 0 17px; }
}
/* Out of the way of the open mobile menu, and off the printed page. */
body:has(.menu-btn[aria-expanded="true"]) .cw-float { display: none; }
@media print { .cw-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .cw-btn { transition: none; } .cw-btn:hover { transform: none; } }

/* ---------------- Header text button ---------------- */
.nav-callback { display: none; }
@media (min-width: 1240px) { .nav-callback { display: inline-flex; } }

/* ---------------- Popup form: call-back / contact faces ---------------- */
@media (min-width: 640px) { .form-grid > .fg-wide { grid-column: 1 / -1; } }
.cw-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--slate); }
.cw-alt .btn .ico { width: 15px; height: 15px; }

/* ---------------- Contact page ---------------- */
.contact-page { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 96px; }
@media (min-width: 1000px) { .contact-page { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding-top: 56px; align-items: start; } }
/* .lead-card is built for the dark contact band; on the white page it needs a hairline and a lighter shadow. */
.cw-card { border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.cw-details .cw-actions { display: grid; gap: 10px; margin-top: 18px; }
.cw-details .cw-actions .btn { margin-top: 0; }
.cw-list { display: grid; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--slate); }
.cw-list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cw-list .ico { color: var(--ash); }
.cw-list a { min-width: 0; overflow-wrap: anywhere; color: var(--carbon); text-decoration: underline; text-decoration-color: var(--cloud); text-underline-offset: 3px; }
.cw-list a:hover { text-decoration-color: var(--green); }

/* ---------------- Booking dialog ---------------- */
.cw-booking { width: min(980px, calc(100vw - 24px)); height: min(820px, calc(100dvh - 24px)); }
.cw-booking[open] { display: flex; flex-direction: column; }
.cw-booking-head { position: relative; flex: none; padding: 20px 64px 16px 24px; border-bottom: 1px solid var(--line); background: radial-gradient(60% 140% at 100% 0%, rgba(98, 191, 82, .12), transparent 70%), #fff; }
.cw-booking-head h2 { font: 700 20px/1.2 var(--ff-display); letter-spacing: -0.03em; }
.cw-booking-head p { margin-top: 4px; font-size: 14px; color: var(--slate); }
.cw-booking-frame { position: relative; flex: 1 1 auto; min-height: 0; background: var(--mist); }
.cw-booking-frame::before { content: 'Loading the calendar…'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--ash); }
.cw-booking-frame.is-loaded::before { display: none; }
.cw-booking-frame iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; }
