/* ==========================================================================
   WebRank Floating WhatsApp & Push Opt-In Banner Styles
   ========================================================================== */

:root {
  --wr-primary: #0066fe;
  --wr-primary-hover: #0052cc;
  --wr-wa-green: #25D366;
  --wr-wa-hover: #1EBE5D;
  --wr-wa-dark: #075E54;
  --wr-bg: #ffffff;
  --wr-text: #1e293b;
  --wr-muted: #64748b;
  --wr-border: #e2e8f0;
  --wr-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --wr-radius: 16px;
}

#webrank-banner-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  animation: wrSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#webrank-banner-container * {
  box-sizing: border-box;
}

@keyframes wrSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.webrank-card {
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--wr-bg);
  border-radius: var(--wr-radius);
  border: 1px solid var(--wr-border);
  box-shadow: var(--wr-shadow);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.webrank-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--wr-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.webrank-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.webrank-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.webrank-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

.webrank-title-area h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--wr-text);
  line-height: 1.25;
}

.webrank-title-area p {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: var(--wr-muted);
}

.webrank-body-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 16px 0;
}

.webrank-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.webrank-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.webrank-btn-whatsapp {
  background-color: var(--wr-wa-green);
  color: #ffffff;
}

.webrank-btn-whatsapp:hover {
  background-color: var(--wr-wa-hover);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.webrank-btn-push {
  background-color: #f1f5f9;
  color: var(--wr-text);
  border: 1px solid var(--wr-border);
}

.webrank-btn-push:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.webrank-btn-push.subscribed {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  cursor: default;
}

.webrank-subscribed-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.webrank-status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.webrank-btn-unsub {
  background: transparent;
  color: #64748b;
  border: none;
  font-size: 12px;
  padding: 4px;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
  text-align: center;
}

.webrank-btn-unsub:hover {
  color: #ef4444;
}

/* ==========================================================================
   WebRank Inline Opt-In Widgets (Standard Button & Switch Button)
   Matches Webpushr Opt-In Widget styling with 18k Social Proof
   ========================================================================== */

.webrank-inline-optin {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 14px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
}

.webrank-inline-button-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.webrank-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #0066fe;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 102, 254, 0.25);
}

.webrank-inline-btn:hover {
  background-color: #0052cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 102, 254, 0.35);
}

.webrank-inline-btn.is-active {
  background-color: #10b981;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.webrank-inline-btn.is-active:hover {
  background-color: #059669;
}

.webrank-sub-count {
  font-size: 12px;
  color: #64748b;
  margin-left: 2px;
}

/* Switch Toggle Button Style */
.webrank-switch-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 16px;
}

.webrank-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.webrank-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.webrank-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.webrank-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.webrank-switch input:checked + .webrank-slider {
  background-color: #0066fe;
}

.webrank-switch input:checked + .webrank-slider:before {
  transform: translateX(20px);
}

.webrank-switch-label {
  display: flex;
  flex-direction: column;
}

.webrank-switch-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.webrank-switch-sub {
  font-size: 11.5px;
  color: #64748b;
}


.webrank-footer-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--wr-muted);
}

.webrank-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  margin-right: 4px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  #webrank-banner-container {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    animation: wrSlideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .webrank-card {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 16px;
  }

  @keyframes wrSlideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

