/* ==========================================================
   JOBA Einfach aktuell – Verwaltungsoberfläche
   Farben über CSS-Variablen anpassbar (z. B. im Child-Theme):
   .jea-app{--jea-accent:#ee7a1c;--jea-ink:#14233d}
   ========================================================== */

.jea-app {
  --jea-accent: #ee7a1c;
  --jea-accent-ink: #14233d;
  --jea-ink: #14233d;
  --jea-muted: #5b6678;
  --jea-line: #dde2ea;
  --jea-bg: #f4f7fb;
  --jea-ok: #1d7a54;
  --jea-error: #b3261e;
  --jea-radius: 14px;
  max-width: 880px;
  margin: 0 auto;
  color: var(--jea-ink);
  font-size: 17px;
  line-height: 1.55;
  box-sizing: border-box;
}
.jea-app *, .jea-app *::before, .jea-app *::after { box-sizing: border-box; }
.jea-app [hidden] { display: none !important; }

.jea-h { margin: 0 0 .35rem; padding: 0; font-size: 1.6rem; line-height: 1.2; color: var(--jea-ink); }
.jea-muted { color: var(--jea-muted); margin: 0; padding: 0; }
.jea-small { font-size: 14px; color: var(--jea-muted); margin: .5rem 0 0; padding: 0; }
.jea-back { display: inline-block; margin-bottom: .5rem; font-size: 15px; color: var(--jea-muted); text-decoration: none; }
.jea-back:hover { color: var(--jea-ink); }

.jea-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.25rem; }

