/* EU Mobility Hub – Brand & UI Technical Specification */

/* Shared icon mask – exact brand green from SVG shape */
.eumh-icon-brand {
  display: block;
  background-color: var(--color-primary);
  mask-image: url("/images/EUMobilityHubIcon.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("/images/EUMobilityHubIcon.svg");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

:root {
  /* Core brand */
  --color-primary: #5FAE3E;
  --color-primary-hover: #4C8F32;
  --color-primary-light: #E8F4E3;
  --color-primary-dark: #3E7F2E;

  /* Neutrals */
  --color-graphite: #1F252B;
  --color-dark-grey: #3A3F45;
  --color-silver: #D6DADF;
  --color-light-surface: #F5F7F8;
  --color-white: #FFFFFF;

  /* Status */
  --color-success: #3E7F2E;
  --color-warning: #D69E2E;
  --color-error: #C53030;
  --color-pending: #9CA3AF;

  /* Layout */
  --radius-small: 6px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.05);

  /* Dark sidebar (login/marketing style) */
  --sidebar-dark: #1a2e28;
  --sidebar-dark-text: rgba(255, 255, 255, 0.85);
  --sidebar-dark-text-muted: rgba(255, 255, 255, 0.6);
  --sidebar-active-bg: var(--color-primary);
  --sidebar-active-text: var(--color-white);
}

/* Typography – Inter */
html, body {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  color: var(--color-graphite);
  background-color: var(--color-light-surface);
  min-height: 100vh;
  line-height: 1.5;
}

h1, .h1 { font-size: 36px; font-weight: 700; color: var(--color-graphite); }
h2, .h2 { font-size: 28px; font-weight: 600; color: var(--color-graphite); }
h3, .h3 { font-size: 22px; font-weight: 600; color: var(--color-graphite); }
.body-large { font-size: 18px; font-weight: 400; }
body, .body { font-size: 16px; font-weight: 400; }
.small, small { font-size: 14px; font-weight: 400; color: var(--color-dark-grey); }

/* Links and buttons */
a, .btn-link {
  color: var(--color-primary);
}
a:hover, .btn-link:hover {
  color: var(--color-primary-hover);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-medium);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-white);
}

.btn-secondary, .btn-outline-primary {
  background-color: var(--color-white);
  border: 1px solid var(--color-silver);
  color: var(--color-graphite);
  border-radius: var(--radius-medium);
}
.btn-secondary:hover, .btn-outline-primary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn:focus-visible, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary-light);
  border-color: var(--color-primary);
}

/* Cards */
.card, .card-eumh {
  background: var(--color-white);
  border: 1px solid var(--color-silver);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
}
.card-header.eumh-card-header-brand {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Tables */
.table-eumh thead {
  background: var(--color-light-surface);
  color: var(--color-graphite);
}
.table-eumh th, .table-eumh td {
  border-color: var(--color-silver);
}
.table-eumh tbody tr:hover {
  background: var(--color-primary-light);
}

/* Status badges */
.badge-success, .badge-approved { background: var(--color-primary-light); color: var(--color-success); }
.badge-warning { background: #FEF3C7; color: var(--color-warning); }
.badge-error, .badge-rejected { background: #FEE2E2; color: var(--color-error); }
.badge-pending { background: #F3F4F6; color: var(--color-pending); }

/* Validation */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--color-success); }
.invalid { outline: 1px solid var(--color-error); }
.validation-message { color: var(--color-error); }

/* Error UI */
#blazor-error-ui {
  background: var(--color-light-surface);
  border-top: 1px solid var(--color-silver);
  color: var(--color-graphite);
}

.blazor-error-boundary {
  background-color: #FEE2E2;
  color: var(--color-error);
}

/* Marketing / landing page – hero with background image */
.eumh-hero {
  position: relative;
  padding: 12rem 1.5rem 13rem;
  min-height: 620px;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-large, 12px);
  overflow: hidden;
  box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  background: url("/images/hero_background.png") center / cover no-repeat;
  background-color: var(--color-primary-light);
}
/* Light overlay so text stays readable */
.eumh-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.4) 100%);
  pointer-events: none;
}
.eumh-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.eumh-hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--color-graphite);
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}
.eumh-hero-tagline {
  font-size: 1.25rem;
  color: var(--color-dark-grey);
  line-height: 1.6;
  margin-bottom: 2rem;
}
.eumh-hero-cta .btn { border-radius: var(--radius-medium); }

.eumh-marketing-section {
  background: var(--color-white);
  padding: 2rem 0 3rem;
}
.eumh-marketing-section .container {
  max-width: 960px;
}
.eumh-section-journey {
  background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("/images/background.png") center / cover no-repeat;
  background-color: var(--color-white);
  padding: 3rem 0 4rem;
}
.eumh-marketing-section-alt {
  background: var(--color-light-surface);
}
.eumh-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-graphite);
}
.eumh-feature-card {
  border-radius: var(--radius-large);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.eumh-feature-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}
