/* ==========================================================================
   Page extras: the robot's speech bubble, product overview cards, quote form.
   Uses the tokens from styles.css.
   ========================================================================== */

/* ---------- The robot's speech bubble ---------- */
.robot-bubble { position: absolute; z-index: 3; left: calc(50% + clamp(54px, 7.5vh, 96px)); top: clamp(120px, 21vh, 230px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 18px 13px; cursor: pointer; text-align: start;
  border-radius: 20px 20px 20px 6px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .94); color: var(--ink);
  font-family: var(--font-body); box-shadow: var(--glass-shadow), 0 18px 40px -18px rgba(248, 152, 24, .55);
  transform-origin: 0 100%; animation: rb-pop .5s cubic-bezier(.2, .9, .3, 1.25) both;
  transition: box-shadow .25s ease, background .25s ease; }
.robot-bubble:hover { background: #fff; box-shadow: var(--glass-shadow), 0 22px 46px -16px rgba(248, 152, 24, .75); }
.robot-bubble:focus-visible { outline: 2px solid var(--tech); outline-offset: 3px; }
.rb-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); }
html[lang='ar'] .rb-kicker { letter-spacing: 0; font-size: .8rem; }
.rb-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, .2); animation: rb-live 2s ease-out infinite; }
.rb-text { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
@keyframes rb-pop { from { opacity: 0; transform: translateY(10px) scale(.8); } }
@keyframes rb-live { 50% { box-shadow: 0 0 0 6px rgba(47, 191, 113, 0); } }

/* ---------- Product overview cards ---------- */
.product[data-product], .tp-robots figure[data-product] { cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.product[data-product]:hover { transform: translateY(-5px); box-shadow: var(--glass-shadow), 0 26px 50px -28px rgba(24, 45, 90, .45); }
.product[data-product]:focus-visible, .tp-robots figure[data-product]:focus-visible { outline: 2px solid var(--tech); outline-offset: 3px; }
.product figcaption::after { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-start: 8px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); font: 600 .9rem/1 var(--font-body); vertical-align: 2px; }
.section-head .lead:last-child { margin-bottom: 0; }

.pd { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--glass-border); border-radius: calc(var(--radius) + 4px);
  background: rgba(250, 252, 255, .97); color: var(--ink); overflow: auto; box-shadow: 0 40px 100px -30px rgba(15, 23, 40, .55); }
.pd:focus { outline: 0; }
.pd[open] { display: grid; grid-template-columns: 240px 1fr; animation: pd-in .3s ease both; }
.pd::backdrop { background: rgba(15, 23, 40, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes pd-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.pd-media { display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #fff, var(--brand-soft)); }
.pd-media img { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: contain; }
.pd-body { padding: 30px 28px 24px; }
.pd-body h3 { font-size: 1.7rem; margin: 12px 0 10px; }
.pd-text { color: var(--ink-2); margin-bottom: 18px; }
.pd-note { margin: 16px 0 0; }
.pd-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .85); color: var(--ink-2); font-size: 1.5rem; line-height: 1; box-shadow: 0 0 0 1px var(--glass-edge); }
.pd-close:hover { background: #fff; color: var(--ink); }
.pd-close:focus-visible { outline: 2px solid var(--tech); outline-offset: 2px; }

/* ---------- Contact: quote form ---------- */
.cta { align-items: start; }
.cta-lead { color: var(--ink-2); max-width: 46ch; }
.cta-side { display: grid; gap: 18px; align-content: start; }
.cta-quick { margin-top: 0; }
.cta-quick .btn { flex: 1 1 auto; }
.quote-form { display: grid; gap: 12px; margin-top: 6px; position: relative; }
.qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qf-field { display: grid; gap: 5px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.qf-field input, .qf-field select, .qf-field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(15, 23, 40, .12);
  background: rgba(255, 255, 255, .85); color: var(--ink); font: 400 16px/1.4 var(--font-body); transition: border-color .2s, box-shadow .2s; }
.qf-field textarea { resize: vertical; min-height: 70px; }
html[dir='rtl'] .qf-field input[dir='ltr'] { text-align: right; }
.qf-field input:focus, .qf-field select:focus, .qf-field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(248, 152, 24, .15); background: #fff; }
.qf-error { margin: 0; padding: 9px 14px; border-radius: var(--radius-sm); background: #fff1f0; color: #a3271c; font-size: .88rem; font-weight: 500; }
.qf-note { margin: 0; }

@media (max-width: 860px) {
  /* Phones: the robot sits in the upper part of the screen, so the bubble goes beside its head. */
  .robot-bubble { left: calc(50% + 46px); top: calc(8% + 62% * .13); padding: 9px 14px 10px; }
  .rb-text { font-size: .96rem; }
}
@media (max-width: 560px) {
  .pd[open] { grid-template-columns: 1fr; }
  .pd-media { padding: 18px; }
  .pd-media img { max-width: 150px; }
  .pd-body { padding: 20px 20px 22px; }
  .pd-body h3 { font-size: 1.4rem; }
  .qf-row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .robot-bubble { left: auto; right: 10px; }
}

/* Static layouts (reduced motion): the bubble sits over the robot picture. */
.rm .robot-bubble { top: 130px; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .robot-bubble, .rb-kicker::before, .pd[open] { animation: none !important; }
}
