/* xtraLesson Shared UX/UI R2: scoped presentation only. */

/* One consistent dark-blue footer, retaining Web C5 destinations and Learn R1 content. */
body.xlw-app .xlw-app-footer,
body.xl-learner-surface .xl-r1-footer {
  color: #f2f8ff;
  background: #092c59;
}
body.xlw-app .xlw-app-footer-grid,
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr) minmax(0, 1fr) minmax(0, .78fr) !important;
  gap: 15px 24px !important;
  max-width: 1200px;
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
  padding: 0;
}
body.xlw-app .xlw-app-footer-grid { padding-block: 46px 0; }
body.xl-learner-surface .xl-r1-footer {
  padding: 46px 0 22px;
}
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid { width: 100%; }

body.xlw-app .xlw-footer-details summary,
body.xl-learner-surface .xl-r2-footer-details summary {
  color: #c5e3ff;
  font-size: 15px !important;
  font-weight: 800;
  line-height: 1.4;
  list-style: none;
  cursor: default;
  margin: 0 0 15px;
}
body.xlw-app .xlw-footer-details summary::-webkit-details-marker,
body.xl-learner-surface .xl-r2-footer-details summary::-webkit-details-marker { display: none; }
body.xlw-app .xlw-footer-details summary::marker,
body.xl-learner-surface .xl-r2-footer-details summary::marker { content: ''; }
body.xlw-app .xlw-footer-details ul,
body.xl-learner-surface .xl-r2-footer-details ul {
  display: grid;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
body.xlw-app .xlw-footer-details:not([open]) > ul,
body.xl-learner-surface .xl-r2-footer-details:not([open]) > ul {
  display: none !important;
}
body.xlw-app .xlw-footer-details li,
body.xl-learner-surface .xl-r2-footer-details li { margin: 0 !important; padding: 0; }
body.xlw-app .xlw-footer-details a,
body.xl-learner-surface .xl-r2-footer-details a {
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 500;
  color: #f2f8ff;
  text-decoration: none;
  letter-spacing: 0 !important;
  white-space: nowrap;
}
body.xlw-app .xlw-footer-details a:hover,
body.xl-learner-surface .xl-r2-footer-details a:hover { text-decoration: underline; }
body.xlw-app .xlw-footer-details a:focus-visible,
body.xl-learner-surface .xl-r2-footer-details a:focus-visible,
.xl-r2-app-links :is(a,button):focus-visible,
.xl-r2-password-eye:focus-visible { outline: 3px solid #ffb742; outline-offset: 3px; }

/* Shared social + mobile-action row. Web's existing social links are moved, not recreated. */
body.xlw-app .xl-r2-footer-extras,
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-extras {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 26px;
  max-width: 1200px;
  width: min(1200px, calc(100% - 40px));
  margin: 35px auto 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255,255,255,.22);
  align-items: start;
}
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-extras { width: 100%; }
body.xlw-app .xl-r2-footer-extras h2,
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-extras h2 {
  color: #c5e3ff;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 0;
  text-transform: none;
}
body.xlw-app .xl-r2-footer-social .xlw-footer-social-links,
body.xl-learner-surface .xl-r1-footer .xl-r1-social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
body.xlw-app .xl-r2-footer-social .xlw-footer-social-links a,
body.xl-learner-surface .xl-r1-footer .xl-r1-social-links a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: #f2f8ff;
  background: none;
}
body.xlw-app .xl-r2-footer-social .xlw-footer-social-links a svg,
body.xl-learner-surface .xl-r1-footer .xl-r1-social-links a svg { width: 19px; height: 19px; }

