/* ---------------------------------------------
   floating-group für Inputs und Selects
--------------------------------------------- */

.floating-group {
    position: relative;
    display: flex;
    flex-direction: column-reverse; /* Flexbox zur richtigen Ausrichtung */
    padding: 1.2rem 0.75rem 0.4rem;
}

.floating-group input,
.floating-group select {
    font-size: 1rem;
    padding: 1.2rem 0.75rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    width: 100%;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Label korrekt mittig im Eingabefeld */
.floating-group label {
    position: absolute;
    left: 1rem;
    top: 50%; /* Zentriert das Label vertikal */
    transform: translateY(-50%); /* Korrekt ausrichten */
    font-size: 1rem;
    color: #666;
    transition: all 0.2s ease;
    background: white;
    padding: 0 0.25rem;
    pointer-events: none; /* Verhindert, dass das Label das Eingabefeld blockiert */
    z-index: 2;
}

/* Wenn das Feld fokussiert oder ausgefüllt wird */
.floating-group label.float {
    transform: translateY(-1.6em); /* Label nach oben schieben */
    font-size: 0.75rem;
    color: #333;
    z-index: 3;
}

/* Speziell für Date-Input */
.floating-group input[type="date"]:not(:focus):not(:valid) {

    caret-color: #333;
}

/* Datumseingabe nach Fokus korrekt anzeigen */
.floating-group input[type="date"]:focus,
.floating-group input[type="date"]:valid {
    color: #333;
}

/* Platzhalter für Date-Input unterdrücken */
.floating-group input[type="date"]::placeholder {
    color: transparent;
}

.floating-textarea {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
}

.floating-textarea textarea {
    font-size: 1rem;
    padding: 1.2rem 0.75rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    width: 100%;
    resize: vertical;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.floating-textarea label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #666;
    transition: all 0.2s ease;
    background: white;
    padding: 0 0.25rem;
    pointer-events: none;
    z-index: 2;
}

.floating-textarea textarea:focus + label,
.floating-textarea textarea:not(:placeholder-shown):not(:focus) + label {
    transform: translateY(-1.6em);
    font-size: 0.75rem;
    color: #333;
    z-index: 3;
}


