/* ===========================================================
   Tierarztpraxis Kay – admin.css
   Styles für Login-Seite und Inline-Bearbeitungsmodus.
   =========================================================== */

/* ---------- Login-Seite ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
}

.login-box__logo {
  height: 56px;
  margin: 0 auto 16px;
}

.login-box h1 {
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 8px;
}

.login-box__hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 20px;
}

.login-box__error {
  background: #fdeceb;
  color: #b3261e;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--body);
  font-weight: 600;
}

.login-box input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
}

.login-box input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.login-box__submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.login-box__back {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Bearbeitungsmodus ---------- */
.admin-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--blue-darker);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 20px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}

.admin-toolbar__logout {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}

body.admin-mode {
  padding-bottom: 48px;
}

.editable-text {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color 0.15s var(--ease), background-color 0.15s var(--ease);
  cursor: text;
}

.editable-text:hover {
  outline-color: var(--orange);
}

.editable-text:focus {
  outline: 2px solid var(--blue);
  background: var(--blue-tint);
}

.editable-text.save-ok {
  background: #e6f6ea;
  outline-color: #2f9e44;
}

.editable-text.save-error {
  background: #fdeceb;
  outline-color: #b3261e;
}

.editable-image {
  position: relative;
  display: inline-block;
  width: 100%;
}

.editable-image__btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: var(--blue-darker);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.editable-image__btn:hover {
  background: var(--blue);
}

.editable-image__btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- Listen: Hinzufügen / Löschen ---------- */

body.admin-mode .service,
body.admin-mode .team-card,
body.admin-mode .gallery__item,
body.admin-mode .faq__item,
body.admin-mode .checklist li {
  position: relative;
}

.list-item-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(179, 38, 30, 0.92);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.list-item-delete:hover {
  background: #b3261e;
}

/* Checklisten-Einträge: Löschen links neben dem Häkchen platzieren */
body.admin-mode .checklist li {
  padding-right: 2rem;
}
.checklist li .list-item-delete {
  top: 50%;
  transform: translateY(-50%);
  right: -0.2rem;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
}

/* Öffnungszeiten: Löschen in eigener Tabellenzelle */
.hours__delete-cell {
  width: 1%;
  padding-left: 0.6rem !important;
  text-align: right;
}
.hours__delete-cell .list-item-delete {
  position: static;
  transform: none;
}

.list-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  padding: 10px 20px;
  border: 2px dashed var(--blue);
  border-radius: 999px;
  background: transparent;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.list-add-btn:hover {
  background: var(--blue-tint);
}

.list-add-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
