/* PorscheCodes — in-browser text editor */

.edit-toolbar {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .65rem .5rem 1rem;
  background: rgba(8,8,9,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  font-family: var(--sans, -apple-system, sans-serif);
  font-size: .8rem;
  color: #fff;
  max-width: calc(100vw - 3rem);
}

.edit-toolbar .et-label {
  font-size: .65rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}
.edit-toolbar .et-label .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #444;
  transition: background .2s;
}
.edit-toolbar.is-editing .et-label .dot {
  background: #cc2222;
  animation: et-pulse 1.4s ease-in-out infinite;
}
@keyframes et-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(204,34,34,0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(204,34,34,0); }
}

.edit-toolbar button {
  background: rgba(255,255,255,0.07);
  border: 0;
  padding: .45rem .9rem;
  color: #fff;
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: background .15s, transform .15s;
  white-space: nowrap;
}
.edit-toolbar button:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.edit-toolbar button[data-edit-save] {
  background: #cc2222;
  color: #fff;
}
.edit-toolbar button[data-edit-save]:hover { background: #df3535; }
.edit-toolbar button[data-edit-cancel] {
  background: transparent;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.18);
}

.edit-toolbar .et-status {
  font-size: .68rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,0.65);
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: .8rem;
  max-width: 320px;
  max-height: 3.5em;
  overflow: hidden;
  line-height: 1.35;
}
.edit-toolbar .et-status.ok  { color: #8ef0a3; }
.edit-toolbar .et-status.err { color: #ffa3a3; }

@media (max-width: 720px) {
  .edit-toolbar {
    bottom: auto;
    top: 70px;
    left: .75rem;
    right: .75rem;
    max-width: none;
    flex-wrap: wrap;
    border-radius: 12px;
    padding: .65rem .8rem;
  }
  .edit-toolbar .et-status { border-left: 0; padding-left: 0; max-width: 100%; }
}

/* Editable element highlight */
body.editing .et-editable {
  outline: 1px dashed rgba(204,34,34,0.5);
  outline-offset: 5px;
  cursor: text;
  border-radius: 2px;
  transition: outline-color .12s, background .12s;
}
body.editing .et-editable:hover {
  outline-color: rgba(204,34,34,0.9);
  outline-style: solid;
}
body.editing .et-editable:focus {
  outline: 2px solid #cc2222;
  outline-offset: 5px;
  background: rgba(204,34,34,0.06);
}
body.editing .et-editable::selection {
  background: rgba(204,34,34,0.3);
  color: #fff;
}
