/* File: assets/css/pricing.css */

/* Enhanced Pricing Page Styles for myBAS */

:root {
  --primary-color: #0056b3;
  --primary-dark: #004494;
  --secondary-color: #28a745;
  --accent-color: #34a853;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --text-color: #333;
  --text-light: #6c757d;
  --background-color: #f8f9fa;
  --border-color: #dee2e6;
  --white: #ffffff;
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Pricing Toggle - Desktop */
.pricing-section {
  padding: 4rem 0;
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
}

.pricing-toggle span {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 12px;
}

.save-badge {
  background-color: var(--secondary-color);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 5px;
}

/* Improved Toggle Switch Styling */
.toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin: 0 15px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

/* Mobile Toggle Styling */
.mobile-pricing-toggle {
  display: none;
  margin-top: 0;
  margin-bottom: 20px;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  border-top: none;
}

.mobile-toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.mobile-toggle-container span {
  min-width: 70px;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
}

.mobile-toggle {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 30px;
  margin: 0 10px;
}

.mobile-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mobile-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 34px;
}

.mobile-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .mobile-slider {
  background-color: var(--primary-color);
}

input:checked + .mobile-slider:before {
  transform: translateX(40px);
}

.mobile-annual-price {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 10px;
  color: var(--primary-color);
  font-weight: 500;
  display: none;
}

/* Pricing Cards */
.pricing-cards {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 15px;
  max-width: 1280px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 23%;
  flex: 1;
  min-width: 230px;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.pricing-card.recommended {
  border: 2px solid var(--primary-color);
  transform: scale(1.02);
  z-index: 1;
}

.pricing-card.recommended:hover {
  transform: translateY(-10px) scale(1.02);
}

.recommended-badge {
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--primary-color);
  color: white;
  padding: 8px 30px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(45deg);
  width: 150px;
  text-align: center;
  z-index: 1;
}

.plan-header {
  padding: 25px 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.plan-header h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.price {
  margin-bottom: 15px;
  position: relative;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.price .amount {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-color);
}

.price .annual {
  display: none;
}

.price .period {
  font-size: 1rem;
  color: var(--text-light);
}

.alt-price {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  font-size: 0.85rem;
  color: var(--text-light);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s, transform 0.3s;
}

.billing-annual .price .alt-price,
.mobile-billing-annual .price .alt-price {
  opacity: 1;
  transform: translateY(0);
}

.plan-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
  padding: 0 10px;
  min-height: 40px;
}

.plan-features {
  padding: 20px 15px;
  flex-grow: 1;
}

.plan-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features li {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
}

.plan-features li.included {
  color: var(--text-color);
}

.plan-features li.not-included {
  color: var(--text-light);
}

.plan-features li::before {
  content: "✓";
  margin-right: 8px;
  flex-shrink: 0;
}

.plan-features li.not-included::before {
  content: "×";
}

.plan-footer {
  padding: 0 15px 25px;
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.3rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  color: var(--primary-color);
  background-color: transparent;
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(0, 86, 179, 0.05);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Comparison Link */
.comparison-link {
  text-align: center;
  margin-top: 40px;
}

.comparison-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.comparison-link a:hover {
  border-bottom-color: var(--primary-color);
}

/* Features Comparison */
.features-comparison {
  padding: 5rem 0;
  background-color: var(--background-color);
}

.features-comparison h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2rem;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table th .price-tag {
  display: block;
  font-size: 0.9rem;
  font-weight: normal;
  margin-top: 0.25rem;
}

.comparison-table th:first-child {
  text-align: left;
  background-color: var(--primary-dark);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.comparison-table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* CTA Section */
.cta-section {
  padding: 60px 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 12px;
  padding: 50px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.cta-box h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.cta-box p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-buttons .btn {
  margin-bottom: 15px;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.no-card {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
}

/* Accountant Section */
.accountant-section {
  padding: 60px 0;
  background: #f0f5ff;
}

.accountant-content {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.accountant-info {
  flex: 1;
}

.accountant-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.accountant-info ul {
  margin-bottom: 30px;
  padding-left: 1.5rem;
}

.accountant-info li {
  margin-bottom: 10px;
}

.accountant-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.accountant-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.faq {
  padding: 5rem 0;
  background-color: white;
}

.faq h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.faq-item h3 {
  padding: 20px;
  margin: 0;
  font-size: 1.2rem;
  background-color: #f8f9fa;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s;
}

.faq-item h3::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.faq-item.active h3::after {
  content: '-';
}

.faq-item h3:hover {
  background-color: #f0f0f0;
}

.faq-answer {
  padding: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  padding: 20px;
  height: auto;
  opacity: 1;
}

.faq-answer p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--text-light);
}

.faq-answer ul, .faq-answer ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* JavaScript Toggle Classes */
.billing-annual .price .monthly {
  display: none;
}

.billing-annual .price .annual {
  display: inline;
}

.mobile-billing-annual .mobile-annual-price {
  display: block;
}

/* Responsive Styles */
@media (min-width: 992px) {
  .pricing-cards {
    display: flex;
    flex-wrap: nowrap;
  }
  
  .pricing-card {
    flex: 1;
  }
}

@media (max-width: 1100px) {
  .pricing-card {
    min-width: 200px;
  }
  
  .plan-features li {
    font-size: 0.85rem;
  }
}

@media (max-width: 992px) {
  .pricing-cards {
    flex-wrap: wrap;
  }
  
  .pricing-card {
    width: calc(50% - 15px);
    margin-bottom: 30px;
  }
  
  .pricing-card.recommended {
    transform: scale(1.01);
  }
  
  .pricing-card.recommended:hover {
    transform: translateY(-10px) scale(1.01);
  }
  
  .accountant-content {
    flex-direction: column;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 3rem 1rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .pricing-card {
    width: 100%;
    max-width: 350px;
    margin-bottom: 30px;
  }
  
  .pricing-card.recommended {
    transform: none;
  }
  
  .pricing-card.recommended:hover {
    transform: translateY(-10px);
  }
  
  .cta-box {
    padding: 30px;
  }
  
  /* Show mobile toggles */
  .pricing-toggle.desktop-toggle {
    display: none;
  }
  
  .mobile-pricing-toggle {
    display: block;
    order: -1;
    margin-bottom: 0;
  }

  .pricing-card {
    display: flex;
    flex-direction: column;
  }

  .plan-header {
    order: 1;
  }
  
  .plan-features {
    order: 2;
  }
  
  .plan-footer {
    order: 3;
  }
  
  .comparison-table {
    font-size: 0.85rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px;
  }
}

@media (max-width: 576px) {
  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .plan-header h2 {
    font-size: 1.5rem;
  }
  
  .price .amount {
    font-size: 2rem;
  }
  
  .accountant-info h3 {
    font-size: 1.5rem;
  }
  
  .cta-box h2 {
    font-size: 1.7rem;
  }
}