@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.ev-body {
  font-family: 'Roboto', sans-serif;
  background: #f4f4f2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
.ev-header {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid #e5e5e3;
}

.ev-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

.ev-subtitle {
  font-size: 13px;
  color: #555;
  margin-top: 3px;
}

.ev-nlr-logo {
  height: 46px;
  width: auto;
  display: block;
}

/* ── Secondary nav (matches the app's grey navbar-row) ───── */
.ev-nav {
  background: #D1D5D8;
  display: flex;
  justify-content: flex-end;
  padding: 0 24px;
}

.ev-nav a {
  display: flex;
  align-items: center;
  color: #5E6A71;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.1s ease-in-out, background 0.1s ease-in-out;
}
.ev-nav a:hover { color: #fff; background: #0071B8; text-decoration: none; }

/* ── Main split layout ───────────────────────────────────── */
.ev-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Left login panel ────────────────────────────────────── */
.ev-login-panel {
  width: 420px;
  min-width: 380px;
  background: #fff;
  border-right: 1px solid #e5e5e3;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
}

/* ── Tabs ────────────────────────────────────────────────── */
.ev-tabs {
  display: flex;
  border-bottom: 2px solid #e5e5e3;
  margin-bottom: 28px;
}

.ev-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 12px 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}

.ev-tab:hover { color: #4a7c3f; }

.ev-tab.ev-tab-active {
  color: #4a7c3f;
  border-bottom-color: #4a7c3f;
}

/* ── Tab content ─────────────────────────────────────────── */
.ev-tab-content { flex: 1; }

/* ── Form ────────────────────────────────────────────────── */
.ev-form-group {
  margin-bottom: 16px;
}

.ev-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 5px;
}

.ev-form-group input {
  width: 100%;
  border: 1px solid #d0d0ce;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: #1a1a1a;
  background: #fafafa;
  transition: border-color 0.15s;
}

.ev-form-group input:focus {
  border-color: #185FA5;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24,95,165,0.10);
}

.ev-field-error {
  display: block;
  font-size: 12px;
  color: #b71c1c;
  margin-top: 4px;
}

.ev-forgot {
  text-align: right;
  margin-bottom: 20px;
  margin-top: -8px;
}
.ev-forgot a {
  font-size: 12px;
  color: #185FA5;
  text-decoration: none;
}
.ev-forgot a:hover { text-decoration: underline; }

/* ── Government login button ─────────────────────────────── */
.ev-btn-gov {
  width: 100%;
  background: #4a7c3f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 0;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.ev-btn-gov:hover { background: #3a6330; }
.ev-btn-gov:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── NLR single sign-on button (Azure AD) ────────────────── */
.ev-btn-nlr {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #003a69;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 0;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 10px;
  text-align: center;
  text-decoration: none;
}
.ev-btn-nlr:hover { background: #002b4f; }
.ev-btn-nlr:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── "or continue with" divider ──────────────────────────── */
.ev-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 20px 0 4px;
}
.ev-or-divider::before,
.ev-or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e0e0de;
}
.ev-or-divider span { padding: 0 12px; }

/* ── Sign-up link ────────────────────────────────────────── */
.ev-signup {
  text-align: center;
  font-size: 13px;
  color: #555;
  margin-top: 18px;
}
.ev-signup a { color: #185FA5; text-decoration: none; }
.ev-signup a:hover { text-decoration: underline; }

/* ── Social login buttons ────────────────────────────────── */
.ev-social-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.ev-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d0d0ce;
  background: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.ev-social-btn:hover {
  background: #f5f5f5;
  border-color: #aaa;
}
.ev-social-btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ev-no-social {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-top: 32px;
}

/* ── Alerts ──────────────────────────────────────────────────
   One class per Keycloak message type: error, warning, success, info.
   Info is the one that matters most -- "you should receive an email
   shortly" arrives as info, and is the only confirmation a user gets
   that a password reset was accepted. */
.ev-alert {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  border: 1px solid;
}
.ev-alert-error   { background: #fff0f0; border-color: #f5c6c6; color: #b71c1c; }
.ev-alert-warning { background: #fff8e6; border-color: #f0dca8; color: #8a6100; }
.ev-alert-success { background: #f0f8ee; border-color: #c3e0b8; color: #2f6b23; }
.ev-alert-info    { background: #eef4fb; border-color: #c2d8ef; color: #14508c; }

/* ── Right welcome panel ─────────────────────────────────── */
.ev-welcome-panel {
  flex: 1;
  background: #fff;
  overflow-y: auto;
  border-left: 1px solid #e5e5e3;
}

.ev-welcome-inner {
  padding: 48px 56px;
  max-width: 720px;
}

.ev-welcome-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.ev-welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
}

.ev-app-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

.ev-welcome-inner p {
  font-size: 14px;
  color: #333;
  line-height: 1.65;
  margin-bottom: 14px;
}

.ev-welcome-inner ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}

.ev-welcome-inner ul li {
  font-size: 14px;
  color: #333;
  line-height: 1.65;
  margin-bottom: 4px;
}

.ev-welcome-inner a {
  color: #185FA5;
  text-decoration: none;
}
.ev-welcome-inner a:hover { text-decoration: underline; }

/* ── Font Awesome brands subset ──────────────────────────────
   Only the six social glyphs the footer uses, taken from the app's
   vendored Font Awesome 6 (app/static/vendor/fontawesome). The whole
   stylesheet is not worth copying for six icons, and the theme cannot
   rely on /static/ being reachable when Keycloak is hit directly. */
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../webfonts/fa-brands-400.woff2) format("woff2"),
       url(../webfonts/fa-brands-400.ttf) format("truetype");
}
.ev-fab {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  display: inline-block;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ev-fa-facebook::before  { content: "\f082"; }
.ev-fa-instagram::before { content: "\f16d"; }
.ev-fa-linkedin::before  { content: "\f08c"; }
.ev-fa-youtube::before   { content: "\f167"; }
.ev-fa-x::before         { content: "\e61b"; }
.ev-fa-threads::before   { content: "\e618"; }

/* ── Site footer (mirrors .gov-site-footer in app/static/index.html) ── */
.ev-footer { font-size: 14px; font-family: 'Roboto', sans-serif; flex-shrink: 0; }
.ev-footer a { color: #000; text-decoration: none; }
.ev-footer a:hover, .ev-footer a:focus { text-decoration: underline; }

.ev-footer-top { background: #D1D5D8; padding: 30px 24px; }
.ev-footer-top .ft-inner { display: flex; align-items: center; max-width: 1140px; margin: 0 auto; }
.ev-footer-top .ft-org { flex: 0 0 41.667%; font-size: 14px; font-weight: 700; }
.ev-footer-top .ft-org a { font-weight: 700; }
.ev-footer-top .global-links { display: flex; align-items: center; list-style: none; flex-wrap: wrap; padding: 0; margin: 0; flex: 1; }
.ev-footer-top .global-links li { margin-right: 50px; }
.ev-footer-top .global-links li:last-child { margin-right: 0; }
.ev-footer-top .global-links a { font-size: 14px; line-height: 18px; font-weight: 400; }

.ev-footer-bottom { background: #F5F5F5; padding: 30px 24px; }
.ev-footer-bottom .fb-inner { max-width: 1140px; margin: 0 auto; }
.ev-footer-bottom .fb-row1 { display: flex; }
.ev-footer-bottom .fb-left { flex: 0 0 41.667%; }
.ev-footer-bottom .fb-left a { display: block; margin-bottom: 2px; }
.ev-footer-bottom .fb-right { flex: 1; display: flex; gap: 16px; }
.ev-footer-bottom .footer-quicklinks { list-style: none; margin: 0; padding: 0; }
.ev-footer-bottom .footer-quicklinks li { margin-bottom: 3px; }
.ev-footer-bottom .footer-quicklinks a { font-size: 12px; line-height: 14px; }
.ev-footer-bottom .social-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; }
.ev-footer-bottom .social-links li { margin-right: 16px; }
.ev-footer-bottom .social-links a { font-size: 15px; transition: transform 0.2s ease-in-out; display: inline-block; margin-bottom: 0; }
.ev-footer-bottom .social-links a:hover { transform: scale(1.3); text-decoration: none; }
.ev-footer-bottom hr { border: none; border-top: 1px solid #D1D5D8; margin: 24px 0; }
.ev-footer-bottom .fb-row2 { display: flex; align-items: center; }
.ev-footer-bottom .affiliates { flex: 0 0 41.667%; }
.ev-footer-bottom .affiliates a { display: inline-block; margin-right: 60px; line-height: 53px; }
.ev-footer-bottom .affiliates a:last-child { margin-right: 0; }
.ev-footer-bottom .nrel-attr { flex: 1; font-size: 12px; line-height: 16px; }
.ev-footer-bottom .nrel-attr a { text-decoration: underline; }

/* The split panels scroll internally, so the footer stays put rather than
   being pushed below the fold by the welcome text. */
.ev-main { overflow: hidden; }
.ev-login-panel { overflow-y: auto; }

@media (max-width: 900px) {
  .ev-footer-top .ft-inner,
  .ev-footer-bottom .fb-row1,
  .ev-footer-bottom .fb-row2 { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ev-footer-top .ft-org,
  .ev-footer-bottom .fb-left,
  .ev-footer-bottom .affiliates { flex: none; }
  .ev-footer-top .global-links li { margin-right: 24px; }
}
