/* assets/css/emp-shortcodes.css
   Einsatz-Manager Pro – Shortcodes (Frontend)
   Komplett neu: konsistente Karten/Listen, bessere Typografie,
   saubere Zeilenumbrüche + responsive Layouts.
*/

:root{
  /* Fallbacks – wird i.d.R. über dein Frontend-CSS / Settings überschrieben */
  --emp-accent: #d63638;
  --emp-dark: #1d2327;
  --emp-muted: #6c7781;
  --emp-bg: #ffffff;
  --emp-soft: #f6f7f7;
  --emp-border: #e5e7eb;
  --emp-radius: 10px;
}

/* -------- Base Helpers -------- */
.emp-shortcode-empty{
  font-style: italic;
  color: var(--emp-muted);
  margin: 10px 0;
}

.emp-sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* =========================================
   [letzte_einsaetze]
   ========================================= */

.emp-widget-list{
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.emp-widget-item{
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--emp-bg);
  border: 1px solid var(--emp-border);
  padding: 12px;
  border-radius: var(--emp-radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.emp-widget-item:hover{
  border-color: var(--emp-accent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.emp-widget-img{
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--emp-soft);
  border: 1px solid var(--emp-border);
}

.emp-widget-img.emp-widget-img-placeholder{
  background: var(--emp-soft);
}

.emp-widget-info{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* wichtig für ellipsis */
}

.emp-widget-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  font-weight: 800;
  color: var(--emp-accent);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.emp-widget-date{
  font-size: 12px;
  font-weight: 600;
  color: var(--emp-muted);
  text-transform: none;
  letter-spacing: 0;
}

.emp-widget-title{
  font-size: 15px;
  margin: 0;
  line-height: 1.25;
  font-weight: 800;
  color: var(--emp-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobil: Titel darf umbrechen */
@media (max-width: 520px){
  .emp-widget-item{ padding: 10px; }
  .emp-widget-img{ width: 64px; height: 64px; min-width: 64px; }
  .emp-widget-title{
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* =========================================
   [einsatz_archiv_liste]
   Fix: NR und Stichwort sauber spaltig (nicht inline zusammenkleben)
   ========================================= */

.emp-archive-widget{
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emp-archive-widget-item{
  display: grid;
  grid-template-columns: 170px 1fr; /* linke Spalte: NR */
  gap: 14px;
  align-items: baseline;
  padding: 12px 12px;
  border-radius: var(--emp-radius);
  background: var(--emp-soft);
  border: 1px solid var(--emp-border);
  text-decoration: none;
  color: inherit;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.emp-archive-widget-item:hover{
  border-color: var(--emp-accent);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.emp-archive-widget-meta{
  font-size: 13px;
  font-weight: 900;
  color: var(--emp-accent);
  letter-spacing: .02em;
  white-space: nowrap;
}

.emp-archive-widget-stichwort{
  font-size: 14px;
  font-weight: 800;
  color: var(--emp-dark);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobil: untereinander */
@media (max-width: 560px){
  .emp-archive-widget-item{
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }
  .emp-archive-widget-stichwort{
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* =========================================
   [einsatz_counter]
   ========================================= */

.emp-counter-wrapper{
  padding: 28px 18px;
  border-radius: 14px;
  text-align: center;
  margin: 18px 0;
  border: 1px solid var(--emp-border);
  border-bottom: 5px solid var(--emp-counter-main, var(--emp-accent));
  background: var(--emp-counter-bg, var(--emp-soft));
}

.emp-counter-title{
  margin: 0 0 10px 0;
  color: var(--emp-counter-text, var(--emp-dark));
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.emp-counter-number{
  color: var(--emp-counter-main, var(--emp-accent));
  font-size: var(--emp-counter-size, 48px);
  font-weight: 900;
  line-height: 1;
}

/* =========================================
   [personal_liste]
   ========================================= */

.emp-pers-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin: 18px 0;
}

.emp-pers-card{
  text-align: center;
  background: var(--emp-bg);
  border: 1px solid var(--emp-border);
  padding: 18px;
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.emp-pers-card:hover{
  border-color: var(--emp-accent);
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.emp-pers-img{
  width: 112px;
  height: 112px;
  border-radius: 999px;
  object-fit: cover;
  margin: 0 auto 12px auto;
  border: 3px solid #f0f0f0;
  display: block;
}

.emp-pers-img-placeholder{
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: #eee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  border: 3px solid #f0f0f0;
}

.emp-pers-img-placeholder .dashicons{
  font-size: 40px;
  width: 40px;
  height: 40px;
  color: #c7c7c7;
}

.emp-pers-name{
  font-weight: 900;
  font-size: 16px;
  margin: 0;
  color: var(--emp-dark);
}

.emp-pers-dg{
  color: var(--emp-accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 6px;
  display: block;
  letter-spacing: .04em;
}

/* =========================================
   [emp_statistik] (Frontend wrapper helpers)
   ========================================= */

.emp-frontend-stats .button{
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--emp-soft);
  color: #2271b1;
  border: 1px solid #2271b1;
}

.emp-frontend-stats select{
  padding: 4px 8px;
  border: 1px solid #cfd4d9;
  border-radius: 8px;
}

/* =========================================
   Chart-Block
   ========================================= */
.emp-chart-block{ margin: 26px 0; }
.emp-chart-canvas-wrap{ position: relative; width: 100%; }
