/**
 * BWF Triggers Frontend — Popup, Slide-In, Bar styles
 */

/* ━━━ OVERLAY (popup) ━━━ */
.bwf-trigger-overlay {
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.bwf-trigger-overlay.bwf-trigger--visible { opacity: 1; pointer-events: all; }
.bwf-trigger-overlay.bwf-trigger--hiding { opacity: 0; }

.bwf-trigger-popup {
  background: #fff; border-radius: 16px; padding: 32px;
  max-width: 500px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.9) translateY(20px); transition: transform 0.3s ease;
}
.bwf-trigger--visible .bwf-trigger-popup { transform: scale(1) translateY(0); }
.bwf-trigger--hiding .bwf-trigger-popup { transform: scale(0.9) translateY(20px); }

/* ━━━ SLIDE-IN ━━━ */
.bwf-trigger-slidein {
  position: fixed; z-index: 999998;
  background: #fff; border-radius: 16px; padding: 24px;
  max-width: 380px; width: calc(100% - 40px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  opacity: 0;
}
.bwf-slidein--bottom-right { bottom: 20px; right: 20px; transform: translateY(120%); }
.bwf-slidein--bottom-left { bottom: 20px; left: 20px; transform: translateY(120%); }
.bwf-slidein--top-right { top: 20px; right: 20px; transform: translateY(-120%); }
.bwf-slidein--top-left { top: 20px; left: 20px; transform: translateY(-120%); }

.bwf-trigger-slidein.bwf-trigger--visible { transform: translateY(0); opacity: 1; }
.bwf-trigger-slidein.bwf-trigger--hiding { transform: translateY(120%); opacity: 0; }
.bwf-slidein--top-right.bwf-trigger--hiding,
.bwf-slidein--top-left.bwf-trigger--hiding { transform: translateY(-120%); }

/* ━━━ BAR ━━━ */
.bwf-trigger-bar {
  position: fixed; left: 0; right: 0; z-index: 999997;
  background: linear-gradient(135deg, #8e44ad, #3498db);
  color: #fff; padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-100%); transition: transform 0.4s ease;
}
.bwf-bar--top { top: 0; transform: translateY(-100%); }
.bwf-bar--bottom { bottom: 0; top: auto; transform: translateY(100%); }

.bwf-trigger-bar.bwf-trigger--visible { transform: translateY(0); }
.bwf-trigger-bar.bwf-trigger--hiding { transform: translateY(-100%); }
.bwf-bar--bottom.bwf-trigger--hiding { transform: translateY(100%); }

.bwf-bar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 60px 14px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 15px; font-weight: 500;
  text-align: center;
}
.bwf-bar-inner a { color: #fff; text-decoration: underline; font-weight: 700; }

/* ━━━ CLOSE BUTTON ━━━ */
.bwf-trigger-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: none; background: rgba(0,0,0,0.06);
  border-radius: 50%; cursor: pointer;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280; transition: all 0.2s ease;
}
.bwf-trigger-close:hover { background: rgba(0,0,0,0.1); color: #1a1a2e; }

.bwf-trigger-bar-close {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  width: 28px; height: 28px;
  border: none; background: rgba(255,255,255,0.2);
  border-radius: 50%; cursor: pointer;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: all 0.2s ease;
}
.bwf-trigger-bar-close:hover { background: rgba(255,255,255,0.3); }

/* ━━━ CONTENT STYLING ━━━ */
.bwf-trigger-popup h2, .bwf-trigger-slidein h2 {
  font-size: 22px; font-weight: 700; margin: 0 0 8px; color: #1a1a2e;
}
.bwf-trigger-popup h3, .bwf-trigger-slidein h3 {
  font-size: 18px; font-weight: 700; margin: 0 0 8px; color: #1a1a2e;
}
.bwf-trigger-popup p, .bwf-trigger-slidein p {
  font-size: 15px; color: #6b7280; margin: 0 0 16px; line-height: 1.6;
}
.bwf-trigger-popup a.bwf-trigger-cta,
.bwf-trigger-slidein a.bwf-trigger-cta {
  display: inline-block;
  background: linear-gradient(135deg, #8e44ad, #3498db);
  color: #fff; padding: 12px 28px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: all 0.2s ease;
}
.bwf-trigger-popup a.bwf-trigger-cta:hover,
.bwf-trigger-slidein a.bwf-trigger-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(142,68,173,0.3);
}

/* ━━━ RESPONSIVE ━━━ */
@media (max-width: 480px) {
  .bwf-trigger-popup { padding: 24px; }
  .bwf-trigger-slidein { max-width: calc(100% - 20px); right: 10px; left: 10px; bottom: 10px; }
  .bwf-bar-inner { padding: 12px 50px 12px 16px; font-size: 13px; }
}

/* ━━━ DARK MODE ━━━ */
@media (prefers-color-scheme: dark) {
  .bwf-trigger-popup, .bwf-trigger-slidein {
    background: #1a1a2e; color: #e4e4f0;
  }
  .bwf-trigger-popup h2, .bwf-trigger-popup h3,
  .bwf-trigger-slidein h2, .bwf-trigger-slidein h3 { color: #fff; }
  .bwf-trigger-popup p, .bwf-trigger-slidein p { color: rgba(255,255,255,0.6); }
  .bwf-trigger-close { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
  .bwf-trigger-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
}
