/**
 * Pricing Page Styles
 * Specific styles for pricing.html
 */

/* ============================================================================
   PRICING PAGE
   ============================================================================ */

.pricing-main {  

  h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
  }

  &>p {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    font-size: 1.1em;
  }

  @media (max-width: 480px) {
    max-width: 100%;
    padding: 0 1rem;
  }
}

/* ============================================================================
   PRICING TABLE
   ============================================================================ */

.pricing-table-wrapper {
  overflow-x: auto;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  table-layout: fixed;

  thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  }

  th {
    padding: 30px 20px;
    text-align: center;
    font-weight: 600;
    color: white;
    font-size: 15px;
    display: table-cell;
    width: auto;
    min-width: 150px;

    &.plan-col-name {
      position: sticky;
      left: 0;
      font-size: 24px;
      width: 22%;
      text-align: left;
      background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
      z-index: 10;
    }
  }

  td {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    color: #374151;
    vertical-align: middle;

    &.plan-col-name {
      position: sticky;
      left: 0;
      background: white;
      z-index: 5;
      font-weight: 600;
      color: #1f2937;
    }
  }

  tbody {
    tr {
      transition: background-color 0.2s ease;

      &:hover td {
        background-color: #e3e4e5 !important;
      }

      &:last-child td {
        border-bottom: none;
      }
    }
  }

  /* ============================================================================
     TABLE CELL STYLES
     ============================================================================ */

  .feature-row-name {
    position: sticky;
    left: 0;
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
    background: white;
    z-index: 5;
  }

  .plan-col {
    text-align: center;
    font-size: 15px;
    background: #f3f4f6;

    &-even {
      background-color: #eaeaeb !important;
    }

    &-odd {
      background-color: #f9fafb !important;
    }

    &-name {
      font-size: 24px;
      width: 22%;
      text-align: left;
      background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    }
  }

  .cta-row {
    background: #f9fafb;
    border-top: 2px solid #e5e7eb;

    td {
      padding: 24px 20px;
    }
  }

  .plan-header-cell {
    align-items: center;
    text-align: center;
    background: rgba(72, 101, 189, 0.05);
  }
}

/* ============================================================================
   PLAN HEADER TEXT
   ============================================================================ */

.plan-name-header {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  display: block;
}

.plan-price-header {
  font-size: 28px;
  font-weight: 700;
  color: #fef3c7;
  margin-bottom: 6px;
  display: block;
}

.plan-period-header {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  font-weight: 400;
}

/* ============================================================================
   PLAN CTA BUTTONS
   ============================================================================ */

.plan-cta {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;

  &.primary {
    font-size: 16px;
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);

    &:hover {
      background: #5568d3;
      box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
      transform: translateY(-2px);
    }
  }

  &.secondary {
    font-size: 16px;
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;

    &:hover {
      background: #f3f4f6;
      border-color: var(--primary-color);
      color: var(--primary-color);
    }
  }

  &.current-plan {
    background: #dbeafe !important;
    color: #0369a1 !important;
    border: 2px solid #7dd3fc !important;
    cursor: initial !important;
    opacity: 1 !important;

    &:hover {
      background: #dbeafe !important;
      color: #0369a1 !important;
      border-color: #7dd3fc !important;
      transform: none !important;
    }
  }

  &:disabled:not(.current-plan) {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    border: 2px solid #d1d5db !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;

    &:hover {
      background: #e5e7eb !important;
      color: #6b7280 !important;
      border-color: #d1d5db !important;
      transform: none !important;
    }
  }
}

/* ============================================================================
   FEATURE STATUS INDICATORS
   ============================================================================ */

.feature-enabled {
  color: #10b981;
  font-weight: 600;
  font-size: 20px;

  &:before {
    content: "✓ ";
    margin-right: 4px;
  }
}

.feature-disabled {
  color: #7e7e7e;
  font-weight: 500;

  &:before {
    content: "✗ ";
    margin-right: 4px;
  }
}

/* ============================================================================
   MESSAGES & ALERTS
   ============================================================================ */

#inactive-subscription-message {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  color: #d97706;
  font-weight: 500;
}

/* ============================================================================
   PRICING SECTION (Index page cards)
   ============================================================================ */

.pricing {
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);

  .pricing-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    line-height: 1.2;
  }
}

.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.pricing-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;  
  flex-shrink: 0;

  &:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--primary-color);
  }

  h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 700;
  }
}

.pricing-popular {
  background: linear-gradient(135deg, #f0f4ff 0%, #f5f0ff 100%);
  border: 2px solid var(--primary-color);
  transform: scale(1);

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.2);
  }
}

.pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  white-space: nowrap;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  margin-top: 1rem;
}