.xl-r2-app-status {
  color: #c6dcf2;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.xl-r2-app-links,
body.xl-learner-surface .xl-r1-footer .xl-r1-app-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.xl-r2-app-links > :is(a,button,span),
body.xl-learner-surface .xl-r1-app-links > :is(a,button,span) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: 8px 11px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
}
.xl-r2-app-links .xl-r2-install-app,
body.xl-learner-surface .xl-r1-app-links .xl-r2-install-app {
  color: #082c5c;
  background: #fff;
  border-color: #fff;
  cursor: pointer;
}
.xl-r2-app-links .xl-r2-android,
body.xl-learner-surface .xl-r1-app-links .xl-r1-android {
  color: #082c5c;
  background: #c5e3ff;
  border-color: #c5e3ff;
}
.xl-r2-store-pending,
body.xl-learner-surface .xl-r1-app-links .xl-r1-store-pending {
  color: #c6d6e6;
  background: rgba(255,255,255,.08);
  cursor: default;
}
.xl-r2-store-pending small,
body.xl-learner-surface .xl-r1-store-pending small { margin-left: 5px; font-size: 10px; color: #fff; }
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-apps p { font-size: 13px; }
.xl-r2-install-tip {
  display: block;
  max-width: 38rem;
  margin-top: 12px;
  color: #e5f3ff;
  font-size: 13px;
  line-height: 1.5;
}
.xl-r2-install-tip[hidden] { display: none; }

body.xlw-app .xlw-app-footer-bottom,
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-bottom {
  max-width: 1200px;
  width: min(1200px, calc(100% - 40px));
  margin: 25px auto 0;
  padding: 17px 0 0;
  color: #c6dcf2;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: 12px;
}
body.xl-learner-surface .xl-r1-footer .xl-r1-footer-bottom { width: 100%; }

/* No automatic PWA suggestion banner. Original Core install handler stays mounted. */
body.xl-learner-surface [data-xl-pwa-install-area] { display: none !important; }

/* Password visibility: never changes name, value, validation or autocomplete. */
body.xl-learner-surface .xl-r2-password-field,
body.xlw-app .xl-r2-password-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
body.xl-learner-surface .xl-r2-password-field > input,
body.xlw-app .xl-r2-password-field > input {
  width: 100%;
  padding-inline-end: 49px !important;
  box-sizing: border-box;
}
.xl-r2-password-eye {
  position: absolute;
  inset-inline-end: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  padding: 8px;
  color: #345a83;
  background: transparent;
  cursor: pointer;
}
.xl-r2-password-eye svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.xl-r2-password-eye:hover { background: #eaf2fa; }

@media (max-width: 980px) {
  body.xlw-app .xlw-app-footer-grid,
  body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 24px !important;
  }
}
@media (max-width: 780px) {
  body.xlw-app .xl-r2-footer-extras,
  body.xl-learner-surface .xl-r1-footer .xl-r1-footer-extras {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (max-width: 640px) {
  body.xlw-app .xlw-app-footer-grid,
  body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 20px 0 0;
  }
  body.xl-learner-surface .xl-r1-footer { padding-top: 14px; }
  body.xlw-app .xlw-footer-column,
  body.xl-learner-surface .xl-r1-footer .xl-learner-footer-column {
    border-bottom: 1px solid rgba(255,255,255,.24);
  }
  body.xlw-app .xlw-footer-details summary,
  body.xl-learner-surface .xl-r2-footer-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 0;
    margin: 0;
  }
  body.xlw-app .xlw-footer-details summary::after,
  body.xl-learner-surface .xl-r2-footer-details summary::after {
    content: '+';
    margin-inline-start: auto;
    font-size: 18px;
  }
  body.xlw-app .xlw-footer-details[open] summary::after,
  body.xl-learner-surface .xl-r2-footer-details[open] summary::after { content: '−'; }
  body.xlw-app .xlw-footer-details ul,
  body.xl-learner-surface .xl-r2-footer-details ul { padding-bottom: 18px !important; }
  body.xlw-app .xl-r2-footer-extras,
  body.xl-learner-surface .xl-r1-footer .xl-r1-footer-extras { margin-top: 18px; }
  .xl-r2-app-links > :is(a,button,span),
  body.xl-learner-surface .xl-r1-app-links > :is(a,button,span) {
    flex: 1 1 160px;
    white-space: normal;
  }
  body.xlw-app .xlw-footer-details a,
  body.xl-learner-surface .xl-r2-footer-details a { white-space: normal; }
}
