/* =========================================================
   Datei: assets/css/emp-archive-einsatz-cards.css
   Zweck: Styling für Einsatz-Archiv (Kartenansicht)
   Design angepasst an Personal-/Fuhrpark-Archive
   ========================================================= */

/* =========================================================
   Wrapper / Header
   ========================================================= */

.emp-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

.emp-archive-header {
    margin-bottom: 14px;
}

.emp-archive-header h1 {
    margin: 0;
    color: var(--emp-dark, #1d2327);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.15;
}

.emp-archive-subtitle {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--emp-muted, #6b7280);
    vertical-align: baseline;
}

/* =========================================================
   Controls / Filterbar
   ========================================================= */

.emp-controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: var(--emp-radius, 14px);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    margin: 14px 0 18px;
}

.emp-controls-form {
    display: flex;
    gap: 10px 14px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}

.emp-filter-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.emp-filter-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--emp-dark, #1d2327);
}

.emp-select-style {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 38px 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--emp-border, #dcdcde);
    background: #fff;
    color: var(--emp-dark, #1d2327);
    font-size: 0.95rem;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.03);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--emp-muted, #6b7280) 50%),
        linear-gradient(135deg, var(--emp-muted, #6b7280) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.emp-select-style:focus {
    outline: none;
    border-color: var(--emp-primary, #d63638);
    box-shadow: 0 0 0 3px var(--emp-primary-soft, rgba(214,54,56,0.12));
}

.emp-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.emp-reset-link {
    color: var(--emp-muted, #6b7280);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.emp-reset-link:hover,
.emp-reset-link:focus {
    color: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.08));
    text-decoration: none;
}

/* View Switch */
.emp-view-switch {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: 999px;
    background: #fff;
}

.emp-view-btn {
    width: 40px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--emp-muted, #6b7280);
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.emp-view-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.emp-view-btn:hover,
.emp-view-btn:focus {
    color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.10));
    border-color: var(--emp-primary, #d63638);
    transform: translateY(-1px);
}

.emp-view-btn.is-active {
    background: var(--emp-primary, #d63638);
    color: #fff;
    border-color: var(--emp-primary, #d63638);
}

/* =========================================================
   Cards Grid
   ========================================================= */

.emp-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* =========================================================
   Card
   ========================================================= */

.emp-card {
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: var(--emp-radius, 14px);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0,0,0,0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 100%;
}

.emp-card:hover,
.emp-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

.emp-card-link {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   Thumb
   ========================================================= */

.emp-card-thumb {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #eef1f3;
    border-bottom: 1px solid var(--emp-border, #dcdcde);
    position: relative;
}

.emp-card-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.06));
}

.emp-card-thumb--placeholder::after {
    content: "🚒";
    font-size: 48px;
    opacity: 0.45;
}

/* =========================================================
   Card Body
   ========================================================= */

.emp-card-body {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Topline */
.emp-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.emp-card-nr {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--emp-primary-soft, rgba(214,54,56,0.10));
    color: var(--emp-primary, #d63638);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.emp-card-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff4f4;
    border: 1px solid #f3c7c7;
    color: var(--emp-primary, #d63638);
    line-height: 1;
    white-space: nowrap;
}

/* Title */
.emp-card-title {
    margin: 0 0 6px;
    font-size: 1.18rem;
    line-height: 1.25;
    color: var(--emp-dark, #1d2327);
    word-break: break-word;
}

.emp-card-stichwort {
    font-weight: 700;
    color: var(--emp-primary, #d63638);
    font-size: 0.82rem;
    margin-bottom: 10px;
    line-height: 1.35;
}
/* =========================================================
   Meta
   ========================================================= */

.emp-card-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--emp-muted, #6b7280);
    font-size: 0.92rem;
}

.emp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.emp-meta-item .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    color: #9aa0a6;
    flex-shrink: 0;
}

/* =========================================================
   Badges
   ========================================================= */

.emp-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.emp-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1;
}

.emp-badge-fw {
    background: var(--emp-dark, #1d2327);
    color: #fff;
}

.emp-badge-art {
    background: var(--emp-bg-soft, #f6f7f7);
    color: #4b5563;
    border: 1px solid var(--emp-border, #dcdcde);
}

/* =========================================================
   Excerpt
   ========================================================= */

.emp-card-excerpt {
    color: #4b5563;
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 12px;
}

/* =========================================================
   CTA
   ========================================================= */

.emp-card-cta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--emp-border, #dcdcde);
    font-weight: 800;
    color: var(--emp-primary, #d63638);
    font-size: 0.92rem;
}

/* =========================================================
   Empty State
   ========================================================= */

.emp-empty-state {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px dashed #c8ccd0;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    color: var(--emp-muted, #6b7280);
    font-style: italic;
}

/* =========================================================
   Pagination
   ========================================================= */

.pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    text-decoration: none;
    color: var(--emp-dark, #1d2327);
    border-radius: 999px;
    font-weight: 700;
    box-sizing: border-box;
}

.page-numbers:hover:not(.current),
.page-numbers:focus:not(.current) {
    color: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
    background: var(--emp-primary-soft, rgba(214,54,56,0.08));
    text-decoration: none;
}

.page-numbers.current {
    background: var(--emp-primary, #d63638);
    color: #fff;
    border-color: var(--emp-primary, #d63638);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .emp-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .emp-controls-bar {
        align-items: stretch;
    }

    .emp-actions-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .emp-cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .emp-card-thumb {
        height: 210px;
    }
}

@media (max-width: 640px) {
    .emp-archive-container {
        padding: 16px 12px 28px;
    }

    .emp-controls-form {
        width: 100%;
        gap: 10px;
    }

    .emp-filter-section {
        width: 100%;
        justify-content: space-between;
    }

    .emp-select-style {
        min-width: 0;
        width: 100%;
        max-width: 220px;
    }
}

@media (max-width: 420px) {
    .emp-actions-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .emp-view-switch {
        justify-content: center;
    }

    .emp-reset-link {
        text-align: center;.emp-card-stichwort
    }

    .emp-card-topline {
        flex-direction: column;
        align-items: flex-start;
    }
}