/* Container & Allgemeines */
.agzwdag-form-container {
    max-width: 600px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.agzwdag-dynamic-form .form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.agzwdag-dynamic-form label {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

/* 🎯 Eingabefelder: Erweitert um email, password und den einheitlichen schwarzen Rand */
.agzwdag-dynamic-form input[type="text"],
.agzwdag-dynamic-form input[type="email"],
.agzwdag-dynamic-form input[type="password"],
.agzwdag-dynamic-form input[type="number"],
.agzwdag-dynamic-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #000000 !important; /* Erzwingt den einheitlichen schwarzen Rand */
    border-radius: 4px;
    font-family: inherit !important;      /* Erzwingt exakt dieselbe Schriftart */
    font-size: 16px !important;            /* Verhindert automatischen iOS-Zoom bei Mobile */
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

/* 🎯 NEU: Styling für JavaScript-Live-Fehlermeldungen unter den Feldern */
.agzwdag-js-error {
    color: #d93025;
    font-size: 0.85em;
    display: none; /* Wird via JS eingeblendet */
    margin-top: 5px;
}

/* 🎯 NEU: Die Box für die verschwindenden Passwort-Bedingungen */
.agzwdag-pwd-requirements {
    font-size: 0.85em;
    color: #d93025;
    margin-top: 8px;
    padding: 10px;
    background: #fdf2f2;
    border-left: 3px solid #d93025;
    list-style: none;
    border-radius: 4px;
    display: none; /* Wird via JS eingeblendet, sobald getippt wird */
}

.agzwdag-pwd-requirements li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.agzwdag-pwd-requirements li:last-child {
    margin-bottom: 0;
}

/* Tooltip Styling */
.agzwdag-tooltip {
    position: relative;
    display: inline-flex;
    margin-left: 8px;
    cursor: help;
    color: #2271b1; /* WP Blau */
}

.agzwdag-tooltip .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.agzwdag-tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #2c3338;
    color: #fff;
    text-align: left;
    border-radius: 4px;
    padding: 10px;
    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.agzwdag-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2c3338 transparent transparent transparent;
}

.agzwdag-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Feedback & Button */
.form-feedback {
    margin-top: 10px;
    font-weight: bold;
}

.agzwdag-dynamic-form button[type="submit"] {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.agzwdag-dynamic-form button[type="submit"]:hover {
    background-color: #135e96;
}

/* Alerts (Erfolg, Warnung, Fehler) */
.agzwdag-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.agzwdag-alert .dashicons { margin-right: 10px; }
.agzwdag-alert-warning { background: #fff9e6; border-color: #ffb900; color: #856404; }
.agzwdag-alert-success { background: #e7f4e4; border-color: #46b450; color: #2e5d2d; }
.agzwdag-alert-error { background: #fff0f0; border-color: #d63638; color: #d63638; }

/* Captcha Styling */
.agzwdag-captcha-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.agzwdag-captcha-img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    margin: 10px 0;
    cursor: pointer;
}
.agzwdag-captcha-input {
    width: 100%;
    text-align: center;
    font-size: 1.2em;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #2271b1 !important;
}

/* Footer Links */
.agzwdag-form-footer {
    margin-top: 15px;
    font-size: 0.9em;
    text-align: center;
}

.agzwdag-button {
    background-color: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.agzwdag-button:hover {
    background-color: #135e96;
}

.agzwdag-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.agzwdag-checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label {
    font-weight: normal !important;
    cursor: pointer;
}

.agzwdag-matrix-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    cursor: help;
}

.agzwdag-field-description {
    color: #666;
    margin: 4px 0 0 0;
    font-style: italic;
}