/* Cadmium mobile polish. Loaded last on every page so it wins.
   Phones: no zoom-in when tapping a form box, finger-sized buttons, a solid top bar, readable small print. */

/* every screen size: the practice-call score was dark red on a dark card */
.h6 .pc__score, .pc__score { color: #ffd27a; }
.pc__res .pc__fine { padding: 4px 0 0 !important; margin: 0 !important; }
.ask__form input { background: #fff !important; color: #1a2b4a !important; }
/* hide the floating Ask button while its chat is open */
body:has(.ask.is-open) .ask-fab { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  /* iPhone zooms the whole page if a form box uses text smaller than 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; }

  /* the top bar: solid enough that text scrolling underneath never shows through the logo */
  .nav, .nav.is-glass { background: rgb(36 16 27 / .94) !important; }

  /* finger-sized tap targets (44px is Apple's guideline) */
  .ck-chip { min-height: 44px; display: inline-flex; align-items: center; }
  .ck-sw > button { width: 36px; height: 36px; }
  .su2-top > a.su2-brand, .lg-top > a.lg-brand { min-height: 44px; display: inline-flex; align-items: center; }
  .su2-foot > a { display: inline-block; padding: 10px 4px; }
  .lg-lamp > button.lg-pullbtn { min-height: 44px; }
  .ws-trial { min-height: 44px; }
  .calc__what > input[type=range] { height: 36px; }
  .client-report input[type=checkbox], main input[type=checkbox] { width: 22px; height: 22px; }

  /* small print that people actually need to read */
  .pricing em, .p6-tag, .pc__subs, .ck-opt__p > small, .ck-tier, .rr-brand > span, th { font-size: 12.5px !important; }

  /* practice call on a phone: messages and buttons use the full width */
  .pc__row { flex-wrap: wrap; }
  .pc__row .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .pc__log { max-height: 55vh; overflow-y: auto; overscroll-behavior: contain; }
  .pc__form input { min-height: 48px; }
  .pc__form .btn { min-height: 48px; }

  /* Ask Cadmium: a bottom sheet on phones, above the on-screen keyboard */
  .ask { left: 8px !important; right: 8px !important; width: auto !important; bottom: 8px !important; max-height: calc(100dvh - 80px) !important; border-radius: 22px; }
  .ask__chips button { min-height: 40px; }
  .ask__form input, .ask__form .btn { min-height: 48px; }
  .ask__x { width: 44px; height: 44px; }
}

/* the live demo dashboard on phones: bigger controls */
@media (max-width: 760px) {
  .between > button.plus, .stepper > button { min-width: 40px; min-height: 40px; }
  .between > button.tg { min-height: 36px; }
  .seg > button { min-height: 36px; padding-inline: 12px; }
  .controls > button.speed { min-width: 40px; min-height: 36px; font-size: 12px; }
  .coach__btns > button.btn { min-height: 44px; }
  span.chip, .livepill, div.mini { font-size: 12px !important; }
}

/* phones: Ask Cadmium becomes a small round chat button in the corner, so it never covers page buttons */
@media (max-width: 760px) {
  .ask-fab { right: 14px !important; bottom: calc(14px + env(safe-area-inset-bottom)) !important; width: 54px; height: 54px; padding: 0 !important; justify-content: center; font-size: 0 !important; gap: 0; border-radius: 50%; }
  .ask-fab::before { content: ""; width: 24px; height: 24px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat; }
  .ask-fab__dot { position: absolute; top: 6px; right: 6px; }
  /* leave room at the very bottom of each page so the button never hides the last line */
  footer { padding-bottom: 84px !important; }

  /* practice call: language box shows in full, mic row fits a 360px phone */
  .dbv__row { flex-wrap: wrap; }
  .dbv__live { flex: 1 1 0; }
  .dbv__lang { width: auto !important; min-width: 108px; height: 44px; }
  .pc__form { display: flex; gap: 8px; }
  .pc__form input { flex: 1 1 auto; min-width: 0; }
  .pc__form .btn { flex: none; padding-inline: 18px; }
}
@media (max-width: 400px) { .dbv__lang { flex: 1 1 100%; } }
