/*
 * Copyright (c) 2026 Voxtell - built for In-Telecom Cloud
 * All rights reserved.
 *
 * NetSapiens V45+ sign-in app (/auth): the sky version (v1.1.7).
 *
 * V45 replaced the classic /portal/login page with a standalone React/MUI
 * app at /auth. PORTAL_CSS_CUSTOM never reaches it; this file is wired by two
 * uiconfigs that point at the same URL on the theme host (the app
 * de-duplicates the href):
 *   PORTAL_AUTH_APP_CSS_CUSTOM  (official hook; the main login route)
 *   PORTAL_CSS_FONT_FILE        (every /auth route: forgot password, MFA)
 * and one that sets the page ground before this file has even loaded:
 *   PORTAL_CSS_BACKGROUND = #A8D6F4  (the app paints it on #root > div)
 *
 * The design (JR with the customer's name in mind, 2026-11-20: ITC Cloud):
 * the page is a sky that fades into a soft cloud bank, the sign-in card
 * keeps its place and size and only gets rounder and lighter, and Izzy is
 * one frosted glass bar at the top. Nothing else: no arcs, no artwork, no
 * animation, no font download.
 *
 * The app shows its own card the moment the logo image loads and applies
 * the uiconfigs only after it has fetched its settings, a beat later, and on
 * NetSapiens-hosted servers nothing can run before that. So this file never
 * moves or resizes anything the app drew: the ground color is already sky
 * (the uiconfig above), the clouds and the bar arrive on top of it, and the
 * card changes corner radius, tint and shadow in place. The fields, the
 * button and the logo stay exactly as NetSapiens renders them, colored by
 * PORTAL_THEME_PRIMARY / PORTAL_THEME_ACCENT.
 *
 * The earlier banner version (navy strip across the top, built for a white
 * ground) is in git history: this file as of commit fff7dc4. The full
 * split layout lives on in the classic sign-in page (vt-resets.css).
 *
 * FONT_FILE also makes the classic portal layouts link this file, so every
 * rule is scoped to #root / body:has(#root) (only the /auth app renders
 * #root), and :root carries nothing but --vt-auth-* variables.
 */

:root {
  --vt-auth-ink: #12336f;
  --vt-auth-ink-soft: #2a4d88;
  --vt-auth-bar-w: min(940px, calc(100vw - 48px));
  --vt-auth-bar-h: 74px;
  --vt-auth-bar-top: 24px;
  --vt-auth-bar-x: calc(50% - var(--vt-auth-bar-w) / 2 + 24px);
  --vt-auth-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* the sky and the cloud bank, on the element the app colors with
   PORTAL_CSS_BACKGROUND (so the color under these layers is already sky) */
#root > div {
  background-image:
    url(img/itc-sky-clouds.svg),
    linear-gradient(180deg, #86c6f0 0%, #a9d7f5 42%, #d2ebfa 78%, #f3fafe 100%);
  background-repeat: no-repeat;
  background-position: center bottom, center;
  background-size: max(100%, 1400px) auto, 100% 100%;
}

/* the card, in place: rounder, a sky tint at the top, a soft blue shadow */
#root .MuiCard-root {
  border-radius: 28px;
  background: linear-gradient(180deg, #d6f1fe 0%, #f3fbff 26%, #ffffff 46%);
  box-shadow:
    0 40px 90px -36px rgba(23, 67, 142, 0.45),
    0 10px 30px -18px rgba(23, 67, 142, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

/* what the app prints under the card (new-user link, language, footer) */
#root .MuiCard-root ~ div,
#root .MuiCard-root ~ div p {
  color: #3a5f9a;
}
#root .MuiCard-root ~ div a {
  color: #17438E;
}

/* the Izzy bar: frosted glass, so it takes the sky's own color */
body:has(#root)::before {
  content: '\2726  Meet Izzy - The AI receptionist that never clocks out';
  position: fixed;
  top: var(--vt-auth-bar-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-sizing: border-box;
  width: var(--vt-auth-bar-w);
  height: var(--vt-auth-bar-h);
  padding: 15px 24px 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 14px 34px -18px rgba(23, 67, 142, 0.45);
  color: var(--vt-auth-ink);
  font: 700 18px/1.15 var(--vt-auth-font);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

/* its second line */
#root::before {
  content: 'Answers every call, books more appointments, and routes callers to the right team.';
  position: fixed;
  top: calc(var(--vt-auth-bar-top) + 40px);
  left: var(--vt-auth-bar-x);
  z-index: 11;
  color: var(--vt-auth-ink-soft);
  font: 400 14px/1.2 var(--vt-auth-font);
  white-space: nowrap;
  pointer-events: none;
}

/* the phone number at its right end (text: the app accepts no links) */
body:has(#root)::after {
  content: 'Talk to us at (833) 482-8647';
  position: fixed;
  top: var(--vt-auth-bar-top);
  right: var(--vt-auth-bar-x);
  z-index: 11;
  color: var(--vt-auth-ink);
  font: 600 15px/var(--vt-auth-bar-h) var(--vt-auth-font);
  white-space: nowrap;
  pointer-events: none;
}

/* browsers without the blur: a more solid bar keeps the text readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body:has(#root)::before {
    background: rgba(255, 255, 255, 0.66);
  }
}

/* Where the bar may sit (JR, 2026-11-20: desktops only, never over the
   card). The card and the lines under it are one block the app centers, and
   the card always starts at 50vw - 180px. Its HEIGHT depends on the server:
   355px with a wordmark logo (top edge at viewport height / 2 - 285px), but
   637px with In-Telecom's stacked cloud logo (seen live on their sandbox,
   2026-11-20: top edge at viewport height / 2 - 388px), and taller again
   where Google and Microsoft sign-in buttons are on (their production).
   So the bar sits ABOVE the card only on very tall windows (1140px: clear
   of the tall-logo card plus about 120px of sign-in buttons), and otherwise
   BESIDE it in the top corners, which is clear of the card at any card
   height. */

/* below desktop width: no bar */
@media (max-width: 1023px) {
  body:has(#root)::before {
    content: none;
  }
  #root::before {
    content: none;
  }
  body:has(#root)::after {
    content: none;
  }
}

/* desktops under 1140px of height (laptops and most monitors): two glass
   chips in the top corners, Izzy on the left and the phone on the right */
@media (min-width: 1024px) and (max-height: 1139px) {
  #root::before {
    content: none;
  }
  body:has(#root)::before {
    top: 16px;
    left: 24px;
    transform: none;
    width: auto;
    max-width: calc(50vw - 220px);
    height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 16px;
    line-height: 44px;
  }
  body:has(#root)::after {
    top: 16px;
    right: 24px;
    box-sizing: border-box;
    max-width: calc(50vw - 220px);
    height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.34);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 14px 34px -18px rgba(23, 67, 142, 0.45);
    font-size: 14px;
    line-height: 44px;
    overflow: hidden;
  }
}

/* ... and under 1340px of width the headline does not fit beside the card */
@media (min-width: 1024px) and (max-width: 1339px) and (max-height: 1139px) {
  body:has(#root)::before {
    content: none;
  }
  body:has(#root)::after {
    content: none;
  }
}