.eumh-signup-card {
  border-radius: var(--radius-large);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: inherit;
}
.eumh-signup-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
  color: inherit;
}
.eumh-feature-icon {
  font-size: 2.25rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.eumh-feature-icon i {
  font-size: inherit;
}
.eumh-feature-icon-brand {
  color: var(--color-primary);
}
.eumh-value-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-graphite);
}
.eumh-value-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* Dark sidebar layout */
.eumh-sidebar-dark {
  background: var(--sidebar-dark);
  color: var(--sidebar-dark-text);
}
.eumh-sidebar-dark .eumh-nav-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.eumh-sidebar-dark .eumh-nav-brand,
.eumh-sidebar-dark .eumh-nav-brand:hover {
  color: inherit;
}
.eumh-sidebar-dark .eumh-brand-eu {
  color: var(--color-white);
  font-weight: 700;
}
.eumh-sidebar-dark .eumh-brand-mobility {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 400;
}
.eumh-sidebar-dark .nav-link {
  color: var(--sidebar-dark-text) !important;
}
.eumh-sidebar-dark .nav-link:hover {
  color: var(--color-white) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.eumh-sidebar-dark .nav-link.active {
  background: var(--sidebar-active-bg) !important;
  color: var(--sidebar-active-text) !important;
  border-left-color: transparent !important;
}
.eumh-sidebar-dark .eumh-nav-help,
.eumh-sidebar-dark .eumh-nav-lang {
  color: var(--sidebar-dark-text-muted);
  font-size: 0.875rem;
}
.eumh-sidebar-dark .eumh-nav-copyright {
  font-size: 0.75rem;
  color: var(--sidebar-dark-text-muted);
}

/* Login page – background.png on outer area only; card with user controls is solid white */
.eumh-login-wrap {
  min-height: calc(100vh - 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: url("/images/background.png") center / cover no-repeat;
  background-attachment: fixed;
  background-color: var(--color-light-surface);
}
.eumh-login-card {
  background: var(--color-white);
  border-radius: var(--radius-large);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.eumh-login-card.eumh-register-card {
  max-width: 520px;
}
.eumh-login-title-sm { font-size: 0.875rem; color: var(--color-dark-grey); }
.eumh-login-title { font-size: 1.5rem; font-weight: 700; color: var(--color-graphite); margin-bottom: 1.5rem; }
.eumh-input-wrap {
  position: relative;
}
.eumh-input-wrap .form-control { padding-left: 2.75rem; }
.eumh-input-wrap .bi-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-dark-grey);
  font-size: 1.1rem;
  pointer-events: none;
}
.eumh-demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-silver);
  font-size: 0.875rem;
}
.eumh-demo-row:last-child { border-bottom: none; }
.eumh-demo-cred { font-family: ui-monospace, monospace; color: var(--color-dark-grey); }
.eumh-demo-copy { cursor: pointer; color: var(--color-primary); }
.eumh-demo-copy:hover { color: var(--color-primary-hover); }
.eumh-content:has(.eumh-login-wrap) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
.eumh-content:has(.eumh-login-wrap) .eumh-hero {
  display: none;
}
.eumh-content-inner:has(.eumh-login-wrap) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  min-height: 0;
}
.eumh-footer-connect { margin-top: 1rem; }
.eumh-footer-connect .form-control { max-width: 200px; display: inline-block; margin-right: 0.5rem; }
.eumh-footer-social { margin-top: 0.75rem; }
.eumh-footer-social a { margin-right: 1rem; color: var(--color-dark-grey); }
.eumh-footer-social a:hover { color: var(--color-primary); }
/* Three stacked hexagons – back receding, front prominent (sidebar logo) */
.eumh-logo-hex-wrap {
  position: relative;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.eumh-logo-hex {
  position: absolute;
  background: #9ACD32;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.eumh-logo-stack {
  width: 32px;
  height: 28px;
}
.eumh-logo-hex-back {
  width: 22px;
  height: 19px;
  left: 6px;
  top: 6px;
  opacity: 0.6;
}
.eumh-logo-hex-mid {
  width: 20px;
  height: 17px;
  left: 4px;
  top: 3px;
  opacity: 0.85;
}
.eumh-logo-hex-front {
  width: 18px;
  height: 15px;
  left: 2px;
  top: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.badge-admin { background: #DBEAFE; color: #1E40AF; }
.badge-operator { background: #FFEDD5; color: #C2410C; }
.badge-company { background: #E9D5FF; color: #6B21A8; }
