/* web custom styles */

/* ========================================
   VARIABLES
   ======================================== */
:root {
	--blue:#132a3e;
	--red:#be0032;
}

/* ========================================
   DARK BASE
   ======================================== */
html, body {
  background-color: #121212;
  color: #e0e0e0;
}

/* ========================================
   SCHRIFT + LOGO
   ======================================== */
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/sourcesans3/WOFF2/VF/SourceSans3VF-Upright.ttf.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --mm-red: #be0032;
  --mm-bar-bg: #1a1a2e;
  --mm-bar-border: #2a2a4a;
  --mm-cut: var(--mm-bar-bg);
  --mm-navbar-h: 56px;
  --mm-tabbar-h: 60px;
}
.mm-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #e6e6e6;
}
.mm-logo-icon { height: 1.3em; width: auto; flex: 0 0 auto; }
.mm-logo-dash { color: var(--mm-red); }
.mm-logo-lg { font-size: 2.6rem; }

/* ========================================
   APP-LAYOUT
   ======================================== */
html, body.mm-app { min-height: 100%; }
body.mm-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body.mm-app > #main { flex: 1 0 auto; }
body.mm-app-map { height: 100vh; height: 100dvh; overflow: hidden; }
body.mm-app-map > #main { position: relative; flex: 1 1 auto; min-height: 0; }

/* ========================================
   NAVBAR (oben)
   ======================================== */
