/**
 * Trial Components Styles
 *
 * Styles for trial selection modal and trial countdown banner
 */

/* ============================================================================
   Trial Modal
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

.modal-container {
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.modal-header {
  text-align: center;
  padding: 40px 40px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.modal-subtitle {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
}

/* Trial Plans Grid */

.trial-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 40px;
}

.trial-plan {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 24px;
  position: relative;
  transition: all 0.3s;
  background: white;
}

.trial-plan:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.trial-plan.recommended {
  border-color: #3b82f6;
  border-width: 3px;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.plan-header h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.plan-price {
  margin: 8px 0;
}

.plan-price .price {
  font-size: 36px;
  font-weight: 800;
  color: #111827;
}

.plan-price .period {
  font-size: 16px;
  color: #6b7280;
  font-weight: 500;
}

.plan-subtitle {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: #6b7280;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #374151;
}

.plan-features .checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #10b981;
  margin-top: 2px;
}

.trial-button {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.trial-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.trial-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-footer {
  background: #f9fafb;
  padding: 24px 40px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.trial-terms {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* Trial Loading State */

.trial-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 12px;
}

.trial-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.trial-loading p {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
  font-weight: 500;
}

/* Trial Success State */

.trial-success {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.trial-success h2 {
  margin: 0 0 16px 0;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
}

.trial-success p {
  margin: 8px 0;
  font-size: 16px;
  color: #6b7280;
}

.trial-dates {
  background: #f0fdf4;
  padding: 12px 20px;
  border-radius: 8px;
  margin: 16px 0;
  color: #166534 !important;
}

.redirecting {
  font-size: 14px !important;
  color: #9ca3af !important;
  margin-top: 24px !important;
}

/* ============================================================================
   Trial Countdown Banner
   ============================================================================ */

.trial-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.trial-banner.expiring-soon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.trial-icon {
  font-size: 18px;
}

.trial-message {
  margin: 0;
}

.trial-countdown {
  background: rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
}

.trial-banner-button {
  background: white;
  color: #f59e0b;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.trial-banner.expiring-soon .trial-banner-button {
  color: #ef4444;
}

.trial-banner-button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.trial-banner-close {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  transition: opacity 0.2s;
}

.trial-banner-close:hover {
  opacity: 1;
}

/* ============================================================================
   Search Limit Upgrade Modal
   ============================================================================ */

.search-limit-modal {
  max-width: 600px;
}

.limit-reached-header {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom-color: #fbbf24;
}

.limit-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

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

.upgrade-content {
  padding: 32px 40px;
}

.current-plan-notice {
  background: #f3f4f6;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 24px;
  color: #6b7280;
  font-size: 14px;
}

.current-plan-notice strong {
  color: #111827;
}

.upgrade-offer {
  text-align: center;
}

.upgrade-offer h3 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 24px;
}

.upgrade-highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 2px solid #3b82f6;
}

.upgrade-price {
  margin-bottom: 8px;
}

.upgrade-price .price {
  font-size: 42px;
  font-weight: 800;
  color: #1e40af;
}

.upgrade-price .period {
  font-size: 18px;
  color: #6b7280;
  font-weight: 500;
}

.upgrade-searches {
  font-size: 18px;
  color: #374151;
}

.upgrade-searches strong {
  color: #1e40af;
  font-size: 20px;
}

.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  text-align: left;
}

.upgrade-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #374151;
}

.upgrade-features .checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #10b981;
  margin-top: 2px;
}

.trial-offer-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #78350f;
  font-size: 15px;
  border: 2px solid #fbbf24;
}

.upgrade-button {
  width: 100%;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 12px;
}

.upgrade-button.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.upgrade-button.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.upgrade-button.secondary {
  background: white;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.upgrade-button.secondary:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

.modal-footer-note {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.modal-footer-note p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

/* ============================================================================
   Exit Intent Popup
   ============================================================================ */

.exit-intent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.exit-intent-overlay.show {
  opacity: 1;
}

.exit-intent-container {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.9);
  transition: transform 0.3s ease-out;
}

.exit-intent-overlay.show .exit-intent-container {
  transform: scale(1);
}

.exit-intent-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  z-index: 10;
}

