/* LLM Calculator Styles */

/* Calculator Header */
.calculator-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 3rem 1rem 2rem;
  text-align: center;
}

.calculator-header .container {
  max-width: 800px;
  margin: 0 auto;
}

.calculator-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  position: relative;
}

.calculator-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #212529;
  border-radius: 2px;
}

.calculator-description {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #6c757d;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
  padding: 2rem 0;
  background-color: #f8f9fa;
}

.calculator-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Calculator Form */
.calculator-form-wrapper {
  background: #ffffff;
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.form-group label {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-group label i {
  color: #6c757d;
  font-size: 0.9rem;
}

.price-display {
  font-weight: 400;
  color: #6c757d;
  font-size: 0.85rem;
  margin-left: auto;
}

.price-display em {
  font-style: italic;
}

.form-group select,
.form-group input[type="number"] {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: #fefefe;
  width: 100%;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
  outline: none;
  border-color: #212529;
  box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.1);
}

/* Choices.js Custom Styling */
.choices {
  margin-bottom: 0;
  font-size: 1rem;
  position: relative;
  width: 100%;
}

.choices__inner {
  background-color: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-height: 48px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.choices__inner:hover {
  border-color: #adb5bd;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
  border-color: #212529;
  box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.1);
}

.choices[data-type*=select-one] {
  width: 100%;
}

.choices[data-type*=select-one] .choices__inner {
  padding-right: 2.5rem;
}

.choices__list--single .choices__placeholder {
  opacity: 0.6;
}

.choices__list--dropdown .choices__item[data-placeholder] {
  display: none !important;
}

.choices__list--dropdown {
  border: 2px solid #212529;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  width: 100% !important;
  left: 0;
  right: 0;
  overflow: visible;
}

/* Inner list handles scrolling - set max-height here */
.choices__list--dropdown .choices__list {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.choices__list--dropdown .choices__item {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: background-color 0.15s ease;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #f8f9fa;
  color: #212529;
}

.choices__list--dropdown .choices__group {
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #6c757d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.choices__input {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.choices__input::placeholder {
  color: #adb5bd;
}

/* Section Headers */
.token-inputs-section h3,
.advanced-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.token-inputs-section h3 i,
.advanced-section h3 i {
  color: #6c757d;
}

/* Advanced Options */
.advanced-section {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Checkbox Group */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.checkbox-label:hover {
  background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Info Box */
.info-box {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
}

.info-box h4 {
  font-size: 0.95rem;
  color: #856404;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box p {
  font-size: 0.9rem;
  color: #856404;
  margin: 0;
  line-height: 1.5;
}

#tier-threshold-display {
  color: #212529;
  font-weight: 700;
}

/* Toggle Advanced Button */
.toggle-advanced-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.toggle-advanced-btn:hover {
  background: #e9ecef;
  border-color: #212529;
  color: #212529;
}

/* Calculate Button */
.btn-calculate {
  background: linear-gradient(135deg, #212529, #495057);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(33, 37, 41, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 37, 41, 0.3);
}

.btn-calculate:active {
  transform: translateY(0);
}

/* Results Section */
.results-wrapper {
  scroll-margin-top: 2rem;
}

.results-container {
  background: #ffffff;
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.results-container h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-container h2 i {
  color: #6c757d;
}

/* Results Placeholder */
.results-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6c757d;
}

.results-placeholder i {
  font-size: 3.5rem;
  color: #dee2e6;
  margin-bottom: 1rem;
  display: block;
}

.results-placeholder p {
  font-size: 1rem;
  margin: 0;
}

/* Model Info */
.model-info {
  margin-bottom: 1.5rem;
}

.model-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.provider-name {
  background: #212529;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

/* Total Cost Display */
.total-cost-display {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 2px solid #e9ecef;
}

.cost-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.cost-amount {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
}

.pricing-tier-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Cost Breakdown */
.cost-breakdown {
  margin-top: 1.5rem;
}

.cost-breakdown h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 1rem 0;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  gap: 0.5rem;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #495057;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.breakdown-label i {
  color: #6c757d;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.token-count {
  font-size: 0.8rem;
  color: #6c757d;
}

.breakdown-value {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
  white-space: nowrap;
}

.breakdown-value.savings {
  color: #28a745;
}

.breakdown-divider {
  height: 1px;
  background: #212529;
  margin: 0.5rem 0;
}

.total-row {
  border-bottom: none;
  padding-top: 1rem;
}

.total-row .breakdown-value {
  font-size: 1.1rem;
}

/* Savings Display */
.savings-display {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid #28a745;
}

.savings-display i {
  font-size: 1.75rem;
  color: #28a745;
  flex-shrink: 0;
}

.savings-display strong {
  color: #155724;
}

.savings-display p {
  margin: 0.25rem 0 0 0;
  color: #155724;
  font-size: 0.875rem;
}

/* Comparison Section */
.comparison-section {
  padding: 3rem 1rem;
  background: #ffffff;
}

.comparison-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.comparison-section h2 {
  text-align: center;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
}

.section-description {
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: #6c757d;
  margin-bottom: 2rem;
}

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  min-width: 600px;
}

.comparison-table thead {
  background: #212529;
  color: #ffffff;
}

.comparison-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.comparison-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.comparison-table tbody tr:hover {
  background: #f8f9fa;
}

.feature-badge {
  display: inline-block;
  background: #e9ecef;
  color: #495057;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0.1rem;
}

/* Show More Button */
.show-more-wrapper {
  text-align: center;
  margin-top: 1.5rem;
}

.show-more-btn {
  background-color: #212529;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.show-more-btn i {
  transition: transform 0.2s ease;
}

.show-more-btn:hover i {
  transform: translateY(2px);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 0.75rem 1rem;
}

.breadcrumb-nav .container {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.breadcrumb-list li a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-list li a:hover {
  color: #212529;
}

.breadcrumb-list li[aria-current="page"] {
  color: #212529;
  font-weight: 500;
}

.breadcrumb-separator {
  color: #adb5bd;
  font-size: 0.7rem;
}

/* Last Updated */
.last-updated {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 1rem;
}

.last-updated i {
  margin-right: 0.25rem;
}

/* How It Works Section */
.how-it-works-section {
  padding: 3rem 1rem;
  background: #ffffff;
}

.how-it-works-section .container {
  max-width: 1100px;
  margin: 0 auto;
}

.how-it-works-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #e9ecef;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #212529, #495057);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.card-icon i {
  font-size: 1.5rem;
  color: #ffffff;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 0.75rem 0;
}

.info-card p {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

/* Cost Optimization Tips Section */
.tips-section {
  padding: 3rem 1rem;
  background: #f8f9fa;
}

.tips-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.tips-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
}

.tips-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.tip-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #212529;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.tip-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 0.375rem 0;
}

.tip-content p {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
  margin: 0;
}

.tip-content code {
  background: #e9ecef;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #212529;
}

/* FAQ Section */
.faq-section {
  padding: 3rem 1rem;
  background: #ffffff;
}

.faq-section .container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #212529;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: #6c757d;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item[open] summary {
  border-bottom: 1px solid #e9ecef;
}

.faq-item p {
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.6;
}

/* Analyst Insights Section - reuses existing site card styles */
.analyst-insights-section {
  /* alternate section background to visually separate from surrounding white sections */
  background: #f8f9fa;
  padding: 3rem 1rem;
  border-bottom: 1px solid #eee;
}

.analyst-insights-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
}