.jea-card { background: #fff; border: 1px solid var(--jea-line); border-radius: var(--jea-radius); padding: 1.4rem; margin-bottom: 1rem; }
.jea-login { max-width: 480px; margin: 1rem auto; }
.jea-empty { text-align: center; padding: 2.5rem 1.4rem; }

/* Felder */
.jea-label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 .4rem; }
.jea-label-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.2rem; }
.jea-label-row .jea-label { margin: 0; }
.jea-input {
  width: 100%; min-height: 48px; padding: .7rem .9rem; font: inherit; color: var(--jea-ink);
  background: var(--jea-bg); border: 2px solid var(--jea-line); border-radius: 10px; transition: border-color .2s, background-color .2s;
}
.jea-input:focus { outline: none; border-color: var(--jea-accent); background: #fff; }
.jea-input--title { font-size: 1.2rem; font-weight: 700; }
.jea-check { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.jea-check input { width: 22px; height: 22px; accent-color: var(--jea-accent); }
.jea-expires { margin: .25rem 0 .75rem; }
.jea-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.jea-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.jea-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 48px;
  padding: .7rem 1.25rem; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none !important;
  border-radius: 10px; border: 2px solid var(--jea-ink); background: #fff; color: var(--jea-ink) !important;
  cursor: pointer; transition: transform .2s, filter .2s, background-color .2s;
}
.jea-btn:hover { transform: translateY(-1px); }
.jea-btn:focus-visible, .jea-toolbar button:focus-visible, .jea-img__tools button:focus-visible { outline: 3px solid var(--jea-accent); outline-offset: 2px; }
.jea-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.jea-btn--primary { background: var(--jea-accent); border-color: var(--jea-accent); color: var(--jea-accent-ink) !important; }
.jea-btn--primary:hover { filter: brightness(1.05); }
.jea-btn--ghost { background: transparent; }
.jea-btn--danger { border-color: #e7b4b0; color: var(--jea-error) !important; }
.jea-btn--small { min-height: 40px; padding: .45rem .85rem; font-size: 15px; }
.jea-btn--block { width: 100%; margin-top: 1rem; }

/* Hinweise */
.jea-notice { background: #fff8ef; border: 2px solid var(--jea-accent); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.jea-notice--ok { background: #eaf6f0; border-color: var(--jea-ok); }
.jea-notice--error { background: #fdeeed; border-color: var(--jea-error); }
.jea-login-msg, .jea-save-msg, .jea-upload__status { font-size: 15px; font-weight: 600; }
.is-ok { color: var(--jea-ok); }
.is-error { color: var(--jea-error); }
.is-busy { color: var(--jea-muted); }
.jea-login-msg { margin-top: .9rem; }

/* Liste */
.jea-list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: .75rem; }
.jea-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center;
  background: #fff; border: 1px solid var(--jea-line); border-radius: var(--jea-radius); padding: .8rem; transition: opacity .25s;
  list-style: none !important;
}
.jea-item__img { width: 72px; height: 72px; border-radius: 10px; background: var(--jea-bg); overflow: hidden; }
.jea-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jea-item__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.jea-item__title { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.jea-item__meta { font-size: 14px; color: var(--jea-muted); }
.jea-item__badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.jea-item__actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.jea-badge { font-size: 12px; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--jea-bg); color: var(--jea-muted); }
.jea-badge--online { background: #eaf6f0; color: var(--jea-ok); }
.jea-badge--planned { background: #e8f0fb; color: #1f4f8f; }
.jea-badge--expired { background: #fdeeed; color: var(--jea-error); }
.jea-badge--sticky { background: #fff1e3; color: #9a4a08; }
.jea-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }

/* Editor */
.jea-toolbar { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 .5rem; }
.jea-toolbar button {
  min-height: 40px; min-width: 44px; padding: .35rem .75rem; font: inherit; font-size: 15px; color: var(--jea-ink);
  background: var(--jea-bg); border: 1px solid var(--jea-line); border-radius: 8px; cursor: pointer;
}
.jea-toolbar button:hover { border-color: var(--jea-ink); }
.jea-editor {
  min-height: 240px; padding: .9rem 1rem; background: var(--jea-bg); border: 2px solid var(--jea-line); border-radius: 10px;
  outline: none; overflow-wrap: anywhere; transition: border-color .2s, background-color .2s;
}
.jea-editor:focus { border-color: var(--jea-accent); background: #fff; }
.jea-editor:empty::before { content: attr(data-placeholder); color: #8a94a6; }
.jea-editor p, .jea-editor ul, .jea-editor ol { margin: 0 0 .8em; padding-bottom: 0; }
.jea-editor ul, .jea-editor ol { padding-left: 1.4em; }
.jea-editor h3 { font-size: 1.2rem; margin: .6em 0 .4em; padding: 0; }
.jea-editor a { color: #a04e0a; text-decoration: underline; }
.jea-mic.is-on { background: #b3261e; border-color: #b3261e; color: #fff !important; animation: jea-pulse 1.6s ease-in-out infinite; }
@keyframes jea-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); } 50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); } }
kbd { font-family: inherit; font-size: 13px; padding: .05rem .35rem; border: 1px solid var(--jea-line); border-radius: 4px; background: #fff; }

/* Fotos */
.jea-images { list-style: none !important; margin: .9rem 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.jea-images:empty { display: none; }
.jea-img { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--jea-bg); border: 2px solid transparent; list-style: none !important; }
.jea-img.is-first { border-color: var(--jea-accent); }
.jea-img.is-first::after { content: "Titelbild"; position: absolute; left: 6px; top: 6px; font-size: 12px; font-weight: 700; background: var(--jea-accent); color: var(--jea-accent-ink); padding: .1rem .45rem; border-radius: 6px; }
.jea-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jea-img__tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.jea-img__tools button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-size: 15px; line-height: 1;
  background: rgba(20, 35, 61, .82); color: #fff;
}
.jea-img.is-first .jea-img__first { display: none; }
.jea-img__spinner { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border: 4px solid var(--jea-line); border-top-color: var(--jea-accent); border-radius: 50%; animation: jea-spin .8s linear infinite; }
@keyframes jea-spin { to { transform: rotate(360deg); } }
.jea-upload { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Speichern */
.jea-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--jea-line); border-radius: var(--jea-radius); padding: .8rem;
  box-shadow: 0 -6px 20px rgba(20, 35, 61, .08);
}

/* Handy */
@media (max-width: 640px) {
  .jea-app { font-size: 16px; }
  .jea-card { padding: 1rem; }
  .jea-item { grid-template-columns: 56px 1fr; }
  .jea-item__img { width: 56px; height: 56px; }
  .jea-item__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .jea-top .jea-btn--primary { width: 100%; }
  .jea-actions { padding: .6rem; gap: .5rem; }
  .jea-actions .jea-btn { flex: 1 1 0; min-width: 0; padding: .6rem .5rem; font-size: 15px; }
  .jea-save-msg { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .jea-app *, .jea-app *::before { animation: none !important; transition: none !important; }
}

/* ---------- 1.1.0: weitere Editor-Formate ---------- */
.jea-editor blockquote {
  margin: .4em 0 .9em; padding: .7em 1em; border-left: 4px solid var(--jea-accent);
  background: rgba(20, 35, 61, .05); border-radius: 0 8px 8px 0; color: var(--jea-ink); font-style: normal; quotes: none;
}
.jea-editor blockquote::before, .jea-editor blockquote::after { content: none; }
.jea-editor blockquote p:last-child { margin-bottom: 0; }
.jea-editor hr { border: 0; border-top: 2px solid var(--jea-line); margin: 1.2em 0; height: 0; }
.jea-editor a[href^="tel:"] { white-space: nowrap; }

/* ---------- 1.1.0: Erklärungen (Tooltips) ---------- */
.jea-tip { position: relative; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.jea-tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 30;
  transform: translate(-50%, 4px); width: max-content; max-width: 230px; padding: .45rem .65rem;
  background: var(--jea-ink); color: #fff; font-size: 13px; font-weight: 400; line-height: 1.35; text-align: center;
  white-space: normal; border-radius: 7px; box-shadow: 0 6px 18px rgba(20, 35, 61, .22);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s, visibility .15s;
}
.jea-toolbar .jea-tip:first-child::after { left: 0; transform: translate(0, 4px); }
.jea-toolbar .jea-tip:last-child::after { left: auto; right: 0; transform: translate(0, 4px); }
.jea-label-row .jea-tip::after { left: auto; right: 0; transform: translate(0, 4px); }
@media (hover: hover) {
  .jea-tip:hover::after { opacity: 1; visibility: visible; transition-delay: .35s; }
  .jea-tip:hover::after, .jea-tip:focus-visible::after { transform: translate(-50%, 0); }
  .jea-toolbar .jea-tip:first-child:hover::after, .jea-toolbar .jea-tip:last-child:hover::after,
  .jea-label-row .jea-tip:hover::after { transform: translate(0, 0); }
}
.jea-tip:focus-visible::after, .jea-tip.is-tip::after { opacity: 1; visibility: visible; }
.jea-tip.is-tip::after { transform: translate(-50%, 0); }
.jea-toolbar .jea-tip:first-child.is-tip::after, .jea-toolbar .jea-tip:last-child.is-tip::after,
.jea-label-row .jea-tip.is-tip::after { transform: translate(0, 0); }
/* Mehrere Box-Zeilen hintereinander wirken wie eine Box */
.jea-editor blockquote + blockquote { margin-top: -.9em; padding-top: 0; border-radius: 0 0 8px 0; }
.jea-editor blockquote:has(+ blockquote) { border-bottom-right-radius: 0; }

/* 1.1.1: Normale Schriftstärke im Editor fest auf 400.
   Manche Themes (z. B. Divi) setzen 500 – Firefox hält das für „schon fett“
   und schaltet Fett dann aus statt ein. */
.jea-editor, .jea-editor p, .jea-editor li, .jea-editor blockquote { font-weight: 400 !important; }
.jea-editor b, .jea-editor strong { font-weight: 700 !important; }
.jea-editor h3 { font-weight: 700 !important; }

/* 1.2.0: Fortschritt beim Foto-Upload */
.jea-img__progress { position: absolute; left: 8px; right: 8px; bottom: 10px; text-align: center; }
.jea-img__label { display: block; font-size: 13px; font-weight: 700; color: var(--jea-ink); margin-bottom: 4px; }
.jea-img__bar { height: 8px; border-radius: 99px; background: var(--jea-line); overflow: hidden; }
.jea-img__bar span { display: block; height: 100%; width: 0; background: var(--jea-accent); border-radius: 99px; transition: width .2s; }
.jea-img.is-loading .jea-img__spinner { top: -24px; }
