/* ak-form -> Standard Form */

.ak-form label {
    display: block;
    color: var(--form-label);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.ak-form textarea,
.ak-form select,
.ak-form input {
    background-color: var(--form-input-bg);
    /* Nutze 2px auch hier, um das "Springen" beim Focus zu verhindern */
    border: 1px solid var(--form-input-border); 
    color: var(--form-input-text);
    border-radius: var(--std-border-radius);
    padding: 8px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	outline: 0px solid transparent;
}

.ak-form textarea:hover,
.ak-form select:hover,
.ak-form input:not(:disabled):hover {
    border-color: var(--form-input-border); 
    background-color: var(--form-input-bg);   
    box-shadow: 0 7px 10px var(--form-input-border);
}

.ak-form textarea:focus,
.ak-form select:focus,
.ak-form input:focus {
    border-color: var(--form-input-border); 
    background-color: white;
    font-size: 1.01rem; 
	outline: 2px solid var(--form-input-border);
	outline-offset: -1px;
}

.ak-form ::placeholder {
    color: var(--input-placeholder);
    opacity: 1;
}

.ak-form input:disabled, 
.ak-form textarea:disabled, 
.ak-form select:disabled {
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    border-color: var(--disabled-border);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Basis für alle Wrapper */

.ak-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    width: 100%;
}
.ak-form-group label {
    color: var(--form-label);
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: var(--std-label-font-size);
}

.w-xs { max-width: 80px; }   /* z.B. PLZ (kurz), Hausnummer */
.w-sm { max-width: 150px; }  /* z.B. Telefon, Datum */
.w-md { max-width: 350px; }  /* z.B. Vorname, Passwort */
.w-lg { max-width: 500px; }  /* z.B. E-Mail, Straße */
.w-full { max-width: 100%; } /* z.B. Textarea, lange Sätze */

/* Das Input-Feld im Wrapper füllt immer den verfügbaren Platz des Wrappers */
.ak-form-group input, 
.ak-form-group select, 
.ak-form-group textarea {
    width: 100%;
    box-sizing: border-box; /* WICHTIG: Damit Padding/Border die Breite nicht sprengen */
}

/* z.B. für PLZ Stadt */
.ak-form-row {
    display: flex;
    gap: 1rem; /* Abstand zwischen den Feldern */
    flex-wrap: wrap; /* Bricht auf dem Handy automatisch untereinander */
    margin-bottom: 0.5rem; /* weglassen? */
}

/* ==> Das ist jetzt für groups, die eine sections bilden sollen wie z.B. Postadresse */
/* Grosses Haupt-Label */
.ak-group-title {
    display: block;
    color: var(--form-label);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: var(--std-label-font-size);
}

/* Container für ein Feld + sein Label (vgl. Ak-selection-item) */
.ak-input-item {
    display: flex;
    flex-direction: column; 
/*    flex-direction: column-reverse; *//* Trick: Label unter dem Input im Code, aber visuell steuerbar */
    gap: 4px;
    flex: 1;
	position: relative;
}

/* Kleines Label ändert sich bei Focus*/
.ak-input-item label {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--form-label);
    margin: 0;
}

.ak-input-item:focus-within label {
    font-weight: 600;
}
.ak-input-item svg {
  fill: currentColor;
  stroke: currentColor;
}
/* Hier kommen die Buttons rein */
.ak-form-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between; /* Schiebt Links nach links, Rechts nach rechts */
    align-items: flex-start;        /* Wichtig für den Login-Spezialfall */
}

/* Die rechte Gruppe (Senden + optional Passwort vergessen) */
.ak-form-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alles nach rechts bündig */
    gap: 8px;
}


/* Password Felder sollen ein Auge zum Umschalten sichtbar/unsichtbar bekommen */
/* Speziell für passwords */
.ak-input-item input[type="password"],
.ak-input-item input[type="text"].pw-field {
    padding-right: 40px;
}



/* Password Field and Eye (wrapped)*/
.input-pw-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.pw-toggle {
/*    font-size: 1.2rem;*/
/*    line-height: 1;*/

    position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
/*    right: 12px;
	bottom: 17px; 
    top: auto;    
	transform: translateY(50%);
*/

background: none;
border: none;
padding: 4px;
margin: 0;
    cursor: pointer;

    color: var(--box-header);
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
	display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    user-select: none; 
    -webkit-user-select: none; /* Safari */    
}
.pw-toggle:hover,
.pw-toggle:focus-visible {
    opacity: 1;
}
/* SVG Größe & Füllung für das Auge */
.pw-toggle .icon-stroke {
    width: 20px;
    height: 20px;
    fill: none; /* Verhindert das Voll-Laufen des Auges */
    stroke: currentColor;
}
/* Fokus-Ring für Tastaturnutzer sauber anzeigen */
.pw-toggle:focus-visible {
    outline: 2px solid var(--lela-orange);
	/* outline: 2px solid var(--box-header); */
    outline-offset: 2px;
    border-radius: 4px;
}

/* Container für Radio/Checkbox-Gruppen */
.ak-selection-group {
    display: flex;
    flex-direction: column; /* Standard: Vertikal */
    gap: 0.8rem;
    padding-top: 5px;
}

/* Die horizontale Variante */
.ak-selection-group.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Die einzelne Zeile (Input + Label) */
.ak-selection-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-direction: row;
}

.ak-selection-item input {
    /* Wichtig: Verhindert, dass Radio/Checkbox durch 2px Border 
       breit wie ein Textfeld werden */
    width: auto !important; 
    margin: 0;
    cursor: pointer;
}

.ak-selection-item label {
    font-weight: 400; /* Text bei Optionen nicht fett */
    margin: 0;
    cursor: pointer;
}