.exit-intent-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.exit-intent-content {
  padding: 48px 40px 40px;
  text-align: center;
}

.exit-intent-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

.exit-intent-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.exit-intent-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.exit-intent-benefits {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.exit-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #374151;
}

.exit-benefit:last-child {
  margin-bottom: 0;
}

.benefit-icon {
  flex-shrink: 0;
}

.exit-intent-offer-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.offer-badge {
  background: #f59e0b;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.offer-text {
  margin: 0;
  font-size: 15px;
  color: #78350f;
  line-height: 1.5;
}

.offer-text strong {
  color: #92400e;
}

.exit-intent-cta {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px -5px rgba(59, 130, 246, 0.4);
  margin-bottom: 12px;
}

.exit-intent-cta:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.exit-intent-secondary {
  width: 100%;
  background: transparent;
  color: #6b7280;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.exit-intent-secondary:hover {
  background: #f3f4f6;
  color: #374151;
}

.exit-intent-footer {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
}

/* ============================================================================
   Value Calculator Component
   ============================================================================ */

.value-calculator {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  margin: 0 auto;
}

.calculator-header {
  text-align: center;
  margin-bottom: 32px;
}

.calculator-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.calculator-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.calculator-inputs {
  margin-bottom: 32px;
}

.calculator-input-group {
  margin-bottom: 24px;
}

.calculator-input-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.input-with-slider {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calculator-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
}

.calculator-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calculator-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
  min-width: 60px;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  color: #3b82f6;
}

.calculator-results {
  background: #f9fafb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.result-section {
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: white;
}

.result-section.highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
}

.result-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-icon {
  font-size: 20px;
}

.result-value {
  font-size: 36px;
  font-weight: 800;
  color: #111827;
}

.result-value.primary {
  color: #2563eb;
}

.result-note {
  font-size: 13px;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

.result-breakdown {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
}

.breakdown-item.highlight-row {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  padding: 16px;
  margin-top: 12px;
}

.breakdown-label {
  font-size: 15px;
  color: #374151;
}

.breakdown-value {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.breakdown-value.primary {
  color: #2563eb;
  font-size: 24px;
}

.calculator-cta-section {
  text-align: center;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
  margin-top: 24px;
}

.cta-text {
  font-size: 17px;
  color: #374151;
  margin-bottom: 20px;
}

.cta-text strong {
  color: #2563eb;
}

.calculator-cta {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px -5px rgba(59, 130, 246, 0.4);
}

.calculator-cta:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.calculator-assumptions {
  margin-top: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.calculator-assumptions details {
  cursor: pointer;
}

.calculator-assumptions summary {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  user-select: none;
}

.calculator-assumptions ul {
  margin-top: 12px;
  padding-left: 20px;
}

.calculator-assumptions li {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* Mobile Responsive */

@media (max-width: 768px) {
  .modal-container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal-header {
    padding: 32px 24px 16px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .trial-plans {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 16px;
  }

  .trial-plan {
    padding: 24px 20px;
  }

  .modal-footer {
    padding: 20px 24px;
  }

  .trial-banner {
    padding: 10px 16px;
    font-size: 13px;
    position: relative;
  }

  .trial-banner-content {
    flex-direction: column;
    gap: 8px;
  }

  .trial-banner-close {
    right: 12px;
  }

  .upgrade-content {
    padding: 24px 20px;
  }

  .upgrade-offer h3 {
    font-size: 20px;
  }

  .upgrade-price .price {
    font-size: 36px;
  }

  .exit-intent-container {
    width: 95%;
    max-height: 95vh;
  }

  .exit-intent-content {
    padding: 40px 24px 24px;
  }

  .exit-intent-title {
    font-size: 24px;
  }

  .exit-intent-icon {
    font-size: 48px;
  }

  .value-calculator {
    padding: 24px 20px;
  }

  .calculator-title {
    font-size: 22px;
  }

  .result-value {
    font-size: 28px;
  }

  .breakdown-value.primary {
    font-size: 20px;
  }
}
