/* =========================
   GPXGarage – Style Sheet
   ========================= */

:root {
  --color-bg: #FAF4EF;
  --color-text: #2E2E2E;
  --color-accent: #F26C23;
  --color-brown: #6E3C2D;
  --color-blue: #D1ECF7;
  --color-beige: #F8F1E7;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Roboto", "Helvetica", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

body {
  background-image: url('../assets/img/gpxgarage-back2.svg');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 1100px auto;
  background-attachment: fixed;
  background-color: transparent;
}

@media (max-width: 1024px) {
  body {
    background-size: 150%;
  }
}

@media (max-width: 768px) {
  body {
    background-size: 200%;
    background-position: center 20px;
  }
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* --------- floating button ------------ */
.floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #007bff;
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  z-index: 1000;
}
.floating-btn:hover {
  background-color: #0056b3;
}


/* --------- Elemente aus Admin Style für Main ----- */
.fotozuordnung-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.foto-grid .card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}


/* ========== Bereich: Ladesymbol AJAX ========== */


.tank-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  z-index: 9999;
}

.tank-loader.hidden {
  display: none;
}

.tank-image {
  position: relative;
  width: 300px;
  max-width: 90vw;
}

.tank-image img {
  width: 100%;
  display: block;
}

/* Grüner Ladebalken */
.tank-balken {
  position: absolute;
  bottom: 43%;
  left: 22%;
  height: 7%;
  width: 0%;
  background: #4caf50;
  border-radius: 10px;
  animation: balkenAnim 3s ease-out forwards;
}

/* Zeiger */
.tank-zeiger {
  position: absolute;
  width: 2px;
  height: 45px;
  background: #333;
  top: 19%;
  left: 29%;
  transform-origin: bottom center;
  transform: rotate(-45deg);
  animation: zeigerAnim 3s ease-out forwards;
}

@keyframes balkenAnim {
  to {
    width: 57%;
  }
}

@keyframes zeigerAnim {
  to {
    transform: rotate(45deg);
  }
}



/* ------- Touzuordnung aendern ----- */

.tour-form {
  margin-top: 0.5rem;
}
.tour-form select {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}


/* ---------- Footer ---------- */
.site-footer-wrapper {
  padding: 2rem 1rem;
  text-align: center;
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-brown);
  color: #fff;
  padding: 2rem 1rem;
  border-radius: 0.5rem;
}

.site-footer p {
  margin: 0;
}

.social-icons {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icons a img {
  display: block;
}


/* ---------- Header ---------- */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  height: 150px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.nav-links,
.auth-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
  flex-wrap: wrap;
}

.nav-links a,
.auth-links a,
.auth-links span {
  text-decoration: none;
  color: inherit;
  font-size: 1rem;
}

.auth-links {
  margin-left: 2rem;
}

.auth-links span {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-links,
  .auth-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .logo h2 {
    font-size: 1.25rem;
  }

  .logo img {
    height: 60px;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-blue);
  text-align: center;
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 0.5rem;
}


.hero h1 {
  margin-top: 0;
  font-size: 2.5rem;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s ease-in-out;
}

.btn:hover {
  background: #d85e1f;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-direction: row;
}

@media (max-width: 600px) {
  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-group .btn {
    width: 90%;
    max-width: 300px;
    text-align: center;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 0.5rem;
}

.section.alt {
  background: var(--color-beige);
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1.5rem 2rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

/* --------- Formular Upload GPX --------- */
.upload-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1em;
  line-height: 1.4;
  min-height: 120px;
  box-sizing: border-box;
}

.checkbox-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 8px;
}

button[type="submit"] {
  background-color: #0066cc;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

button[type="submit"]:hover {
  background-color: #004999;
}

/* ---------- Textareas -------- */
textarea {
  height: auto;
  min-height: 120px;
  padding: 10px;
  line-height: 1.4;
  vertical-align: top;
  resize: vertical;
  box-sizing: border-box;
}

/* ---------- Mobile Navigation (vollständig) ---------- */

.burger {
  background: none;
  border: none;
  color: var(--color-brown);
  font-size: 2rem;
  cursor: pointer;
  display: none;
  z-index: 1001;
  position: relative;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.mobile-overlay.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: -80%;
  width: 75%;
  height: 100vh;
  background: var(--color-brown);
  color: #fff;
  padding: 2rem 1.5rem;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
  z-index: 1002;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  width: 100%;
}

.mobile-nav li {
  margin: 1rem 0;
}

.mobile-nav a {
  color: #fff;
  font-size: 1.2rem;
  text-decoration: none;
  font-weight: bold;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .burger {
    display: block;
    margin-left: auto;
    align-self: flex-end;
  }

  .desktop-nav {
    display: none;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
}

/* ---------- Admin Dashboard ---------- */
.admin-link {
  padding: 0.5rem 1rem;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.admin-link:hover {
  background-color: #000;
}

/* ---------- Erfolgsmeldung ---------- */
.success-message {
  background: #e0ffe0;
  border: 1px solid #8f8;
  padding: 0.75rem;
  border-radius: 5px;
  color: #060;
  margin-bottom: 1rem;
}

/* Roadbook */
.roadbook-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.roadbook-card ul {
  padding-left: 1.2rem;
}

.roadbook-card .btn {
  margin-top: 1rem;
  display: inline-block;
}

/* Kartendarstellung */
.map {
  height: 300px;
  width: 100%;
  margin: 1rem 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

/* Sprachauswahl im Header */
.language-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.language-switch img {
  height: 24px;
  display: block;
}

.lang-and-burger {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch a img {
  height: 24px;
  display: block;
}

/* Meldung erst einloggen */
.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  transition: opacity 0.8s ease;
}

/* ---------- Loginseite ---------- */


.login-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 120px);
  padding: 1vh 2rem 2rem; /* oben mehr Platz */
}

.login-form {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    4px 12px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-form h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}

.login-form label {
  font-weight: bold;
  margin-top: 0.75rem;
  display: block;
}

.login-form input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.2rem;
  border: 1px solid #aaa;
  border-radius: 6px;
  font-size: 1em;
  background: #fff;
}

.login-form button {
  margin-top: 1.25rem;
  width: 100%;
  padding: 0.65rem;
  background-color: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: background 0.2s ease-in-out;
}

.login-form button:hover {
  background-color: #d85e1f;
}

.error-message {
  background: #ffd4d4;
  color: #800;
  border: 1px solid #f88;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Mopedfahrer Upload-Progress */

  #upload-loader {
    z-index: 9999;
    background: #fff;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
  }


/* UI für Filterfunktionen */
@media (max-width: 768px) {
  .filter-form {
    grid-template-columns: 1fr !important;
  }

  .filter-form input[type="number"],
  .filter-form input[type="date"],
  .filter-form select {
    width: 100% !important;
  }

  .filter-form label {
    display: block;
    margin-bottom: 0.3rem;
  }

  .filter-form div {
    display: block;
    margin-bottom: 1rem;
  }
}

/* ---------- Fix: Mobile Navigation Schließen Button ---------- */
.mobile-nav .close-btn {
  display: block !important;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1003;
}

}


/* ------- Foto Grid für my_fotozuordnung.php -------- */
</style>
.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}


.card img {
  max-width: 100%;
  height: auto;
  display: block;
}

.card iframe.map {
  margin-top: 1rem;
  height: 180px;
  width: 100%;
  border: none;
  border-radius: 6px;
}

