/* ============================================
   SM Choose A Plan V1 - Component Styles
   ============================================ */

/* —— Tabs —— */
.certificates-tabs {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #f6f6f6;
  padding: 4px;
  height: 48px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 16px;
  max-width: 450px;
  margin: 0 auto 50px auto;
}

.certificates-tab {
  color: #aeaeae;
  flex: 1;
  text-align: center;
  line-height: 35px;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s ease;
}

.certificates-tab.active {
  color: #ffffff;
}

.certificates-slider {
  position: absolute;
  top: 6px;
  left: 8px;
  width: calc(50% - 8px);
  height: 35px;
  background-color: #e93e34;
  border-radius: 52px;
  box-shadow: 0 4px 19px rgba(233, 62, 52, 0.4);
  transition: transform 0.3s ease;
  z-index: 1;
}


/* ---- Container ---- */
.sm-choose-a-plan {
  max-width: 1600px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  line-height: 1.6;
}

.plan-pdf-download {
  color: #5f6568;
  text-decoration: underline;
  text-decoration-color: #5f6568;
  text-underline-offset: 6px;
  font-size: 12px;
  cursor: pointer;
}

.bg-white {
  background-color: white !important;
}

/* 对比 */
.plan-compare {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px 0;
}
.compare-title {
  font-size: 18px;
  font-weight: bold;
  color: #dddddd;
}
.compare-title-act {
  color: #333333;
}
.plan-compare-actions {
  display: flex;
  align-items: center;
}
.plan-compare-btn1 {
  border: 2px solid #e93e34;
  border-radius: 20px;
  color: #e93e34;
  font-weight: bold;
  font-size: 16px;
  background-color: #ffffff;
  margin-right: 30px;
  cursor: pointer;
  height: 40px;
  line-height: 40px;
  width: 170px;
  text-align: center;
}
.btn-disabled {
  background-color: rgba(0,0,0,.12);
  color: rgba(0,0,0,.26);
  cursor: not-allowed;
}

.plan-compare-clear {
  font-size: 16px;
  color: #5a5a5a;
  text-decoration: underline;
  cursor: pointer;
  text-underline-offset: 4px;
}
.compare-items {
  display: flex;
  gap: 30px;
  align-items: center;
}
.compare-item {
  border-radius: 8px;
  background-color: #e93e34;
  height: 40px;
  min-width: 165px;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.compare-item-close {
  cursor: pointer;
}
.compare-item-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #ffffff;
}

.sm-choose-a-plan-compare-icon {
  width: 24px;
  height: 24px;
  color: #e93e34;
  margin-right: 10px;
}
.sm-choose-a-plan-tooltip-wrapper {
  position: relative;
}
.sm-choose-a-plan-tooltip-wrapper:nth-child(even) {
  background-color: rgba(185, 187, 189, 0.1);
}
.sm-choose-a-plan-tooltip {
  position: absolute;
  z-index: 999;
  background: #e93e34;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  transition: all 0.3s ease;
  opacity: 0.9;
  white-space: pre-line;
  width: 300px;
  max-width: 300px;
}

.sm-choose-a-plan-tooltip-top {
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
}

.sm-choose-a-plan-tooltip-bottom {
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
}

/* Alpine cloak */
[x-cloak] {
  display: none !important;
}

/* ============================================
   Loading State
   ============================================ */
.sm-cap-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.sm-cap-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: sm-cap-spin 0.8s linear infinite;
}

@keyframes sm-cap-spin {
  to {
    transform: rotate(360deg);
  }
}

.sm-cap-loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
}

/* ============================================
   Error State
   ============================================ */
.sm-cap-error {
  text-align: center;
  padding: 60px 20px;
}

.sm-cap-error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #ef4444;
}

.sm-cap-error-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.sm-cap-error-msg {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.sm-cap-retry-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.sm-cap-retry-btn:hover {
  background: #1d4ed8;
}

/* ============================================
   Language Bar
   ============================================ */
.sm-cap-lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 24px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-left: auto;
}

