/* Event Social Share – Frontend
   Optik angelehnt an .lightboxAnmeldung (Theme DIGITAL_WORLD). */

/* ---- Lightbox ------------------------------------------------------- */
.lightboxShare {
  position: fixed;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 48, 49, 0.95);
  z-index: 100000001;
  top: 0;
  left: 0;
  padding: 50px 0;
  display: none;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.lightbox__closeShare {
  position: absolute;
  right: 25px;
  top: 25px;
  cursor: pointer;
  z-index: 500;
}
.lightboxShare .lightbox__content {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 25px;
  width: 100%;
  height: 100%;
  overflow: auto;
}
.lightboxShare .lightbox__content > div {
  margin-top: auto;
  margin-bottom: auto;
  width: 1000px;
  max-width: 100%;
}

/* ---- Modul ---------------------------------------------------------- */
.dw-ess {
  color: #fff;
}

.dw-ess__editor,
.dw-ess__saved-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.dw-ess__editor[hidden],
.dw-ess__saved[hidden],
.dw-ess__zoom[hidden],
.dw-ess__status[hidden] {
  display: none !important;
}

.dw-ess__preview {
  position: relative;
}
.dw-ess__canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  touch-action: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.dw-ess--has-photo .dw-ess__canvas {
  cursor: grab;
}
.dw-ess__canvas--dragging {
  cursor: grabbing !important;
}
.dw-ess__status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 48, 49, 0.6);
  font-size: 1.1em;
}

.dw-ess__side h2 {
  font-weight: 300;
  margin: 0 0 0.3em;
}
.dw-ess__side .dw-ess__intro {
  margin: 0 0 20px;
  opacity: 0.9;
}

/* Schritte */
.dw-ess__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dw-ess__step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.dw-ess__step--active {
  opacity: 1;
}
.dw-ess__step-no {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ccd814;
  color: #003031;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dw-ess__step-body {
  flex: 1;
  min-width: 0;
}
.dw-ess__step-body strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.dw-ess__upload {
  display: inline-block;
}
.dw-ess__upload input[type="file"] {
  display: none;
}
.dw-ess__zoom {
  margin-top: 10px;
}
.dw-ess__zoom label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dw-ess__zoom input[type="range"] {
  flex: 1;
  accent-color: #ccd814;
}
.dw-ess__zoom input[type="range"]:disabled {
  opacity: 0.4;
}
.dw-ess__hint {
  font-size: 0.85em;
  opacity: 0.8;
  margin: 6px 0 0;
}
.dw-ess__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dw-ess .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Vorgeschlagener Beitragstext (nicht editierbar) – prominente Karte */
.dw-ess__text {
  margin-top: 28px;
  padding: 18px 20px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 5px solid #ccd814;
  border-radius: 4px;
}
.dw-ess__text-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dw-ess__text-icon {
  display: inline-flex;
  color: #ccd814;
  flex: 0 0 auto;
}
.dw-ess__text .dw-ess__label {
  border: 0;
  padding: 0;
  font-size: 1.05em;
  font-weight: 700;
}
.dw-ess__share-text {
  font-size: 1em;
  line-height: 1.5;
  margin: 0 0 14px;
  word-break: break-word;
}
.dw-ess .button.dw-ess__copy--done {
  background-color: #ccd814;
  color: #003031 !important;
}
.dw-ess__footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.dw-ess__footer .button {
  margin: 0;
}

/* Teaser nach der Anmeldung (Button-Modus) */
.dw-ess--teaser h2 {
  margin-top: 0;
}
.dw-ess--teaser .dw-ess__actions {
  margin-top: 16px;
}
.dw-ess__actions .button,
.dw-ess__saved-actions .button {
  margin: 0;
}
.dw-ess .button.dw-ess__linkedin {
  background-color: #0a66c2;
  color: #fff !important;
}
.dw-ess .button.dw-ess__linkedin:hover {
  background-color: #004182;
}
.dw-ess__howto {
  font-size: 0.85em;
  opacity: 0.85;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 12px;
}

.dw-ess__saved {
  margin-bottom: 20px;
}
.dw-ess__label {
  display: block;
  font-weight: 400;
  border-bottom: 1px solid #ccd814;
  padding-bottom: 4px;
}
.dw-ess__saved-img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.dw-ess__saved-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* ---- Bestätigungs-Lightbox (Gravity Forms) ------------------------- */
.dw-ess-confirmation {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #ccd814;
}

/* ---- Lade-/Fehlerzustand ------------------------------------------- */
.dw-ess-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}
.dw-ess-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ccd814;
  border-radius: 50%;
  animation: dw-ess-spin 0.8s linear infinite;
}
@keyframes dw-ess-spin {
  to { transform: rotate(360deg); }
}
.dw-ess-error {
  text-align: center;
}

/* ---- Buttons auf Event-Seite / Meine Events ------------------------- */
/* Button neben „Abmelden“: beide Buttons in einer umbrechenden Zeile – bei
   Platzmangel rutscht der Teilen-Button automatisch unter den Abmelde-Button. */
.dw-ess-btn-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch; /* beide Buttons gleich hoch */
  gap: 8px;
  max-width: 100%;
  vertical-align: middle;
}
.dw-ess-btn-row > * {
  flex: 0 0 auto;
}
/* „Abmelden“ wächst auf die Höhe des Share-Buttons mit, Text bleibt mittig */
.dw-ess-btn-row > .button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.dw-ess-share-btn {
  display: inline-block;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  margin-left: 6px;
  line-height: 1.1;
}
.dw-ess-btn-row .dw-ess-share-btn.button-small {
  padding-top: 6px;
  padding-bottom: 6px;
}
/* Zweizeilige Beschriftung: „Meet me @“ groß, „Social Media Sharing“ kleiner darunter */
.dw-ess-share-btn__main,
.dw-ess-share-btn__sub {
  display: block;
}
.dw-ess-share-btn__sub {
  font-size: 0.68em;
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-top: 2px;
  opacity: 0.9;
}
.dw-ess-btn-row .button,
.dw-ess-btn-row .dw-ess-share-btn,
.dw-ess .dw-ess-share-btn {
  margin: 0;
}
.dw-ess-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}
.dw-ess-fab .dw-ess-share-btn {
  margin: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 800px) {
  .lightboxShare {
    padding: 0;
  }
  .lightboxShare .lightbox__content {
    padding: 70px 15px 30px;
    align-items: flex-start;
  }
  .dw-ess__editor,
  .dw-ess__saved-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dw-ess__canvas {
    max-height: 60vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
  }
}
