/* Hide H1 in page content; keep only in browser tab */
#cglp-h1 {
  display: none;
}

/* Titles sizing */
.cglp-swg-title,
.cglp-signin-title {
  font-size: 1.1rem;
}

/* SWG button hover */
.swg-button-v2-light {
  transition: 0.2s;
}
.swg-button-v2-light:hover {
  background: #1a73e8 !important;
  background-color: #1a73e8 !important;
  color: #ffffff !important;
  transition: 0.2s;
}

/* --- MOBILE LAYOUT POLISH --- */
@media (max-width: 768px) {
  /* Reset & viewport discipline */
  * {
    box-sizing: border-box !important;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100svh !important; /* lock to viewport height */
    overflow: hidden !important; /* no scrolling */
    background: var(--cglp-right-bg, #fff) !important;
  }

  /* Hide left column, single-column layout */
  .cglp-left {
    display: none !important;
  }

  /* Wrapper fills viewport */
  .cglp-wrap {
    width: 100% !important;
    height: 100svh !important;
    overflow: hidden !important;
    display: block !important;
  }

  /* Right column: center everything perfectly */
  .cglp-right {
    width: 100% !important;
    max-width: 100% !important;
    height: 100svh !important;
    display: flex !important;
    align-items: center !important; /* vertical centering */
    justify-content: center !important; /* horizontal centering */
    padding: 16px !important; /* breathing room on edges */
    overflow: hidden !important;
    background: var(--cglp-right-bg, #fff) !important;
  }

  /* Card sizing: prevent cutoff and keep centered */
  .cglp-card {
    width: 100% !important;
    max-width: 420px !important; /* narrower to avoid edge cut */
    max-height: calc(100svh - 32px) !important; /* fit inside padding */
    margin: 0 auto !important;
    padding: 16px !important;
    overflow: hidden !important; /* no inner scroll */
  }

  /* Tighten vertical rhythm (reduce “pushed down” feel) */
  .cglp-title {
    margin: 0 0 12px !important;
  }
  .cglp-logo {
    display: block;
    margin: 8px auto 16px !important;
  } /* no max-height to avoid squish */
  .cglp-swg-section {
    margin: 0 0 12px !important;
  }
  .cglp-separator {
    margin: 12px 0 !important;
  }
  .cglp-signin-title {
    margin: 8px 0 8px !important;
  }
  .cglp-help {
    margin: 8px 0 0 !important;
  }

  /* Ensure nothing can force horizontal overflow */
  .cglp-card *,
  .cglp-card img,
  .cglp-logo,
  .cglp-google-signin,
  .cglp-swg-section,
  .cglp-help,
  .cglp-title {
    max-width: 100% !important;
    overflow-wrap: anywhere !important; /* break long words/URLs */
    word-break: break-word !important;
    hyphens: auto !important;
  }

  /* Google button wrapper sanity */
  #cglp-google-signin > div {
    max-width: 100% !important;
  }

  /* Kill any stray horizontal scroll just in case */
  body,
  .cglp,
  .cglp-right,
  .cglp-card {
    overflow-x: hidden !important;
  }
}
