/**
 * FarmConnect Pricing Page Styles
 * Modern, responsive pricing cards with animations
 */

/* Pricing Hero Section */
.pricing-hero {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M50 0L100 50L50 100L0 50z" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.1;
}

.pricing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pricing-hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Billing Toggle */
.billing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 60px 0 40px;
  padding: 20px;
  background: white;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.billing-toggle-container label {
  font-weight: 600;
  color: #374151;
  font-size: 1rem;
}

.billing-toggle {
  position: relative;
  width: 60px;
  height: 30px;
}

.billing-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: .4s;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #059669;
}

input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

.save-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

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

/* Pricing Plans Grid */
.pricing-plans-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Pricing Card */
.pricing-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.pricing-card.featured {
  border-color: #059669;
  box-shadow: 0 15px 40px rgba(5, 150, 105, 0.2);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-10px);
}

/* Badges */
.discount-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.popular-badge {
  position: absolute;
  top: -15px;
  right: 20px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

/* Plan Header */
.plan-header {
  text-align: center;
  margin-bottom: 30px;
}

.plan-name {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
}

.plan-description {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Plan Price */
.plan-price {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 2px solid #f3f4f6;
  border-bottom: 2px solid #f3f4f6;
}

.price-amount {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-top: 8px;
}

.amount {
  font-size: 3.5rem;
  font-weight: 900;
  color: #059669;
  line-height: 1;
}

.period {
  font-size: 1rem;
  color: #6b7280;
  align-self: flex-end;
  margin-bottom: 12px;
}

.annual-savings {
  margin-top: 10px;
  color: #059669;
  font-weight: 600;
  font-size: 0.875rem;
}

.discount-info {
  margin-top: 10px;
  font-size: 0.875rem;
}

.discount-info del {
  color: #9ca3af;
  margin-right: 8px;
}

.discounted-price {
  color: #ef4444;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Plan Features */
.plan-features {
  flex: 1;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-item i {
  color: #059669;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feature-item span {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Select Plan Button */
.select-plan-btn {
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: #059669;
  border: 2px solid #059669;
}

.btn-secondary:hover {
  background: #f0fdf4;
  transform: translateY(-2px);
}

/* Checkout Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content.checkout-modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: #6b7280;
}

.modal-close:hover {
  background: #e5e7eb;
  transform: rotate(90deg);
}

.modal-title {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}

.checkout-section {
  margin-bottom: 30px;
}

.checkout-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-input-group {
  display: flex;
  gap: 10px;
}

.form-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.code-message {
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.875rem;
  display: none;
}

.code-message.success {
  background: #d1fae5;
  color: #065f46;
  display: block;
}

.code-message.error {
  background: #fee2e2;
  color: #991b1b;
  display: block;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.payment-option {
  cursor: pointer;
}

.payment-option input {
  display: none;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.payment-option input:checked + .payment-card {
  border-color: #059669;
  background: #f0fdf4;
}

.payment-card:hover {
  border-color: #10b981;
  background: #f9fafb;
}

.payment-card i {
  font-size: 1.5rem;
  color: #059669;
}

.payment-card span {
  font-weight: 600;
  color: #374151;
}

/* Order Summary */
.order-summary {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  padding: 30px;
  border-radius: 16px;
  position: sticky;
  top: 20px;
}

.order-summary h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 1rem;
}

.summary-row span {
  color: #6b7280;
}

.summary-row strong {
  color: #111827;
  font-weight: 700;
}

.discount-amount {
  color: #059669 !important;
}

.summary-divider {
  height: 2px;
  background: #d1d5db;
  margin: 15px 0;
}

.total-row {
  font-size: 1.25rem;
  padding-top: 15px;
}

.total-row strong {
  font-size: 1.75rem;
  color: #059669;
}

.btn-block {
  width: 100%;
  margin-top: 20px;
}

.checkout-btn {
  padding: 18px 32px;
  font-size: 1.1rem;
}

.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  color: #6b7280;
  font-size: 0.875rem;
}

.security-badges i {
  color: #059669;
}

/* Notification */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 10000;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
  color: #065f46;
}

.notification.error {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.notification.info {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  color: #1e40af;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }
  
  .pricing-plans-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .pricing-hero h1 {
    font-size: 2rem;
  }
  
  .pricing-hero p {
    font-size: 1rem;
  }
  
  .pricing-plans-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .plan-name {
    font-size: 1.5rem;
  }
  
  .amount {
    font-size: 2.5rem;
  }
  
  .modal-content.checkout-modal {
    padding: 20px;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
  
  .code-input-group {
    flex-direction: column;
  }
}
