/**
 * UNITY Foundation Conversion Funnel Styles
 * Olive Green (#6B8E23) + Cream/Ivory + Gold theme
 * Mobile-first, WCAG AA+ compliant
 */

/* ========================================
   STICKY CTA BANNER
   ======================================== */

.unity-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(135deg, #6B8E23 0%, #556B1E 100%);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: transform 0.3s ease;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.unity-sticky-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.unity-sticky-cta-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #FFFEF7;
  line-height: 1.4;
}

.unity-sticky-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: #D4AF37;
  color: #1A1A1A;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.unity-sticky-cta-button:hover {
  background: #E5C158;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.unity-sticky-cta-button:active {
  transform: translateY(0);
}

.unity-sticky-cta-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #FFFEF7;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
  padding: 0;
}

.unity-sticky-cta-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Desktop adjustments */
@media (min-width: 768px) {
  .unity-sticky-cta-content {
    padding: 16px 32px;
  }

  .unity-sticky-cta-text {
    font-size: 16px;
  }

  .unity-sticky-cta-button {
    font-size: 15px;
    padding: 12px 24px;
  }
}

/* ========================================
   FLOATING SUPPORT BUTTON
   ======================================== */

.unity-floating-support {
  position: fixed;
  bottom: 80px; /* Above sticky banner */
  right: 20px;
  z-index: 998;
}

.unity-floating-support-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: #6B8E23;
  color: #FFFEF7;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3);
  transition: all 0.3s ease;
}

.unity-floating-support-btn:hover {
  background: #556B1E;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 142, 35, 0.4);
}

.unity-floating-support-btn svg {
  width: 20px;
  height: 20px;
}

.unity-floating-support-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 320px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s ease;
}

.unity-floating-support-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.unity-floating-support-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #E5E5E5;
}

.unity-floating-support-menu-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0;
}

.unity-floating-support-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
  line-height: 1;
}

.unity-floating-support-close:hover {
  background: #F5F5F5;
}

.unity-floating-support-menu-items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.unity-support-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #F9F9F9;
  border: 2px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.unity-support-option:hover {
  background: #F0F0F0;
  border-color: #6B8E23;
  transform: translateX(2px);
}

.unity-support-featured {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFFEF7 100%);
  border-color: #D4AF37;
}

.unity-support-featured:hover {
  border-color: #B8941F;
}

.unity-support-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.unity-support-info {
  flex: 1;
}

.unity-support-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 2px;
}

.unity-support-desc {
  font-size: 13px;
  color: #666;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .unity-floating-support-menu {
    width: calc(100vw - 40px);
    right: -10px;
  }
}

/* Desktop - show as sidebar */
@media (min-width: 1024px) {
  .unity-floating-support {
    bottom: 50%;
    transform: translateY(50%);
  }
}

/* ========================================
   REFERRAL SHARE SECTION
   ======================================== */

.unity-referral-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #F5F8F0 0%, #FFFEF7 100%);
  border-top: 3px solid #6B8E23;
}

.unity-referral-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.unity-referral-title {
  font-size: 32px;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 12px;
}

.unity-referral-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 32px;
  line-height: 1.6;
}

.unity-referral-link-box {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  background: #FFFFFF;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.unity-referral-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
  color: #1A1A1A;
  background: #F9F9F9;
  border: 2px solid #E5E5E5;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
}

.unity-referral-input:focus {
  outline: none;
  border-color: #6B8E23;
  background: #FFFFFF;
}

.unity-referral-copy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #6B8E23;
  color: #FFFEF7;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.unity-referral-copy-btn:hover {
  background: #556B1E;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 142, 35, 0.3);
}

.unity-referral-copy-btn svg {
  width: 20px;
  height: 20px;
}

.unity-referral-social {
  margin-top: 32px;
}

.unity-referral-social-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.unity-referral-social-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.unity-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.unity-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unity-social-facebook {
  background: #1877F2;
  color: #FFFFFF;
}

.unity-social-twitter {
  background: #000000;
  color: #FFFFFF;
}

.unity-social-email {
  background: #6B8E23;
  color: #FFFEF7;
}

/* Mobile stacking */
@media (max-width: 640px) {
  .unity-referral-title {
    font-size: 24px;
  }

  .unity-referral-subtitle {
    font-size: 16px;
  }

  .unity-referral-link-box {
    flex-direction: column;
  }

  .unity-referral-copy-btn {
    justify-content: center;
  }
}

/* ========================================
   UPSELL MODAL
   ======================================== */

.unity-upsell-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.unity-upsell-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.unity-upsell-content {
  position: relative;
  max-width: 520px;
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.unity-upsell-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
  line-height: 1;
}

.unity-upsell-close:hover {
  background: #F0F0F0;
}

.unity-upsell-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.unity-upsell-title {
  font-size: 24px;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 16px;
  line-height: 1.3;
}

.unity-upsell-text {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 32px;
}

.unity-upsell-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.unity-upsell-btn {
  display: inline-block;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  text-align: center;
}

.unity-upsell-btn-primary {
  background: #6B8E23;
  color: #FFFEF7;
  box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3);
}

.unity-upsell-btn-primary:hover {
  background: #556B1E;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 142, 35, 0.4);
}

.unity-upsell-btn-secondary {
  background: #F5F5F5;
  color: #1A1A1A;
  border: 2px solid #E5E5E5;
}

.unity-upsell-btn-secondary:hover {
  background: #E5E5E5;
  border-color: #D0D0D0;
}

.unity-upsell-footer {
  font-size: 14px;
  color: #999;
}

.unity-upsell-dismiss {
  color: #6B8E23;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.unity-upsell-dismiss:hover {
  color: #556B1E;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .unity-upsell-content {
    padding: 32px 24px;
  }

  .unity-upsell-title {
    font-size: 20px;
  }

  .unity-upsell-text {
    font-size: 15px;
  }

  .unity-upsell-btn {
    font-size: 15px;
    padding: 14px 20px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus states for keyboard navigation */
.unity-sticky-cta-button:focus,
.unity-referral-copy-btn:focus,
.unity-social-btn:focus,
.unity-upsell-btn:focus,
.unity-floating-support-btn:focus,
.unity-support-option:focus {
  outline: 3px solid #D4AF37;
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .unity-sticky-cta,
  .unity-floating-support-btn,
  .unity-floating-support-menu,
  .unity-upsell-modal,
  .unity-upsell-content {
    animation: none;
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .unity-sticky-cta,
  .unity-floating-support-btn,
  .unity-upsell-btn-primary {
    border: 2px solid currentColor;
  }
}

/* Print styles - hide conversion elements */
@media print {
  .unity-sticky-cta,
  .unity-floating-support,
  .unity-upsell-modal {
    display: none !important;
  }
}
