/* Schloss-Button gesperrt */
button.locked {
  background-color: #666 !important;
  color: white;
  cursor: not-allowed;
  position: relative;
}

button.locked::after {
  content: '\01F512';
  position: absolute;
  right: 8px;
  top: 48%;
  transform: translateY(-50%);
  font-size: 12px;
}

/* Sichtbarkeitsklassen */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Nur in AUTOMATIK-Modus sichtbar */
.mode-auto #submitButton,
.mode-auto #tableButton {
  display: inline-block;
}

/* In MANUELLER Modus ausgeblendet */
.mode-manual #submitButton,
.mode-manual #tableButton {
  display: none;
}

/* Berechnen-Button bleibt immer sichtbar */
.mode-auto #calculateButton,
.mode-manual #calculateButton {
  display: inline-block;
}

button:not(.locked):hover {
  position: relative;
  overflow: hidden;
  background-color: #ffa500;
  color: white;
}

button:not(.locked):hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  animation: slideHighlight 2.5s ease-in-out infinite;
}

@keyframes slideHighlight {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

input[disabled] {
  background-color: white !important;
  color: black;
  width: 100%;
  opacity: 1;
}

#kilometer {
  background-color: white !important;
  color: black;
  border: 1px solid black; /* <- korrekt */
}

.white-disabled {
  background-color: white !important;
  color: black;
  opacity: 1;
}

.input-wrapper {
  position: relative;
  width: 100%;
  height: 20px;
}

.lock-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-60%);
  font-size: 12px;
  color: #888;
  pointer-events: none;
  display: none;
}

.input-wrapper.locked .lock-icon {
  display: inline;
}

.fancy-disabled {
  padding-right: 30px;
  text-align: center;
  border: 1px solid black !important;
}

.input-standard {
  text-align: center !important;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.4s ease; /* sanfte Animation beim Übergang */
}

.input-address {
  text-align: center;
  height: 20px;
  width: 100%;
  border: 1px solid black;
  border-radius: 4px;
  background-color: white;
  padding: 3px;
  margin-bottom: 3px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.4s ease; /* sanfte Animation */
}

/* Fokus-Effekt: wenn das Feld aktiv ist */
.input-address:focus {
  border-color: #4fc3f7; /* schöner blauer Rahmen */
  box-shadow: 0 0 5px rgba(79, 195, 247, 0.7); /* sanfter Glow */
  background-color: #f0f8ff; /* optional: leicht hellerer Hintergrund */
  transform: scale(1.02); /* leicht vergrößern beim Tippen */
}

/* Wenn das Feld aktiv ist */
.input-standard:focus {
  border-color: #4fc3f7; /* schöne blaue Umrandung */
  box-shadow: 0 0 5px rgba(79, 195, 247, 0.7); /* leichter Glow-Effekt */
  background-color: #f0f8ff; /* optional ganz leicht heller Hintergrund */
  transform: scale(1.02); /* leicht größer, wirkt lebendiger */
}

input.fancy-disabled:disabled {
  width: 80%;
  height: 20px;
  padding: 4px 4px 4px 30px;
  border: 1px solid black !important; /* !important erzwingt den schwarzen Rahmen */
  border-radius: 4px;
  box-sizing: border-box;
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  color: #888;
  cursor: not-allowed;
  opacity: 1;
  backdrop-filter: blur(2px);
  text-align: center;
  position: relative;

  /* Optional: Entfernt jeglichen Grauschleier */
  box-shadow: none !important;
}

input.fancy-disabled:disabled::before {
  content: "\1F512"; /* Schloss-Symbol */
  position: absolute;
  border: 1px solid black !important;
  left: 8px;
  top: 50%;
  text-align: center;
  transform: translateY(-50%);
  font-size: 14px;
  color: #888;
  pointer-events: none;
}

#resultBox {
  display: none;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-width: 5px;
  border-style: solid;
  border-color: black;
  background-color: #EEE69A !important;
  padding: 0 5px;
  border-radius: 15px;
  margin: 10px auto 10px auto; /* ?? oben: 10px, unten: 10px */
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out, border-color 0.3s;
  min-height: 80px;
  width: auto;
}

#resultBox:hover {
  transform: scale(1.13);
  cursor: zoom-in;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
  z-index: 999;
}

#resultBox:hover::after {
  content: "\1F50D"; /* Unicode für ?? */
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.6rem;
  opacity: 0.8;
  pointer-events: none;
  animation: blink-lupe 1.6s infinite;
}

@keyframes blink-lupe {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.2); }
}

#submitButton:disabled {
  background-color: #dcdcdc;
  color: silver;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Erfolgsmeldung nach dem Absenden */
#successMessage {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Leuchtend grÃ¼n aktiv */
button.glow-green {
  background-color: #28a745 !important;
  color: white;
  border: 1px solid black;
  box-shadow: 0 0 12px 3px #28a745;
}

