/* Container & Rahmen */
.azubi-dashboard-container {
    font-family: Arial, sans-serif;
    background: #fffacd;
    padding: 22px;
    border-top: 4px solid #fff08a;
    border-right: 6px solid #fff08a;
    border-left: 6px solid #fff08a;
    border-bottom: 6px solid #fff08a;
    border-radius: 8px;
    box-sizing: border-box;
}
.azubi-dashboard-header { position: relative; }
.azubi-dashboard-header h2 {
    margin: 0;
    display: inline-block;
    font-size: 20px;
    line-height: 1.2;
}
.azubi-dashboard-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}
.azubi-dashboard-section h3 { color: #333; margin-bottom: 10px; }
.field-wrapper { margin-top: 10px; }
label { display: block; margin-bottom: 6px; font-weight: 600; color: #222; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
}
select { min-height: 44px; }
textarea { min-height: 120px; }

/* Buttons */
.azubi-dashboard-section form button,
.azubi-btn, .azubi-btn-buchen, .azubi-btn-lehrplan {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}
.azubi-dashboard-section form button { background: #0073aa; color: #fff; }
.azubi-dashboard-section form button:hover { background: #005a87; }
.azubi-btn { background: #0073aa; color: #fff; }
.azubi-btn:hover { background: #005a87; }
.azubi-btn-purple { background: #d8c8ff; color: #fff; }
.azubi-btn-purple:hover { background: #c2adff; }

/* Availability Button */
.availability-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    border: none;
}
.availability-on { background: #28a745; color: #fff; }
.availability-off { background: #ffcc00; color: #111; }

/* Sprechkurse Karten */
.sprechkurse {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 16px;
}
.sprechkurs-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.azubi-btn-lehrplan { background: #d8c8ff; color: #fff; margin-left: 6px; }
.azubi-btn-buchen { background: #0073aa; color: #fff; margin-left: 6px; }

/* Logout */
.azubi-logout-wrapper { text-align: center; margin-top: 24px; }
.azubi-btn-logout {
    background: #ff6b6b;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
}
.azubi-btn-logout:hover { background: #e14b4b; }

/* Berufswunsch */
select[name^='berufswunsch'] {
    min-height: 140px;
    font-size: 15px;
    background: #fafafa;
    border-radius: 6px;
    padding: 6px;
}

/* Verbesserter Abstand zwischen den Test-Buttons */
.azubi-dashboard-section.tests .azubi-btn { margin-right: 20px; }
.azubi-dashboard-section.tests .azubi-btn:last-child { margin-right: 0; }

/* ======================================================= */
/* Bedingte Felder: Ausblenden-Logik */
/* ======================================================= */

/*
 * FINALE LÖSUNG: Diese Regel ist jetzt die stärkste von allen.
 * Das JavaScript fügt die Klasse 'conditional-field-hidden' korrekt hinzu.
 * Diese CSS-Regel mit !important erzwingt das Ausblenden, egal was andere Regeln sagen.
 */
.azubi-dashboard-container .azubi-dashboard-section .field-wrapper.conditional-field.conditional-field-hidden {
    display: none !important;
}

/* Stellenanzeigen */
.job-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.job-listing-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.job-listing-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
}
.job-listing-card h4 a {
    color: #0073aa;
    text-decoration: none;
}
.job-listing-card h4 a:hover {
    text-decoration: underline;
}
.job-listing-meta {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}
.job-listing-description {
    margin-bottom: 15px;
}
.job-listing-card.job-card-applied {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

/* Schutzschild für Nichtmitglieder */
.azubi-dashboard-content.non-member-overlay {
    pointer-events: none;
    user-select: none;
    opacity: 0.9;
}

.azubi-dashboard-content.non-member-overlay * {
    pointer-events: none !important;
}