/*
 * Cookie consent banner, shared by every app in this package.
 *
 * Loaded via shared/consent/head.php. Selectors are scoped to #usls-cookie-banner
 * so they cannot collide with an app's own styles. The one app-level selector is
 * the padding rule near the bottom, which relies on every app using
 * #usls-vue-app as its Vue root -- true of all six today.
 */

/* Sibling of #usls-vue-app, so these selectors are deliberately un-nested. */
#usls-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2100; /* above #connectivity-banner */
  color: #fff;
  background-color: #262b3f;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35);
}

#usls-cookie-banner .usls-cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px;
}

#usls-cookie-banner .usls-cookie-banner-copy p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

#usls-cookie-banner .usls-cookie-banner-copy p:last-child {
  margin-bottom: 0;
}

#usls-cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

#usls-cookie-banner .usls-cookie-banner-actions {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
}

#usls-cookie-banner .usls-cookie-btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

#usls-cookie-banner .usls-cookie-btn-reject {
  color: #fff;
  background-color: transparent;
  border: 1px solid #fff;
}

#usls-cookie-banner .usls-cookie-btn-accept {
  color: #fff;
  background-color: #ac2034;
  border: 1px solid #ac2034;
}

#usls-cookie-banner .usls-cookie-btn-reject:hover { background-color: rgba(255, 255, 255, 0.12); }
#usls-cookie-banner .usls-cookie-btn-accept:hover { background-color: #8e1a2b; border-color: #8e1a2b; }

#usls-cookie-banner .usls-cookie-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/*
 * Keep the banner from covering the step controls -- #submit_application on the
 * billing step sits at the bottom of the form and is the one control a member
 * cannot afford to lose.
 */
body.usls-cookie-banner-open #usls-vue-app { padding-bottom: 180px; }

@media (max-width: 991px) {
  #usls-cookie-banner .usls-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }

  #usls-cookie-banner .usls-cookie-banner-copy p { font-size: 14px; }

  #usls-cookie-banner .usls-cookie-banner-actions { flex-direction: column; }

  #usls-cookie-banner .usls-cookie-btn { width: 100%; }

  /* Tall stacked layout, and the banner may scroll on very small screens. */
  #usls-cookie-banner { max-height: 70vh; overflow-y: auto; }

  body.usls-cookie-banner-open #usls-vue-app { padding-bottom: 340px; }
}
