/* === Formular Layout === */
.magicline-form {
  text-align: left;
  width: 100%;
  color: #fff;
}
.canvas {
  width: 300px;
  height: 100px;
  background: white !important; /* Testweise wei setzen */
}

/* Flex-Reihen für z.B. PLZ/Ort */
.magicline-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 12px;
}

.magicline-half {
  width: 49%;
  box-sizing: border-box;
}

/* Labels */
.magicline-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  margin-top: 15px;
  color: #fff;
}

.magicline-form label:first-child {
  margin-top: 0;
}

/* Inputs & Dropdowns */
.magicline-form input:not([type="checkbox"]),
.magicline-form select,
.magicline-term-dropdown {
  width: 100%;
  padding: 8px 16px;
  margin-top: 5px;
  border: 1px solid #555;
  border-radius: 5px;
  background: #222 !important;
  color: #fff !important;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* Checkboxen */
.magicline-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: #00ffcc;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Zusatzmodule (Checkbox + Text) */
.magicline-optional-modules {
  margin-top: 15px;
}

.magicline-optional-modules label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #fff;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

/* AGB Checkbox mit Text */
label.accept-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  color: #fff;
}

label.accept-terms input[type="checkbox"] {
  margin-top: 3px;
}

/* Submit Button */
.magicline-form button {
  background: #fff;
  color: #000;
  padding: 12px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  transition: background 0.3s ease;
}

.magicline-form button:hover {
  background: #40e0d0;
}

/* === Responsive Breakpoints === */
@media screen and (max-width: 768px) {
  .magicline-flex-row {
    flex-direction: column;
  }

  .magicline-half {
    width: 100%;
  }

  .magicline-angebot {
    max-width: 100%;
    width: 100%;
  }

  .magicline-angebote {
    flex-direction: column;
    align-items: center;
  }
}

/* === Angebotskarten Layout === */
.magicline-angebote {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}

.magicline-angebot {
  background: #111;
  color: #fff;
  border: 2px solid #fff;
  padding: 20px;
  flex: 1 1 300px;
  max-width: 300px;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.magicline-angebot h2 {
  font-size: 26px;
  margin-bottom: 15px;
  color: #fff;
  font-weight: bold;
  text-align: left;
}

.magicline-angebot ul {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
  text-align: left;
}

.magicline-angebot li {
  margin: 5px 0;
  font-size: 15px;
  color: #fff;
}

.magicline-angebot .extra-feature {
  color: #40e0d0;
}

/* Preisbereich in Karte */
.magicline-price {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 15px;
  text-align: left;
}

.magicline-preisbereich {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* CTA Button in Karte */
.magicline-buchen-btn {
  margin-top: auto;
  padding: 12px;
  background: #fff;
  border: none;
  color: #000;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  border-radius: 50px;
  transition: background 0.3s ease;
  width: 100%;
}

.magicline-buchen-btn:hover,
.magicline-buchen-btn:active {
  background: #40e0d0;
  color: #000;
}

/* === Hinweise unter Preisbox === */
.magicline-flatfees {
  min-height: 4em;
  margin-top: 1em;
  font-size: 0.85em;
  color: #999;
  line-height: 1.5em;
  text-align: left;
  transition: all 0.3s ease-in-out;
}

/* === Popup Overlay === */
.magicline-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999;
}

.magicline-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 800px;
  background: #000;
  padding: 50px 20px;
  transform: translate(-50%, -50%);
  z-index: 1000;
  border: 1px solid grey;
  border-radius: 15px;
  overflow-y: auto;
  max-height: 90vh;
  color: #fff;
}

.magicline-popup h3 {
  margin-top: 0;
  font-size: 24px;
  color: #fff;
  font-weight: bold;
}

.magicline-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
}

.magicline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

.magicline-spinner-centered {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #555;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}