#header.mm-navbar {
  background-color: var(--mm-bar-bg);
  border-bottom: 1px solid var(--mm-bar-border);
  min-height: var(--mm-navbar-h);
  padding-top: env(safe-area-inset-top);
  font-family: "Source Sans 3", system-ui, sans-serif;
  flex: 0 0 auto;
  z-index: 1030;
}
.mm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.45rem;
  margin-right: 1.5rem;
  text-decoration: none;
}
.mm-brand-project {
  font-size: 0.95rem;
  font-weight: 600;
  color: #9a9ab8;
  padding-left: 0.75rem;
  border-left: 1px solid var(--mm-bar-border);
}
/* Projektlogo vor dem Projektnamen; es uebernimmt dann den Trennstrich. */
.mm-brand-project-logo {
  height: 28px;
  width: auto;
  border-radius: 6px;
  box-sizing: content-box;
  padding-left: 0.75rem;
  border-left: 1px solid var(--mm-bar-border);
}
.mm-brand:has(.mm-brand-project-logo) .mm-brand-project {
  padding-left: 0;
  border-left: 0;
}
.mm-navbar .nav-link {
  color: #c8c8dc;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem !important;
  border-radius: 0.4rem;
  white-space: nowrap;
}
.mm-navbar .nav-link i { margin-right: 0.3rem; opacity: 0.85; }
.mm-navbar .nav-link:hover,
.mm-navbar .nav-link:focus-visible { color: #fff; background-color: rgba(255,255,255,0.06); }
.mm-navbar .mm-nav-main .nav-link.active {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--mm-red);
  border-radius: 0.4rem 0.4rem 0 0;
}
/* Trennstrich vor den Admin-Funktionen (Navbar und Tab-Leiste) */
.mm-nav-sep {
  align-self: center;
  width: 1px;
  height: 1.5rem;
  margin: 0 0.5rem;
  background-color: rgba(255,255,255,0.22);
}
.mm-tab-sep {
  flex: 0 0 1px;
  align-self: center;
  height: 60%;
  background-color: rgba(255,255,255,0.18);
}
/* Stichwortsuche (nur Karte) */
.mm-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.5rem;
  flex: 1 1 18rem;
  max-width: 18rem;
  min-width: 8rem;
}
.mm-search-icon {
  position: absolute;
  left: 0.6rem;
  color: #9a9ab8;
  font-size: 0.85rem;
  pointer-events: none;
}
.mm-search input {
  padding-left: 1.9rem;
  min-width: 0;
  color: #fff;
  background-color: rgba(255,255,255,0.08);
  border-color: var(--mm-bar-border);
}
.mm-search input::placeholder { color: #9a9ab8; }
.mm-search input:focus {
  background-color: rgba(255,255,255,0.12);
  border-color: var(--mm-red);
  box-shadow: 0 0 0 0.2rem rgba(190,0,50,0.25);
}
.mm-search-count {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9a9ab8;
  white-space: nowrap;
}
.mm-search-count.mm-search-none { color: #ff6b81; }
@media (max-width: 767.98px) {
  .mm-search { flex: 1 1 auto; gap: 0.35rem; }
  .mm-search input { padding-right: 0.25rem; }
  .mm-search-label { display: none; }
}

.mm-user-menu { min-width: 15rem; }
.mm-user-menu .dropdown-item-text { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.mm-role-badge { background-color: var(--mm-red); font-weight: 600; }

/* ========================================
   TAB-LEISTE (unten, Smartphone)
   ======================================== */
.mm-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1030;
  display: flex;
  background-color: var(--mm-bar-bg);
  border-top: 1px solid var(--mm-bar-border);
  height: calc(var(--mm-tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  font-family: "Source Sans 3", system-ui, sans-serif;
}
.mm-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: #9a9ab8;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
}
.mm-tab i { font-size: 1.25rem; }
.mm-tab.active, .mm-tab:hover { color: #fff; }
.mm-tab.active i { color: var(--mm-red); }
@media (max-width: 767.98px) {
  body.mm-app { padding-bottom: calc(var(--mm-tabbar-h) + env(safe-area-inset-bottom)); }
  .mm-brand { font-size: 1.25rem; margin-right: 0; }
  .mm-brand-project-logo { height: 24px; padding-left: 0.5rem; }
}

/* Hinweis-Icon an Formular-Labels (Bootstrap-Tooltip). Das Mapitem-Formular
   liegt in einer Fancybox (z-index 99992), der Tooltip muss darueber. */
.mm-field-tip {
  color: #9a9ab8;
  cursor: help;
}
.tooltip {
  z-index: 100000;
}

/* ========================================
   FOOTER
   ======================================== */
#footer {
  background-color: var(--mm-bar-bg);
  border-top: 1px solid var(--mm-bar-border);
  font-size: 0.8rem;
  flex: 0 0 auto;
}

/* ========================================
   LOGIN / REGISTRIERUNG
   ======================================== */
body.mm-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  --mm-cut: #121212;
}
.mm-auth-card {
  width: 100%;
  max-width: 420px;
  background-color: #1a1a2e;
  border: 1px solid var(--mm-bar-border);
  border-radius: 0.9rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
  --mm-cut: #1a1a2e;
}
.mm-auth-card h1 { font-size: 1.25rem; font-weight: 600; }
.mm-auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: #7a7a9a; font-size: 0.85rem; margin: 1.5rem 0 1rem;
}
.mm-auth-divider::before, .mm-auth-divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--mm-bar-border);
}
.btn-mm-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--mm-red); --bs-btn-border-color: var(--mm-red);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #a3002b; --bs-btn-hover-border-color: #a3002b;
  --bs-btn-active-bg: #8c0025; --bs-btn-active-border-color: #8c0025;
  --bs-btn-focus-shadow-rgb: 190,0,50;
  font-weight: 600;
}

