.modal2 {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.modal-contentwindow {
  background-color: #fefefe;
  margin: max(160px, 15%) auto 0 auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 1100px;
}

.close {
  color: #000;
  float: right;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.6px;
}

.close:hover,
.close:focus {
  color: #999;
  text-decoration: none;
  cursor: pointer;
}

iframe {
  width: 100%;
  max-width: 1100px;
  height: min(500px, calc(100vh - 200px));
  border: solid 1px #000;
}

@media (max-height: 610px) {
  iframe {
    height: calc(100vh - 200px);
  }
}


.error-message {
            color: red;
            font-size: 0.9em;
            margin-top: -8px;
            margin-bottom: 10px;
            display: block; /* Fehlermeldung eigene Zeile */
        }
.form-group {
	padding: 5px 10px 40px 0;
}

.form-group a  {
	color: #935800;
	text-decoration: none;
}
.form-group a:hover  {
	color: #999;
	text-decoration: none;
}

.form-container {
        width: 100%;
        margin: 0 auto;
        padding: 40px 0 0;
		clear: both;
    }

    .form-grid {
        display: grid;
        column-gap: 20px;
        margin-bottom: 10px;
    }

    @media (min-width: 800px) {
        .form-grid {
            grid-template-columns: 1fr 1fr;
        }
        
        .form-grid .full-width {
            grid-column: 1 / -1;
        }
    }

    @media (max-width: 799px) {
        .form-grid {
            grid-template-columns: 1fr;
        }
    }

    .txtstand {
        display: block;
        margin-bottom: -5px;
        font-weight: 500;
		letter-spacing: 0.6px;

    }

    input[type="text"],
    input[type="email"],
	input[list],
    textarea {
        width: 100%;
        padding: 5px;
        box-sizing: border-box;
		font-size: 1em;
		font-family: inherit;
		background-color: #FFF7EA;
   		border: 1px solid #ccc;
    	margin: 10px 0;
    }

    textarea {
        vertical-align: top;
    }

    .fragequ-container {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }


    .anmelde-buttonform {
		position: relative;
		box-sizing: border-box;
        padding: 10px 20px;
        background-color: #A35F21;  /* #BB7100;*/
        color: white;
		font-family: inherit;
		font-size: inherit;
        border: none;
        border-radius: 4px;
        cursor: pointer;
		width: 200px;
		height: 50px;
    }

    .anmelde-buttonform:hover {
        background-color: #999;
    }
	.anmelde-buttonform::before {
		content: '';
    	position: absolute;
   	 	top: -2px;
    	left: -2px;
    	right: -2px;
    	bottom: -2px;
    	border: none;
    	pointer-events: none; /* Sehr wichtig, damit Pseudo-Elemente Klicks nicht abfangen, zB beim tippen auf die Buttonkante */
	}
input[type="text"]:hover,
input[type="email"]:hover,
input[list]:hover,
textarea:hover {
    border-color: #A35F21; /* Eine hellere Farbe für den Hover-Effekt */
    box-shadow: 0 0 5px rgba(224, 160, 103, 0.5); /* Leichter Schatten */
    transition: border-color 0.1s ease-in-out, box-shadow 0.3s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[list]:focus,
textarea:focus {
    border-color: #BB7100;
    box-shadow: 0 0 6px rgba(187, 113, 0, 0.8);
    outline: none; /* Standard-Outline des Browsers entfernen */
}
.modal {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);

    /* Flexbox für Zentrierung des Inhalts, WENNs SICHTBAR IST */
 
    justify-content: center;
    align-items: center;
}
/* bestätigungsWINDOW */
.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 2px solid #BB7100;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    border-radius: 8px;
	font-family: inherit;
    text-align: center;
    position: relative;
}

.modal-close-button {
    background-color: #BB7100;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
	font-family: inherit;
    font-size: 1em;
    margin-top: 20px;
    display: inline-block; /* Für Zentrierung bei Bedarf */
}

.modal-close-button:hover {
    background-color: #999;
}