.pricing-period {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1.5rem;
  display: block;
}

.pricing-features {
  list-style: none;
  margin: 1.5rem 0 2rem 0;
  padding: 0;
  text-align: left;
  flex-grow: 1;

  li {
    padding: 0.75rem 0 0.75rem 1.75rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;

    &:before {
      content: "✓";
      position: absolute;
      left: 0;
      color: #10b981;
      font-weight: 700;
      font-size: 1.1rem;
    }

    &:last-child {
      border-bottom: none;
    }
  }
}

.pricing-footer {
  margin-top: 2rem;
  text-align: center;

  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: auto;
    min-width: 200px;
  }
}


/* ============================================================================
   MESSAGE STYLES
   ============================================================================ */

#unverified-message {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  color: #991b1b;
  border-radius: 4px;
}

/* ============================================================================
   UPGRADE CONFIRMATION MODAL
   ============================================================================ */

.upgrade-confirmation-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-confirmation-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.upgrade-confirmation-content {
  position: relative;
  z-index: 2001;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;

  h3 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
  }

  p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }
}

.upgrade-confirmation-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;

  button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .pricing-table-wrapper {
    overflow-x: auto;
  }

  .pricing-table {
    th, td {
      padding: 12px 8px;
      font-size: 12px;
    }

    th.plan-col-name,
    .plan-col-name {
      width: 18%;
      font-size: 14px;
    }

    .plan-cta {
      padding: 8px 12px;
      font-size: 12px;
    }
  }

  .plan-name-header {
    font-size: 16px;
  }

  .plan-price-header {
    font-size: 20px;
  }

  .plan-period-header {
    font-size: 11px;
  }

  .pricing-grid {
    gap: 1.5rem;
  }

  .pricing-card {
    padding: 1.5rem;
  }

  .pricing h2 {
    font-size: 1.8rem;
  }

  .final-cta {
    h2 {
      font-size: 1.8rem;
    }
  }
}

@media (max-width: 480px) {
  .pricing-main {
    h1 {
      font-size: 1.8rem;
    }

    &>p {
      margin-bottom: 2rem;
      font-size: 1rem;
    }
  }

  .pricing {
    padding: 1.5rem;

    .pricing-content {
      padding: 0;
    }

    h2 {
      font-size: 1.3rem;
      margin-bottom: 2rem;
      line-height: 1.3;
    }

    .pricing-footer {
      margin-top: 2rem;

      .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: auto;
      }
    }
  }

  .pricing-grid {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .pricing-card {
    width: 46%;
    max-width: 100%;
    padding: 1.5rem;

    h3 {
      font-size: 1.25rem;
      margin-bottom: 0.5rem;
    }
  }

  .pricing-popular-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .pricing-amount {
    font-size: 2rem;
  }

  .pricing-period {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .pricing-features {
    margin: 1rem 0 1.5rem 0;

    li {
      padding: 0.6rem 0 0.6rem 1.5rem;
      font-size: 0.9rem;

      &:before {
        font-size: 1rem;
      }
    }
  }

  .final-cta {
    padding: 1.5rem;
    margin-top: 2rem;

    .final-cta-content {
      padding: 0;
    }

    h2 {
      font-size: 1.3rem;
      margin-bottom: 1.5rem;
      line-height: 1.3;
    }
  }

  .cta-checklist {
    font-size: 1rem;
    margin-bottom: 1.5rem;

    li {
      margin-bottom: 0.75rem;
      line-height: 1.5;
    }
  }

  .btn-large {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-width: auto;
    margin-top: 1.5rem;
  }

  .pricing-table-wrapper {
    border-radius: 8px;
  }

  .pricing-table {
    th, td {
      padding: 10px 6px;
      font-size: 11px;
      width: 30vw;
      max-width: 30vw;
    }

    th.plan-col-name,
    .plan-col-name {
      width: 15vw;
      max-width: 15vw;
      font-size: 12px;
      padding: 8px 6px;
    }

    .feature-row-name {
      width: 15vw;
      max-width: 15vw;
      font-size: 11px;
    }

    .plan-cta {
      padding: 8px 10px;
      font-size: 11px;
      width: 100%;
    }

    .feature-enabled {
      font-size: 14px;

      &:before {
        margin-right: 2px;
      }
    }

    .feature-disabled {
      font-size: 14px;

      &:before {
        margin-right: 2px;
      }
    }
  }

  .plan-name-header {
    font-size: 13px;
  }

  .plan-price-header {
    font-size: 16px;
  }

  .plan-period-header {
    font-size: 10px;
  }

  #inactive-subscription-message,
  #unverified-message {
    padding: 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
}