/* Blinken fÃ¼r Absenden nach Berechnung */
@keyframes glowRed {
  0%   { background-color: #ff0000; box-shadow: 0 0 8px #ff0000; }
  50%  { background-color: #cc0000; box-shadow: 0 0 15px #cc0000; }
  100% { background-color: #ff0000; box-shadow: 0 0 8px #ff0000; }
}

button.blink-red {
  animation: glowRed 2s infinite;
  color: white;
  border: 1px solid black;
}

/* Buttons */
button {
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 14px;
  background-color: #d3d3d3;
  color: #a9a9a9;
  border: 3px solid #000;
}


button.active {
  background-color: #4caf50;
  color: #fff;
}

button[disabled] {
  opacity: 1;
  cursor: not-allowed;
  border: 1px;
  box-shadow: none;
  transform: none;
}

button.hidden {
  display: none;
}

/* Seitenlayout */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  width: 100%;
}

h2 {
  font-size: 5vw;
  margin: 0 0 1px 0;
  color: #333;
  font-family: ArialBlack, Arial;
  font-weight: 100;
  text-shadow: 0 0 0 #000, 0 0 0 #000, 0 0 0 #000, 0 0 0 #000;
}

h7 {
  font-size: 9px;
  margin-top: 6px;
  margin-bottom: 0;
}

#mapsLink,
form {
  margin-top: 10px;
}

#mapsLink {
  font-size: 10px;
}

form {
  width: 100%;
  text-align: left;
}

input[type=datetime-local],
input[type=email],
input[type=number],
input[type=text],
#abfahrt,
#zeitraum,
#ziel {
  width: 100%;
  padding: 5px;
  margin-bottom: 3px;
  box-sizing: border-box;
  font-size: 12px;
}

.flatpickr-input {
  width: 250px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#fixedPrice {
  margin-top: 1px;
  font-weight: 1000;
  font-size: 18px;
}

#result {
  margin-top: 1px;
  font-weight: 400;
  font-size: 12px;
}

.address-group {
  margin-bottom: 1px;
}
.address-group input {
  margin-bottom: 10px;
}

.copyright {
  font-size: 10px;
  color: #888;
  margin-top: 20px;
  text-align: center;
}

.copyright-text {
  font-size: 10px;
  position: relative;
  display: inline-block;
  background: linear-gradient(
    120deg,
    #555 0%,
    #aaa 20%,
    #eee 40%,
    #aaa 60%,
    #555 80%
  );
  background-size: 300% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: randomShimmer 10s infinite;
}

/* Animation mit zufälliger Bewegung */
@keyframes randomShimmer {
  0% {
    background-position: 200% center;
  }
  10% {
    background-position: 150% center;
  }
  25% {
    background-position: 180% center;
  }
  35% {
    background-position: 120% center;
  }
  50% {
    background-position: 60% center;
  }
  65% {
    background-position: 100% center;
  }
  80% {
    background-position: 40% center;
  }
  90% {
    background-position: 70% center;
  }
  100% {
    background-position: -200% center;
  }
}

.line {
  height: 2px;
  background: linear-gradient(to right, #4caf50, #81c784);
  border: none;
  animation: 3s infinite gradientLine;
}

@keyframes gradientLine {
  0%, 100% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
}

#adminMenu {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  background-color: #d3d3d3;
  border: 2px solid #444; /* <<< DEZENTER, DUNKLER RAHMEN */
  border-radius: 15px;
  padding: 20px;
  box-shadow: inset 0 0 6px #999, 0 0 25px rgba(0, 0, 0, 0.4); /* innen + außen Schatten */
  z-index: 9999;

  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#adminMenu.visible {
  visibility: visible;
  opacity: 1;
}

/* Weitere Elemente */
#adminMenu h2 {
  margin-top: 0;
  font-size: 16px;
  text-align: center;
  color: #222;
  text-shadow: 1px 1px 2px #aaa;
}

#adminMenu .input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

#adminMenu .input-row input {
  flex: 1 1 calc(30% - 10px);
  font-size: 8px;
  padding: 6px;
  border: 1px solid #555;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset 0 0 4px #999;
  text-align: center;
  transition: all 0.3s ease;
}

#adminMenu .input-row input:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
  outline: none;
}

#adminMenu .button-row {
  display: flex;
  justify-content: center;
  gap: 20px;
}

#adminMenu .button-row button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#adminMenu .button-row button:hover {
  transform: scale(1.05);
}

#adminMenu .button-row .save {
  background-color: green;
}

#adminMenu .button-row .close {
  background-color: orange;
}

#adminMenuIcon {
  position: absolute;
  top: 10px;
  left: 25px;
  font-size: 15px;
  cursor: pointer;
  color: transparent;
}

/* Beispiel-Orte Sidebar */
#exampleLocationsSidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 300px;
  height: 100%;
  background: #f4f4f4;
  border-right: 1px solid #ddd;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow-y: auto;
  display: none;
}

#exampleLocationsSidebar ul {
  list-style: none;
  padding: 0;
}

#exampleLocationsSidebar li {
  margin: 5px 0;
  font-size: 14px;
}

/* Rechner-Stil */
.calculator {
  margin: auto;
  border: 3px solid #000;
  border-radius: 15px;
  padding: 20px;
  width: 80%;
  max-width: 100%;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  transform: none;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  background: linear-gradient(90deg, #b8b8b8, #e0e0e0, #b8b8b8);
  background-size: 200% 200%;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.calculator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('metall.png');
  opacity: 0.8;
  z-index: -1;
}

.screw {
  position: absolute;
  width: 25px;
  height: 25px;
  background: url('schraube.png') no-repeat center center;
  background-size: cover;
  border-radius: 50%;
  z-index: 20;
  box-shadow: 0 0 1px #000;
}

.screw.top-left    { top: 5px; left: 5px; }
.screw.top-right   { top: 5px; right: 5px; }
.screw.bottom-left { bottom: 5px; left: 5px; }
.screw.bottom-right{ bottom: 5px; right: 5px; }
