#zubringer-form *,
#zubringer-form *::before,
#zubringer-form *::after {
  box-sizing: border-box;
}

#zubringer-form {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

#zubringer-form h2 {
  margin-bottom: 1.5rem;
  margin-top: 0;
  color: #00aef0;
  font-weight: 700;
  text-align: center;
}

#zubringer-form label {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #333;
}

#zubringer-form input,
#zubringer-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 10px;
}

#zubringer-form input:focus,
#zubringer-form select:focus {
  border-color: #00aef0;
  box-shadow: 0 0 0 3px rgba(0, 174, 240, 0.2);
  outline: none;
}

#zubringer-form button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background-color: #00aef0;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#zubringer-form button:hover {
  background-color: #0096cc;
}

#zubringer-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#zubringer-form textarea:focus {
  border-color: #00aef0;
  box-shadow: 0 0 0 3px rgba(0, 174, 240, 0.2);
  outline: none;
}

#people-warning,
#confirmation {
  margin-top: 0.8rem;
  font-weight: 500;
}

#zubringer-form .required {
  color: #444;
  font-size: medium;
}

/* Container für Label + Icon */
#zubringer-form label.with-tooltip {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stil für das ℹ️ Icon */
#zubringer-form .tooltip {
  cursor: help;
  font-size: 1rem;
  color: #666;
  user-select: none;
  line-height: 1;
  position: relative;
}

#zubringer-form .tooltip:hover {
  color: #000;
}

/* Tooltip bubble */
#zubringer-form .tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  right: -50px;
  background-color: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.3;
  white-space: normal;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  min-width: 250px;
  word-wrap: break-word;
}

/* Tooltip arrow */
#zubringer-form .tooltip::before {
  content: "";
  position: absolute;
  bottom: 115%;
  right: 60px;
  border: 5px solid transparent;
  border-top-color: #333;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

/* Show tooltip on hover */
#zubringer-form .tooltip:hover::after,
#zubringer-form .tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Show tooltip when active (for mobile) */
#zubringer-form .tooltip.active::after,
#zubringer-form .tooltip.active::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#zubringer-form select.readonly {
  pointer-events: none;
  background-color: #eee;
  color: #555;
}

#storno-form *,
#storno-form *::before,
#storno-form *::after {
  box-sizing: border-box;
}

#storno-form {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fefefe;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
}

#storno-form h2 {
  margin-bottom: 1.5rem;
  color: #5a2a83;
  font-weight: 700;
  text-align: center;
}

#h3-storno h3 {
  margin-top: 1.4rem;
  color: #5a2a83;
  font-weight: 600;
  text-align: center;
}

#storno-form label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #333;
  text-align: left;
}

#storno-form input,
#storno-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #bbb;
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 10px;
}

#storno-form input:focus,
#storno-form select:focus {
  border-color: #7b3fd8;
  box-shadow: 0 0 0 3px rgba(123, 63, 216, 0.2);
  outline: none;
}

#search-storno {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

#storno-form button {
  width: 100%;
  padding: 0.75rem;
  background-color: #7b3fd8;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#storno-form button:hover {
  background-color: #692cbe;
}

#storno-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #bbb;
  border-radius: 8px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#storno-form textarea:focus {
  border-color: #7b3fd8;
  box-shadow: 0 0 0 3px rgba(123, 63, 216, 0.2);
  outline: none;
}

#storno-form .required {
  color: #a11a1a;
  font-size: medium;
}

#storno-form label.with-tooltip {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#storno-form .tooltip {
  cursor: help;
  font-size: 1rem;
  color: #666;
  user-select: none;
  line-height: 1;
}

#storno-form .tooltip:hover {
  color: #000;
}

#storno-form select.readonly {
  pointer-events: none;
  background-color: #eee;
  color: #555;
}

#storno-form table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 1rem;
  table-layout: fixed;
  overflow-x: auto;
}

#storno-form table th,
#storno-form table td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid #ddd;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  #storno-form {
    max-width: 90%;
  }

  #storno-form table td {
    text-align: center;
  }

  #storno-form table th {
    text-align: center;
  }
}

#storno-form table th {
  background-color: #7b3fd8;
  color: #fff;
  font-weight: 600;
}

#storno-form table tr:nth-child(even) {
  background-color: #f9f9f9;
}

#storno-form table button.delete-booking-btn {
  background-color: #a11a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 0.9rem;
}

#storno-form table button.delete-booking-btn:hover {
  background-color: #881515;
}

@media (min-width: 769px) {
  #zubringer-form .tooltip::after {
    max-width: 450px;
  }
}

@media (max-width: 768px) {
  #storno-form table,
  #storno-form thead,
  #storno-form tbody,
  #storno-form th,
  #storno-form td,
  #storno-form tr {
    display: block;
    width: 100%;
  }

  #storno-form thead {
    display: none;
  }

  #storno-form tr {
    margin-bottom: 1.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  #storno-form td {
    border: none;
    padding: 0.5rem 0;
    position: relative;
    text-align: left;
  }

  #storno-form td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 0.25rem;
  }

  #storno-form table button.delete-booking-btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  #zubringer-form label.with-tooltip {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #zubringer-form label.with-tooltip .tooltip {
    align-self: center;
    margin-left: 0;
  }

  /* Mobile tooltip positioning */
  #zubringer-form .tooltip::after {
    right: 0;
    left: auto;
    transform: translateX(0) translateY(10px);
    max-width: 250px;
  }

  #zubringer-form .tooltip::before {
    right: 10px;
    left: auto;
  }

  #zubringer-form .tooltip:hover::after,
  #zubringer-form .tooltip.active::after {
    transform: translateX(0) translateY(0);
  }
}

#confirmation {
  display: none;
  margin-top: 20px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
}

#confirmation.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#confirmation.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#zubringer-form .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

#storno-form .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid #7b3fd8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
