/* ============================================
   FOOTER CTA ENHANCEMENT - Homepage Aesthetic
   Matching homepage color palette and design
   ============================================ */

/* BASE FOOTER ENHANCEMENTS */
.site-footer-new {
  position: relative;
  overflow: visible;
}

/* Zero padding on footer content */
.footer-content-wrapper {
  padding: 0 !important;
}

/* ============================================
   CTA SECTION - HOMEPAGE AESTHETIC
   ============================================ */

.footer-cta-section {
  position: relative;
  padding: 2rem;
  margin: 2rem 0 3rem;
  border-radius: 16px;
  overflow: visible;
  background: transparent;
  border-top: none;
}

/* Light mode - Subtle border styling */
.site-footer-new.light-mode .footer-cta-section {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

/* Dark mode - Subtle border styling */
.site-footer-new[data-theme="charcoal"] .footer-cta-section {
  background: transparent;
  border-color: rgba(140, 182, 255, 0.1);
  box-shadow: none;
}

/* Remove decorative overlay */
.footer-cta-section::before {
  display: none;
}

/* Content positioning */
.footer-cta-section > * {
  position: relative;
  z-index: 1;
}

/* Title styling */
.footer-cta-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0;
  color: #1a1a1a;
}

.site-footer-new[data-theme="charcoal"] .footer-cta-title {
  color: #eef2ff;
}

/* Right section */
.footer-cta-right {
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  justify-content: center;
}

/* Subtitle styling */
.footer-cta-subtitle {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 300;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.site-footer-new.light-mode .footer-cta-subtitle {
  color: #6b5b4a;
}

.site-footer-new[data-theme="charcoal"] .footer-cta-subtitle {
  color: #cbd5e1;
}

/* ============================================
   EMAIL INPUT - PREMIUM STYLING
   ============================================ */

.email-input-wrapper {
  position: relative;
  width: fit-content;
  animation: subtleFloat 3s ease-in-out infinite;
  margin-left: auto;
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.email-input-field {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  max-height: 56px;
}

/* Light mode email input */
.site-footer-new.light-mode .email-input-field {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.site-footer-new.light-mode .email-input-field:hover {
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

/* Dark mode email input */
.site-footer-new[data-theme="charcoal"] .email-input-field {
  background:
    linear-gradient(135deg, rgba(15, 20, 35, 0.85) 0%, rgba(8, 12, 20, 0.9) 100%) padding-box,
    linear-gradient(180deg, rgba(140, 182, 255, 0.25), rgba(140, 182, 255, 0.06)) border-box;
  background-clip: padding-box, border-box;
  border: 2px solid transparent;
  box-shadow:
    0 6px 20px -8px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(140, 182, 255, 0.2),
    0 0 0 1px rgba(140, 182, 255, 0.12),
    0 0 30px -12px rgba(140, 182, 255, 0.08);
}

.site-footer-new[data-theme="charcoal"] .email-input-field:hover {
  background:
    linear-gradient(135deg, rgba(20, 28, 45, 0.9) 0%, rgba(12, 18, 30, 0.95) 100%) padding-box,
    linear-gradient(180deg, rgba(140, 182, 255, 0.35), rgba(140, 182, 255, 0.12)) border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 8px 24px -6px rgba(0, 0, 0, 0.7),
    inset 0 2px 0 rgba(140, 182, 255, 0.25),
    0 0 0 1px rgba(140, 182, 255, 0.18),
    0 0 30px -12px rgba(140, 182, 255, 0.12);
  transform: translateY(-3px);
}

/* Email text link */
.email-input-text {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

.site-footer-new.light-mode .email-input-text {
  color: #3a2a1a;
}

.site-footer-new.light-mode .email-input-text:hover {
  text-decoration: none;
}

.site-footer-new[data-theme="charcoal"] .email-input-text {
  color: #cbd5e1;
}

.site-footer-new[data-theme="charcoal"] .email-input-text:hover {
  text-decoration: none;
}

/* Copy button */
.email-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  gap: 0.6rem;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
}

.site-footer-new.light-mode .email-copy-btn {
  background: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.site-footer-new.light-mode .email-copy-btn:hover {
  background: #0a0a0a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.site-footer-new.light-mode .email-copy-btn:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-footer-new[data-theme="charcoal"] .email-copy-btn {
  background: linear-gradient(135deg, #cbd5e1 0%, #a0afc4 100%);
  color: #060912;
  box-shadow: 0 4px 12px rgba(196, 215, 255, 0.2);
}

.site-footer-new[data-theme="charcoal"] .email-copy-btn:hover {
  background: linear-gradient(135deg, #eef2ff 0%, #cbd5e1 100%);
  box-shadow: 0 6px 16px rgba(196, 215, 255, 0.3);
  transform: translateY(-2px);
}

.site-footer-new[data-theme="charcoal"] .email-copy-btn:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(196, 215, 255, 0.2);
}

.copy-icon,
.check-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.copy-icon {
  opacity: 1;
  transform: scale(1);
}

.check-icon {
  opacity: 0;
  transform: scale(0.7);
  position: absolute;
}

.email-copy-btn.copied .copy-icon {
  opacity: 0;
  transform: scale(0.7);
}

.email-copy-btn.copied .check-icon {
  opacity: 1;
  transform: scale(1);
}

.email-copy-btn.copied .copy-icon {
  opacity: 0;
  transform: scale(0.8);
}

.email-copy-btn.copied .check-icon {
  opacity: 1;
  transform: scale(1);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .footer-cta-section {
    display: block;
    padding: 3.5rem 1.5rem;
    text-align: center;
    margin: 2rem 0 3rem;
    border-radius: 20px;
  }

  .footer-cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
  }

  .footer-cta-right {
    padding-left: 0;
    align-items: center;
    text-align: center;
  }

  .footer-cta-subtitle {
    margin-bottom: 2rem;
    font-size: 1rem;
  }

  .email-input-field {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* ============================================
   CHATBOT POSITIONING - HANGING ON RIGHT
   ============================================ */

#chatbase-bubble,
[id*="chatbase-bubble"],
.chatbase-bubble {
  position: fixed !important;
  bottom: 32px !important;
  right: 16px !important;
  z-index: 9999 !important;
}

body.page-frame-active #chatbase-bubble,
body.page-frame-active [id*="chatbase-bubble"] {
  bottom: 80px !important;
  right: -8px !important;
}

/* Chat button positioned just below the bubble */
#chatbase-bubble-button,
.chatbase-bubble-button,
[id*="chatbase-bubble-button"] {
  position: fixed !important;
  bottom: 8px !important;
  right: 60px !important;
  z-index: 9998 !important;
  padding: 12px !important;
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease !important;
}

#chatbase-bubble-button:hover,
.chatbase-bubble-button:hover,
[id*="chatbase-bubble-button"]:hover {
  background: rgba(0, 0, 0, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.1) !important;
}

/* Chat button when page frame is active */
body.page-frame-active #chatbase-bubble-button,
body.page-frame-active .chatbase-bubble-button,
body.page-frame-active [id*="chatbase-bubble-button"] {
  bottom: 56px !important;
  right: 4px !important;
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .email-input-wrapper {
    animation: none;
  }

  .email-input-field,
  .email-copy-btn {
    transition: none;
  }

  .email-copy-btn.copied .check-icon {
    animation: none;
  }
}
