/* DW Subscription Wall — wall.css */

/* ─── Overlay / Blur ───────────────────────────────────────────────────────── */
#dw-sw-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: dw-sw-fade-in 0.4s ease forwards;
}

#dw-sw-overlay.dw-sw-active {
  display: block;
}

@keyframes dw-sw-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Wall Panel ───────────────────────────────────────────────────────────── */
#dw-sw-wall {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 -6px 44px rgba(0, 0, 0, 0.20);
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 18px 18px 0 0;
  padding: 40px 40px calc(38px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: dw-sw-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#dw-sw-wall.dw-sw-active {
  display: block;
}

@keyframes dw-sw-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ─── Inner Container ──────────────────────────────────────────────────────── */
.dw-sw-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

#dw-sw-form-wrap {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Wordmark ─────────────────────────────────────────────────────────────── */
.dw-sw-wordmark {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 28px;
  opacity: 0.55;
  font-family: Georgia, 'Times New Roman', serif;
}

/* ─── Divider ──────────────────────────────────────────────────────────────── */
.dw-sw-divider {
  width: 40px;
  height: 2px;
  background: #1a1a1a;
  margin: 0 auto 28px;
  opacity: 0.15;
}

/* ─── Headline ─────────────────────────────────────────────────────────────── */
.dw-sw-headline {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin: 0 0 14px;
  letter-spacing: -0.3px;
}

/* ─── Body / Social proof ─────────────────────────────────────────────────── */
.dw-sw-social-proof-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto 14px;
}

.dw-sw-proof-avatars {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.dw-sw-proof-avatars-image {
  display: block;
  width: 116px;
  height: auto;
}

.dw-sw-social-proof-text {
  margin: 0;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.dw-sw-body {
  max-width: 620px;
  margin: 0 auto 26px;
  color: #555;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.dw-sw-body-no-proof {
  margin-top: 0;
}

/* ─── Form ─────────────────────────────────────────────────────────────────── */
.dw-sw-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.dw-sw-email-wrap {
  display: flex;
  width: 100%;
  max-width: 500px;
  border: 1.5px solid #d4d4d4;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  background: #fff;
}

.dw-sw-email-wrap:focus-within {
  border-color: #111;
}

.dw-sw-email-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 15px 17px;
  font-size: 16px;
  color: #111;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-width: 0;
}

.dw-sw-email-input::placeholder {
  color: #aaa;
}

.dw-sw-submit-btn {
  border: none;
  outline: none;
  cursor: pointer;
  background: #111;
  color: #fff;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.dw-sw-submit-btn:hover {
  background: #333;
}

.dw-sw-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Community access ───────────────────────────────────────────────────── */
#dw-sw-wall.dw-sw-community-notice {
  width: calc(100% - 48px);
  max-width: 760px;
  left: 0;
  right: 0;
  bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  padding: 28px 28px calc(28px + env(safe-area-inset-bottom));
  max-height: none;
  overflow: visible;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 38px rgba(0, 0, 0, 0.16);
}

#dw-sw-wall.dw-sw-community-notice .dw-sw-branding-area,
#dw-sw-wall.dw-sw-community-notice .dw-sw-divider {
  display: none;
}

#dw-sw-wall.dw-sw-community-closing {
  animation: dw-sw-community-out 0.32s ease forwards;
}

@keyframes dw-sw-community-out {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(36px); opacity: 0; }
}

#dw-sw-community-wrap {
  position: relative;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 48px;
}

.dw-sw-community-kicker {
  margin: 0 0 12px;
  color: #777;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dw-sw-community-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8e8e8;
  border-radius: 999px;
  background: #f7f7f7;
  color: #666;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.dw-sw-community-close:hover {
  background: #f4f4f4;
  color: #111;
}

.dw-sw-community-close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

#dw-sw-community-wrap .dw-sw-body {
  margin-bottom: 0;
}

#dw-sw-community-body .dw-sw-community-paragraph {
  margin: 0 0 12px;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-line;
}

#dw-sw-community-body .dw-sw-community-paragraph:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  #dw-sw-wall.dw-sw-community-closing {
    animation: none;
  }
}

/* ─── Helper / Status ──────────────────────────────────────────────────────── */
.dw-sw-helper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: #929292;
  letter-spacing: 0.01em;
}

.dw-sw-message {
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 6px;
  display: none;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.dw-sw-message.success {
  background: #f0faf4;
  color: #1a7a3c;
  border: 1px solid #b7e6ca;
  display: block;
}

.dw-sw-message.error {
  background: #fff5f5;
  color: #c0392b;
  border: 1px solid #f5c6c6;
  display: block;
}

/* ─── Subscriber Label ─────────────────────────────────────────────────────── */
.dw-sw-label {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
  background: #f4f1eb;
  padding: 5px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

/* ─── Body lock ────────────────────────────────────────────────────────────── */
body.dw-sw-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* ─── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #dw-sw-wall {
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 30px 20px calc(28px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .dw-sw-inner {
    max-width: none;
  }

  .dw-sw-wordmark {
    margin-bottom: 20px;
  }

  .dw-sw-divider {
    margin-bottom: 22px;
  }

  .dw-sw-headline {
    font-size: 26px;
    margin-bottom: 14px;
  }

  .dw-sw-social-proof-row {
    gap: 9px;
    margin-bottom: 12px;
  }

  .dw-sw-proof-avatars-image {
    width: 98px;
  }

  .dw-sw-social-proof-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .dw-sw-body {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
  }

  .dw-sw-email-wrap {
    flex-direction: column;
    border-radius: 6px;
  }

  .dw-sw-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
  }

  .dw-sw-email-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
  }

  .dw-sw-helper {
    line-height: 1.45;
  }

  #dw-sw-wall.dw-sw-community-notice {
    width: calc(100% - 24px);
    bottom: 12px;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  #dw-sw-community-wrap {
    padding-left: 38px;
    padding-right: 38px;
  }

  .dw-sw-community-close {
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    font-size: 21px;
  }
}