.sm-cap-lang-btn {
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.sm-cap-lang-btn:hover {
  color: #334155;
}

.sm-cap-lang-btn--active {
  color: #1e293b;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Category Tabs
   ============================================ */
.sm-cap-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sm-cap-tabs::-webkit-scrollbar {
  display: none;
}

.sm-cap-tab {
  flex-shrink: 0;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-bottom: -2px;
}

.sm-cap-tab:hover {
  color: #334155;
}

.sm-cap-tab--active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* ============================================
   Plans Grid
   ============================================ */
.sm-cap-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
}

.plan-quote-item-desc {
  font-size: 10px;
  color: #aeaeae;
}

/* Tablet + PC: horizontal centered scroll, fixed card width */
@media (min-width: 768px) {
  .sm-cap-grid {
    flex-direction: row;
    /* safe center: prevent leftmost items being clipped when overflow */
    justify-content: flex-start;
    justify-content: safe center;
    gap: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 16px 16px 4px;
  }

  .sm-cap-grid::-webkit-scrollbar {
    height: 6px;
  }

  .sm-cap-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
  }

  .sm-cap-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
  }

  .sm-cap-card {
    flex-shrink: 0;
    width: 315px;
  }
}

/* ============================================
   Plan Card
   ============================================ */
.sm-cap-card {
  background: #fff;
  border: 2px solid #c9c6cc;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  box-shadow: 0 1px 16px 0 rgba(0, 0, 0, 0.1);
  min-height: 680px;
}

.sm-cap-card:hover {
  box-shadow: none;
  transform: translateY(-2px);
  border: 2px solid #e93e34;
}

/* ---- Card Header ---- */
.sm-cap-card-header {
  /* padding: 24px 24px 20px; */
  text-align: center;
  /* border-bottom: 1px solid #f1f5f9; */
}

.sm-cap-plan-img {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.sm-cap-plan-img img {
  width: 65px;
}

.sm-cap-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.sm-cap-plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.sm-cap-price-currency {
  font-size: 20px;
  font-weight: 600;
  color: #2563eb;
}

.sm-cap-price-amount {
  font-size: 36px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
}

.sm-cap-price-period {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 400;
}

/* ---- Sections ---- */
.sm-cap-section {
  /* padding: 20px 24px; */
  /* border-bottom: 1px solid #f1f5f9; */
  flex-shrink: 0;
}

.sm-cap-section-title {
  font-size: 14px;
  font-weight: 700;
  padding: 14px 30px;
  text-align: left;
}

.plan-quote-icon {
  height: 16px;
  width: 16px;
}

/* ---- Benefits List ---- */
.sm-cap-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sm-cap-benefit-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sm-cap-check-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  color: #16a34a;
}

.sm-cap-benefit-label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.sm-cap-benefit-sublist {
  margin-top: 4px;
  padding-left: 0;
  list-style: none;
  font-size: 13px;
  color: #64748b;
}

.sm-cap-benefit-sublist li::before {
  content: "– ";
}

.plan-compare-btn {
  margin-top: 24px;
  margin-left: 20px;
  display: flex;
  align-items: center;
}

/* ---- Quote Table ---- */
.sm-cap-quote-table {
  /* width: 100%;
  border-collapse: collapse; */
}

.sm-cap-quote-row {
  /* border-bottom: 1px solid #f8fafc; */
  display: flex;
  justify-content: space-between;
  padding: 8px 30px;
  align-items: center;
}

/* .sm-cap-quote-row:nth-child(odd) {
  background-color: rgba(185, 187, 189, 0.1);
} */

.sm-cap-quote-label {
  font-size: 14px;
  color: #475569;
  vertical-align: top;
}

.sm-cap-quote-value {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  vertical-align: top;
}

.sm-cap-quote-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sm-cap-quote-items li {
  padding: 1px 0;
}

/* ---- Card Footer / CTA ---- */
.sm-cap-card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  gap: 12px;
}

.plan-price {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  margin-top: 20px;
  text-align: center;
}

.plan-price .days {
  font-size: 12px;
  color: #9e9e9e;
}

.sm-cap-enroll-btn {
  display: block;
  width: 170px;
  background-color: #e93e34;
  border-radius: 20px;
  height: 40px;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  line-height: 40px;
  padding: 0 30px;
  text-decoration: none !important;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.sm-cap-enroll-btn:hover {
  background: #e93e34;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  text-decoration: none;
  color: #fff;
}

/* ============================================
   Empty State
   ============================================ */
.sm-cap-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}

/* ============================================
   Responsive Tweaks
   ============================================ */
@media (max-width: 480px) {
  .sm-choose-a-plan {
    padding: 16px 12px;
  }

  .sm-cap-card-header {
    padding: 20px 16px 16px;
  }

  .sm-cap-section {
    /* padding: 16px; */
  }

  .sm-cap-card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    gap: 12px;
  }

  .sm-cap-price-amount {
    font-size: 30px;
  }

  .sm-cap-tab {
    padding: 10px 16px;
    font-size: 14px;
  }
}