.modal-content p {
    margin-bottom: 20px;
}

        input[type="checkbox"] {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #BB7100;
            border-radius: 3px;
            outline: none;
            cursor: pointer;
            position: relative;
			vertical-align: -6px;
			margin-right: 10px;
        }

        input[type="checkbox"]:focus {
			box-shadow: 0 0 6px rgba(187, 113, 0, 0.8);
        }
		input[type="checkbox"]:checked {
            background-color: #BB7100;
        }

        /* Häkchen */
        input[type="checkbox"]:checked::after {
            content: '\2713';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

/* ------- kontakt kopf start ------*/

        .contact-container {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            width: 100%;
            margin: 0 auto;
            padding: 0;
        }

        .contact-column {
            flex: 1;
            min-width: 280px;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .contact-item img {
            width: 60px;
            height: auto;
        }

        .contact-column-title {
            margin-bottom: 0;
            font-size: 1em;
			font-weight: 500;
			letter-spacing: 0.6px;
        }

        .no-wrap {
            white-space: nowrap;
        }

        @media (max-width: 768px) {
            .contact-column {
                flex: 100%;
            }
        }
/* ------- kontakt kopf end ------*/

/* BUTTON */

        /* kleinere Code-Feld und Refresh-Button */
        .fragequ-container {
            display: flex;
            align-items: center;
            gap: 10px; /* Abstand zwischen Bild u Button */
            margin-bottom: 10px;
        }

        .fragequ-container img {
            width: 200px;
            height: 50px;
            border: 1px solid #ccc;
            vertical-align: middle;
        }

        .refresh-fragequ-button {
			position: relative;
			box-sizing: border-box;
            padding: 8px 12px;
            background: #A35F21;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
			font-family: inherit;
            font-size: inherit;
            transition: background-color 0.3s ease;
        }

        .refresh-fragequ-button:hover {
            background: #999;
        }
		.refresh-fragequ-button::before {
		content: '';
    	position: absolute;
   	 	top: -2px;
    	left: -2px;
    	right: -2px;
    	bottom: -2px;
    	border: none;
		pointer-events: none; /* wichtig, damit Pseudo-Elemente Klicks nicht abfangen, zB tippen auf Buttonkante */
        }

		/*---------------load file ------------*/
		
/* Styling Dateianhang */
input[type="file"] {
    width: 100%;
    border: 1px solid #ccc;
    padding: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    background-color: #FFF7EA;
    font-size: 1em;
}

/* Stil der Liste ausgewählter Dateien */
#attachmentList {
    border: 1px solid #eee;
    padding: 10px;
    min-height: 50px;
    margin-bottom: 15px;
    background-color: #fcfcfc;
    border-radius: 4px;
	word-break: break-word;
	
}

#attachmentList div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

#attachmentList div:last-child {
    border-bottom: none;
}

#attachmentList button {
    margin-left: 10px;
}

/* Fehlermeldung für Anhänge */
#attachmentError {
    display: block; /* Fehlermeldung in neuer Zeile */
    margin-top: -5px;
    margin-bottom: 10px;
}

/* --- ortschaft dropdown START ----- */

    .dropdown-wrapper {
    position: relative; /* WICHTIG: Referenzpunkt für absolute Positionierung */
    width: 100%;
    z-index: 200; /* HÖHERER Z-INDEX, damit der Input über der Liste liegt */
}

    .custom-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      max-height: 180px;
      overflow-y: auto;
      border: 1px solid #ccc;
      background: white;
      z-index: 2000;
      display: none;
    }

    .custom-dropdown div {
      padding: 10px;
      cursor: pointer;
    }

    .custom-dropdown div:hover {
      background-color: #f0f0f0;
    }
    .custom-dropdownup {
      position: absolute;
      bottom: 100%;
      left: 0;
      right: 0;
      max-height: 180px;
      overflow-y: auto;
      border: 1px solid #ccc;
      background: white;
      z-index: 250;
      display: none;
	  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    }

    .custom-dropdownup div {
      padding: 10px;
      cursor: pointer;
    }

    .custom-dropdownup div:hover {
      background-color: #f0f0f0;
    }
   #ortschaft-list {
    position: absolute;
    /* Startet direkt unter dem Eingabefeld (welches 100% Höhe des Wrappers einnimmt) */
    top: 0; 
    left: 0;
    width: 100%; /* Breitenanpassung an den Wrapper */
    margin: 0;
    padding: 0;
    list-style: none; 
    
    /* Anforderungen */
    height: 0;
    overflow: hidden;
    z-index: 10; /* UNTER Input-Feld  */
    
    /* OPTIONAL: Visuelle Anpassungen für die Liste */
    border: none;
    box-sizing: border-box; /* Damit Breite/Höhe das Padding/Border inkludiert */
}

#ortschaft-list li {
    display: inline-block;
    padding: 0 8px;
    line-height: 40px; /* Vertikale Zentrierung innerhalb der 40px Höhe */
    white-space: nowrap;
    cursor: default;
}

.sitemapformcl {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: -10px;
}

.sitemapformpart {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
	margin-bottom: 40px;
}

.inputfieldparameter {
    height: 40px;
    white-space: nowrap;
    z-index: 220; /* Muss über der ortschaft-list (10) liegen, aber unter custom-dropdownup (250) */
    position: relative; /* Position: relative oder z-index im Wrapper nötig für Z-Index */
}

.kontaktaufnehmen-button {
    padding: 10px 20px;
    margin: 0 0 0 15px;
    background-color: #A35F21;
    color: white;
    font-size: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
}

.kontaktaufnehmen-button:hover {
    background-color: #999;
}

.fieldstandard {
    display: block;
    margin-bottom: -5px;
	font-family: inherit;
    font-weight: 500;
	letter-spacing: 0.6px;
    margin-right: 5px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .sitemapformpart {
        flex-direction: column; /* Text und Formular untereinander */
        align-items: center;
    }

    .sitemapformcl {
        flex-direction: column; /* Elemente untereinander */
        align-items: center;
        width: 100%;
    }

    .sitemapformpart p {
        text-align: center;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .inputfieldparameter {
        white-space: nowrap;
        margin-bottom: 10px;
    }

    .kontaktaufnehmen-button {
        white-space: normal;
        margin: 10px auto;
    }

    .fieldstandard {
        white-space: normal;
        text-align: center;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* --- ortschaft dropdown END ----- */

/* native File-Input */
.custom-file-upload input[type="file"] {
    display: none;
}

.upload-label {
    display: inline-block;
    padding: 2px 10px;
	margin: 10px 0;
    background-color: #A35F21;
    color: white;
    font-family: inherit;
    font-size: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-label:hover {
    background-color: #999;
}
