/* ============================================================
   TECHGURU Studio — Premium booking widget (2026-10-31)
   Embeds the booking platform (book.techguruofficial.us) as a
   responsive, overflow-safe card. Replaces the legacy contact
   form section. Loaded after head-bundle.css; overrides win.
   ============================================================ */

.bw {
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem);
  overflow-x: clip; /* hard guarantee: never a horizontal scrollbar from this widget */
}

.bw-card {
  position: relative;
  border-radius: 24px;
  padding: clamp(1.4rem, 3.5vw, 2.75rem);
  background: linear-gradient(180deg, rgba(22, 30, 52, .94), rgba(11, 16, 30, .97));
  border: 1px solid rgba(100, 222, 223, .18);
  box-shadow:
    0 30px 90px -28px rgba(74, 108, 247, .38),
    0 10px 34px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* gradient hairline around the card */
.bw-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(100, 222, 223, .65),
    rgba(100, 222, 223, .06) 32%,
    rgba(74, 108, 247, .08) 62%,
    rgba(74, 108, 247, .55));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}

/* soft glow behind the card */
.bw-card::after {
  content: "";
  position: absolute;
  inset: -40px -20px;
  z-index: -1;
  background:
    radial-gradient(420px 220px at 18% 0%, rgba(100, 222, 223, .14), transparent 70%),
    radial-gradient(460px 240px at 85% 100%, rgba(74, 108, 247, .16), transparent 70%);
  pointer-events: none;
}

.bw-head { text-align: center; max-width: 640px; margin: 0 auto clamp(1.25rem, 3vw, 2rem); }

.bw-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .42rem .95rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(100, 222, 223, .35);
  background: rgba(100, 222, 223, .08);
  color: #8ef0f1;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.bw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: bw-pulse 2s infinite;
}

@keyframes bw-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.bw-head h2 {
  margin: 0 0 .6rem;
  color: #fff;
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  letter-spacing: -.01em;
}

.bw-sub { margin: 0; color: rgba(242, 244, 250, .78); font-size: clamp(.95rem, 2.4vw, 1.05rem); line-height: 1.6; }
.bw-sub a { color: #8ef0f1; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(100, 222, 223, .4); }
.bw-sub a:hover { border-bottom-color: #8ef0f1; }

/* ---------- frame ---------- */

.bw-frame-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden; /* clips the iframe to the rounded card on every device */
  border: 1px solid rgba(255, 255, 255, .09);
  background: #0c1322;
  box-shadow: inset 0 2px 18px rgba(0, 0, 0, .45);
}

.bw-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border: 0;
  background: #0c1322;
  /* desktop default: tall enough for the full booking flow, capped so it never dwarfs the page */
  height: clamp(600px, 80vh, 780px);
}

/* ---------- loading skeleton (sits above the iframe until it reports loaded) ---------- */

.bw-skeleton {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: linear-gradient(180deg, #101a30, #0a1120);
  transition: opacity .55s ease;
}

.bw-loaded .bw-skeleton { opacity: 0; pointer-events: none; }

.bw-skel-line,
.bw-skel-block {
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.13) 50%, rgba(255,255,255,.05) 70%);
  background-size: 220% 100%;
  animation: bw-shimmer 1.6s linear infinite;
}

.bw-skel-line { height: 18px; }
.bw-skel-line.short { width: 42%; }
.bw-skel-line.mid { width: 68%; }

.bw-skel-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.bw-skel-cal i {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.13) 50%, rgba(255,255,255,.05) 70%);
  background-size: 220% 100%;
  animation: bw-shimmer 1.6s linear infinite;
}

.bw-skel-note {
  margin: auto auto 0;
  color: rgba(242, 244, 250, .55);
  font-size: .85rem;
  letter-spacing: .04em;
}

@keyframes bw-shimmer {
  0%   { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bw-skel-line, .bw-skel-block, .bw-skel-cal i { animation: none; }
  .bw-dot { animation: none; }
  .bw-skeleton { transition: none; }
}

/* ---------- fallback ---------- */

.bw-fallback {
  margin: 1rem 0 0;
  text-align: center;
  font-size: .88rem;
  color: rgba(242, 244, 250, .6);
}
.bw-fallback a { color: #8ef0f1; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(100, 222, 223, .4); }
.bw-fallback a:hover { border-bottom-color: #8ef0f1; }

/* ---------- responsive: portrait phones ---------- */
@media (max-width: 640px) {
  .bw-card { border-radius: 20px; padding: 1.25rem .9rem 1.4rem; }
  .bw-frame { height: clamp(640px, 88vh, 820px); } /* booking flow stacks tall on narrow screens */
  .bw-skel-cal { grid-template-columns: repeat(7, 1fr); gap: 5px; }
}

/* ---------- responsive: landscape phones / short viewports ---------- */
@media (orientation: landscape) and (max-height: 540px) {
  .bw { padding-top: 2rem; padding-bottom: 2rem; }
  .bw-frame {
    /* keep the widget inside the viewport; the booking app scrolls internally */
    height: 92vh;
    min-height: 480px;
  }
}

/* ---------- responsive: very short desktop windows ---------- */
@media (min-width: 641px) and (max-height: 620px) {
  .bw-frame { height: 92vh; min-height: 520px; }
}

/* ---------- tablets ---------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .bw-frame { height: clamp(620px, 84vh, 800px); }
}