/* Registrierung */
.mm-auth-card-wide { max-width: 560px; }
.mm-legend {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9a9ab8;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--mm-bar-border);
}
.mm-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mm-strength { height: 4px; background: #2a2a3e; border-radius: 2px; overflow: hidden; }
.mm-strength span { display: block; height: 100%; width: 0; transition: width .2s, background-color .2s; }
.mm-strength-1 { background: #dc3545; }
.mm-strength-2 { background: #fd7e14; }
.mm-strength-3 { background: #20c997; }
.mm-strength-4 { background: #198754; }
.mm-success-icon { font-size: 3rem; color: var(--mm-red); }
.mm-altcha altcha-widget {
  --altcha-max-width: 100%;
  --altcha-color-base: #2a2a3e;
  --altcha-color-border: #3a3a5a;
  --altcha-color-text: #e0e0e0;
  --altcha-color-border-focus: #be0032;
  --altcha-color-footer-bg: #22223a;
  --altcha-border-radius: 0.375rem;
}

/* Dashboard */
.mm-card { background-color: #1a1a2e; border: 1px solid var(--mm-bar-border); border-radius: 0.75rem; }
.mm-card .card-title { font-weight: 600; }
.mm-card .card-title i { color: var(--mm-red); }
.mm-dash-tabs { border-bottom-color: var(--mm-bar-border); flex-wrap: nowrap; overflow-x: auto; }
.mm-dash-tabs .nav-link { color: #c8c8dc; white-space: nowrap; font-weight: 600; }
.mm-dash-tabs .nav-link.active { color: #fff; background-color: #1a1a2e; border-color: var(--mm-bar-border) var(--mm-bar-border) #1a1a2e; box-shadow: inset 0 3px 0 var(--mm-red); }
.mm-logo-preview { background: repeating-conic-gradient(#2a2a3e 0% 25%, #22223a 0% 50%) 50% / 16px 16px; border-radius: .5rem; padding: 1rem; text-align: center; }
.mm-logo-preview img { max-width: 100%; max-height: 120px; }
@media (max-width: 575.98px) {
  .mm-dash-tabs .mm-dash-tab-label { display: none; }
  .mm-dash-tabs .nav-link.active .mm-dash-tab-label { display: inline; }
}

/* ========================================
   MAP
   ======================================== */
#map { position:absolute; inset:0; margin:0; text-align:center }
#map * { text-align:left }
/* Schaltflaechen der Karte (Zoom usw.) wieder mittig, #map * oben ueberstimmt Leaflet */
#map .leaflet-bar a { text-align:center }
#map .mm-map-tools a { font-size:15px; color:#333 }
#map .mm-map-tools a:hover { color:var(--mm-red, #be0032) }
/* Ortssuche: helles Feld, das dunkle Theme vererbt sonst weisse Schrift */
#map .leaflet-control-geocoder { color:#1a1a2e; color-scheme:light }
#map .leaflet-control-geocoder input { color:#1a1a2e; background:#fff }
#map .leaflet-control-geocoder input::placeholder { color:#6b7280 }
#map .leaflet-control-geocoder-alternatives a { color:#1a1a2e }

/* Marker-Cluster (Leaflet.markercluster) in Map-Me-Rot; #map, weil das Plugin-CSS
   erst nach web.css geladen wird */
#map .marker-cluster-small { background-color: rgba(190, 0, 50, 0.25); }
#map .marker-cluster-medium { background-color: rgba(190, 0, 50, 0.35); }
#map .marker-cluster-large { background-color: rgba(190, 0, 50, 0.45); }
#map .marker-cluster-small div,
#map .marker-cluster-medium div,
#map .marker-cluster-large div { background-color: var(--mm-red, #be0032); }
#map .marker-cluster div { text-align: center; }
#map .marker-cluster div span { color: #fff; font-weight: 700; }

/* Legacy HERE Maps info bubble (falls noch referenziert) */
.H_ib_close {
  right: 6px;
  width: 10px;
  height: 10px;
  top: 5px;
}
.H_ib_content {
  min-width: 16em;
  font-size: 11px;
  line-height: 1.3em;
  margin:10px;
}

/* Leaflet marker popup */
.leaflet-popup-content-wrapper {
  border-radius: 0.65rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.leaflet-popup-content {
  margin: 0;
  max-width: calc(100vw - 4rem);
  padding: 0.85rem 0.95rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #1a1a2e;
}
.leaflet-popup-content .mi_title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #132a3e;
  margin: 0 0 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e8ecf2;
}
.leaflet-popup-content .mi_actions {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid #e8ecf2;
}
/* Smartphone im Hochformat: Knoepfe untereinander */
@media (max-width: 575.98px) and (orientation: portrait) {
  .leaflet-popup-content .mi_actions { flex-direction: column; align-items: flex-start; }
}
.leaflet-popup-content .memap-edit-btn,
.leaflet-popup-content .memap-delete-btn,
.leaflet-popup-content .memap-edit-btn:hover,
.leaflet-popup-content .memap-edit-btn:focus,
.leaflet-popup-content .memap-delete-btn:hover,
.leaflet-popup-content .memap-delete-btn:focus {
  color: #fff !important;
  text-decoration: none !important;
}
.leaflet-popup-content .mi_geolocation-warning {
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #664d03;
  background: #fff3cd;
  border: 1px solid #ffecb5;
  border-radius: 0.35rem;
}
.leaflet-popup-content .mi_address {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #3a4250;
  margin: 0 0 0.25rem;
}
.leaflet-popup-content .mi_country {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #4a5568;
  margin: 0 0 0.5rem;
}
.leaflet-popup-content .mi_email,
.leaflet-popup-content .mi_phone,
.leaflet-popup-content .mi_telegram_username {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #2f3744;
  padding: 0.2rem 0;
}
.leaflet-popup-content .mi_description {
  font-size: 0.875rem;
  line-height: 1.45;
  font-style: italic;
  color: #4a5568;
  margin: 0.55rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid #e8ecf2;
}
.leaflet-popup-content a {
  color: #2c5aa0;
  font-weight: 600;
  text-decoration: none;
}
.leaflet-popup-content a:hover {
  color: #1e3f75;
  text-decoration: underline;
}
.leaflet-container a.leaflet-popup-close-button {
  font-size: 1.35rem;
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  color: #6b7280;
  padding: 0;
  top: 0.35rem;
  right: 0.35rem;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  color: #132a3e;
}

/* ========================================
   FANCYBOX POPUP - DARK THEME
   ======================================== */
.fancybox-bg {
  background: #000;
}
.fancybox-is-open .fancybox-bg {
  opacity: 0.87;
}
.fancybox-content {
  background-color: #1e1e2e;
  color: #e0e0e0;
  border-radius: 0.5rem;
}
.fancybox-content .memap-mapitem-form .form-control,
.fancybox-content .memap-mapitem-form .form-select,
.fancybox-content .memap-new-item-form .form-control,
.fancybox-content .memap-new-item-form .form-select {
  background-color: #2a2a3e;
  color: #e0e0e0;
  border-color: #3a3a5a;
}
.fancybox-content .memap-mapitem-form .form-control:focus,
.fancybox-content .memap-mapitem-form .form-select:focus,
.fancybox-content .memap-new-item-form .form-control:focus,
.fancybox-content .memap-new-item-form .form-select:focus {
  background-color: #2a2a3e;
  color: #e0e0e0;
  border-color: #6060aa;
  box-shadow: 0 0 0 0.2rem rgba(96, 96, 170, 0.35);
}
.fancybox-content .memap-mapitem-form .form-control::placeholder,
.fancybox-content .memap-new-item-form .form-control::placeholder {
  color: #7a7a9a;
}
.fancybox-content .memap-mapitem-form .form-label,
.fancybox-content .memap-new-item-form .form-label {
  color: #c0c0d8;
}
.fancybox-content .memap-mapitem-form .text-muted,
.fancybox-content .memap-new-item-form .text-muted {
  color: #7a7a9a !important;
}

/* ========================================
   FOX-35: PROJECT INFO MODAL
   ======================================== */
.project-info-modal {
  background-color: #1e1e2e;
  color: #e0e0e0;
  border: 1px solid #3a3a5a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.project-info-modal .modal-header {
  padding: 1rem 1.25rem 0.5rem;
}
.project-info-modal .modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #a0a0c8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.project-info-modal .modal-body {
  padding: 0.5rem 1.25rem 1.25rem;
}
.project-info-logo-wrap {
  display: flex;
  justify-content: center;
}
.project-info-logo {
  max-height: 64px;
  height: 100%;
  width: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.project-info-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0f0ff;
}
.project-info-short {
  color: #8a8aaa !important;
}
.project-info-description {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #3a3a5a;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #c8c8dc;
}
.project-info-description a {
  color: #7eb8ff;
  text-decoration: none;
}
.project-info-description a:hover {
  color: #a8d0ff;
  text-decoration: underline;
}
.project-info-description p:last-child {
  margin-bottom: 0;
}
