/* Emmering Jobs – Frontend Styles */

/* ── Stellenliste ─────────────────────────────────────────────────────────── */

.emj-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.emj-stelle-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 11px;
    padding: 20px 22px;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.emj-stelle-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #FFD505;
}

.emj-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.emj-tag {
    display: inline-block;
    background: #fff8dc;
    border: 1px solid #FFD505;
    color: #5a4500;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}
.emj-tag-art {
    background: #f0f4ff;
    border-color: #c5d0f0;
    color: #2a3a7a;
}

.emj-card-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.emj-card-meta {
    font-size: 13px;
    color: #555;
}

.emj-frist {
    font-size: 12.5px;
    color: #2a7a2a;
    font-weight: 500;
}
.emj-frist-past {
    font-size: 12.5px;
    color: #c00;
    font-weight: 500;
}

.emj-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.emj-no-jobs {
    padding: 32px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 11px;
    color: #666;
}

/* ── Einzelansicht ────────────────────────────────────────────────────────── */

.emj-single {
    max-width: 780px;
}
.emj-single-intro {
    background: #fafafa;
    border-left: 3px solid #FFD505;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}
.emj-single-header {
    margin-bottom: 24px;
}
.emj-single-header h2 {
    font-size: 26px !important;
    margin: 6px 0 4px !important;
}
.emj-eingrupp {
    font-size: 14px;
    color: #555;
}
.emj-section {
    margin-bottom: 24px;
}
.emj-section h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #FFD505;
    padding-bottom: 6px;
    margin-bottom: 12px !important;
}
.emj-section ul {
    padding-left: 20px;
}
.emj-section ul li {
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 14px;
}
.emj-frist-hinweis {
    background: #fff8dc;
    border: 1px solid #FFD505;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}
.emj-single-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.emj-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.18s;
    border: 2px solid transparent;
    line-height: 1;
}
.emj-btn-primary {
    background: #FFD505;
    color: #1a1a1a !important;
    border-color: #FFD505;
}
.emj-btn-primary:hover {
    background: #e6be00;
    border-color: #e6be00;
}
.emj-btn-outline {
    background: transparent;
    color: #1a1a1a !important;
    border-color: #ddd;
}
.emj-btn-outline:hover {
    border-color: #FFD505;
    background: #fff8dc;
}
.emj-btn-ghost {
    background: transparent;
    color: #666 !important;
    border-color: transparent;
}
.emj-btn-ghost:hover {
    color: #1a1a1a !important;
    background: #f0f0f0;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */

.emj-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    /* Versteckt via opacity+pointer-events, nicht display – so kann JS es überschreiben */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.emj-modal-overlay.emj-open {
    opacity: 1;
    pointer-events: all;
}

.emj-modal {
    background: #fff;
    border-radius: 11px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

.emj-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}
.emj-modal-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 3px;
}
.emj-modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}
.emj-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
    margin-top: 2px;
}
.emj-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Schritte */
.emj-steps {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    gap: 6px;
}
.emj-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}
.emj-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.emj-step.active {
    color: #1a1a1a;
}
.emj-step.active span {
    background: #FFD505;
    color: #1a1a1a;
}
.emj-step.done span {
    background: #2a7a2a;
    color: #fff;
}
.emj-step-sep {
    color: #ccc;
    font-size: 14px;
}

/* Modal Body */
.emj-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.emj-step-hint {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #445;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Formular */
.emj-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.emj-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}
.emj-form-group-small {
    max-width: 120px;
}
.emj-form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
}
.emj-form-group input,
.emj-form-group textarea {
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #1a1a1a;
    transition: border-color 0.15s;
    font-family: inherit;
    background: #fff;
}
.emj-form-group input:focus,
.emj-form-group textarea:focus {
    outline: none;
    border-color: #FFD505;
    box-shadow: 0 0 0 3px rgba(255,213,5,0.15);
}
.emj-form-group textarea {
    resize: vertical;
    line-height: 1.6;
}
.emj-char-count {
    font-size: 11px;
    color: #aaa;
    text-align: right;
}

/* File Drop */
.emj-file-drop {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.emj-file-drop:hover,
.emj-file-drop.drag-over {
    border-color: #FFD505;
    background: #fff8dc;
}
.emj-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none !important;
    padding: 0 !important;
}
.emj-file-drop-label {
    font-size: 13px;
    color: #888;
}
.emj-file-name {
    font-size: 12px;
    color: #2a7a2a;
    margin-top: 4px;
    font-weight: 600;
}

/* Datenschutz */
.emj-datenschutz {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}
.emj-datenschutz label {
    display: flex;
    gap: 10px;
    font-size: 12.5px;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
}
.emj-datenschutz input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Modal Footer */
.emj-modal-footer {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    gap: 10px;
}

/* Fehler / Erfolg */
.emj-error {
    margin: 0 24px;
    padding: 10px 14px;
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    border-radius: 8px;
    color: #c00;
    font-size: 13px;
}
.emj-success {
    margin: 0 24px;
    padding: 12px 16px;
    background: #f0fff4;
    border: 1px solid #a3d9a3;
    border-radius: 8px;
    color: #1a5c1a;
    font-size: 13.5px;
    font-weight: 500;
}

/* Loading */
.emj-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}
.emj-btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #333;
    border-radius: 50%;
    animation: emj-spin 0.6s linear infinite;
    margin-left: 6px;
}
@keyframes emj-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .emj-liste {
        grid-template-columns: 1fr;
    }
    .emj-form-row {
        grid-template-columns: 1fr;
    }
    .emj-modal {
        max-height: 95vh;
    }
    .emj-steps {
        font-size: 11px;
    }
}