.analyst-insights-section .container {
  max-width: 1100px;
  margin: 0 auto;
}

/* inner cards use the existing .info-cards, .info-card and .card-icon styles */

/* Make cards in this section white so they stand out against the alternate background */
.analyst-insights-section .info-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  box-shadow: none;
  padding: 1.25rem;
  border-radius: 10px;
  text-align: center;
}

.analyst-insights-section .card-icon {
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .calculator-header {
    padding: 2rem 1rem 1.5rem;
  }

  .calculator-section {
    padding: 1.5rem 0;
  }

  .form-group label {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-display {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .choices__list--dropdown {
    max-height: 240px;
  }

  .comparison-table {
    min-width: 500px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8rem;
  }

  .how-it-works-section,
  .tips-section,
  .faq-section {
    padding: 2rem 1rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .analyst-insights-section {
    padding: 2rem 1rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calculator-container {
    padding: 0 0.75rem;
  }

  .advanced-section {
    padding: 1rem;
  }

  .btn-calculate {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }

  .toggle-advanced-btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }

  .choices__inner {
    padding: 0.625rem 0.75rem;
    min-height: 44px;
  }

  .choices__list--dropdown {
    max-height: 200px;
  }

  .choices__list--dropdown .choices__item {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
  }

  .breakdown-label {
    font-size: 0.875rem;
  }

  .breakdown-value {
    font-size: 0.875rem;
  }

  .comparison-table {
    min-width: 450px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
  }

  .feature-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .tip-item {
    padding: 1rem;
  }

  .tip-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
  }

  .card-icon i {
    font-size: 1.25rem;
  }

  .breadcrumb-list {
    font-size: 0.8rem;
  }
}