/* ---------------------------------------------------------------------
   การ์ดแพ็กเกจและราคา (src/lib/pricing-cards.ts) — ใช้ร่วมกันที่ index.html และ package-compare.html
   ใส่ class "pc-plans" ที่กล่องที่วาดการ์ด · สีปุ่ม = น้ำเงินโลโก้ DAccount (#315F93)
   --------------------------------------------------------------------- */
.pc-plans {
  --lp-blue: #007bff;
  --lp-blue-dark: #0062cc;
  --lp-blue-light: #e6f2ff;
  --lp-green: #00A878;
  --lp-text: #0F1923;
  --lp-text-muted: #5E6E82;
  --lp-text-light: #9EAFC2;
  --lp-surface: #F5F8FC;
  --lp-border: #DDE4EF;
  --lp-brand: #315f93;
  --lp-brand-hover: #284f7b;
}

.pc-status { text-align: center; color: var(--lp-text-light); padding: 48px 0; }

.pc-cycle { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 8px 0 40px; }
.pc-seg {
  display: inline-flex; padding: 4px; gap: 4px;
  border: 1px solid var(--lp-border); border-radius: 999px; background: #fff;
}
.pc-seg button {
  min-width: 112px; padding: 10px 28px; border-radius: 999px;
  font: inherit; font-size: 17px; color: var(--lp-text-muted); background: transparent;
  border: 0; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s;
}
.pc-seg button:hover:not(.is-active) { color: var(--lp-text); background: var(--lp-surface); }
.pc-seg button.is-active { color: #fff; font-weight: 700; background: var(--lp-brand); box-shadow: 0 2px 8px rgba(49, 95, 147, .3); }
.pc-seg button:focus-visible { outline: 2px solid var(--lp-brand); outline-offset: 2px; }
/* รายเดือน/รายปี: ปุ่มที่เลือกเป็นแบบ outline สีน้ำเงิน */
.pc-seg-sm button { min-width: 96px; padding: 7px 20px; font-size: 15px; border: 1.5px solid transparent; }
.pc-seg-sm button.is-active { background: #fff; color: var(--lp-brand); border-color: var(--lp-brand); box-shadow: none; }
.pc-pill {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; color: #fff; background: var(--lp-brand); vertical-align: 1px;
}
.pc-save-hint { font-size: 15px; font-weight: 700; color: var(--lp-green); }

.pc-grid {
  display: grid; gap: 20px; align-items: start; justify-items: stretch;
  grid-template-columns: repeat(var(--pc-cols, 3), minmax(0, 1fr));
}
.pc-grid.is-single { max-width: 560px; margin: 0 auto; }
/* จอแคบ: สไลด์ซ้าย-ขวาทีละการ์ด เห็นขอบการ์ดถัดไปนิดหน่อย */
.pc-dots { display: none; }
@media (max-width: 900px) {
  .pc-grid:not(.is-single) {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: min(86%, 440px); gap: 14px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-inline: 7%; padding: 4px 7% 8px; margin: 0 -5%;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .pc-grid:not(.is-single)::-webkit-scrollbar { display: none; }
  .pc-grid:not(.is-single) > .pc-card { scroll-snap-align: center; }
  .pc-grid.is-single { grid-template-columns: 1fr; }
  .pc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .pc-dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--lp-border); transition: width .2s, background .2s;
  }
  .pc-dots button.is-active { width: 24px; background: var(--lp-brand); }
}

.pc-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--lp-border); border-radius: 24px;
  padding: 32px 32px 12px; text-align: left;
}
.pc-card.is-recommended { border-color: #b9d6ff; box-shadow: 0 10px 30px rgba(0, 98, 204, .08); }
.pc-eyebrow { min-height: 24px; font-size: 16px; font-weight: 400; color: var(--lp-blue); }
.pc-card .pc-name { margin: 20px 0 20px; font-size: 36px; font-weight: 700; line-height: 1.35; color: var(--lp-text); }
.pc-card .pc-desc { margin: 0; font-size: 19px; line-height: 1.55; color: var(--lp-text-muted); }
.pc-card .pc-desc strong { font-weight: 700; color: #3d4b5c; }

.pc-price-block { margin-top: 28px; }
.pc-card .pc-price { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: 0; color: var(--lp-blue); }
.pc-card .pc-price-contact { font-size: 30px; color: var(--lp-text); }
.pc-unit { margin-left: 2px; font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--lp-text); }
.pc-saving { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--lp-green); }
.pc-note { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--lp-text-muted); }

/* ป้ายโปรโมชันบนการ์ด (ราคาปกติขีดฆ่า) */
.pc-promo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 15px; color: var(--lp-text-muted); }
.pc-promo-tag { padding: 2px 10px; border-radius: 999px; background: #fef2f2; color: #dc2626; font-weight: 700; font-size: 13px; }

.pc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.pc-cta, .pc-trial {
  display: block; padding: 13px 20px; border-radius: 999px; text-align: center;
  font-size: 17px; text-decoration: none; transition: box-shadow .2s, background .2s;
}
.pc-cta { color: #fff; font-weight: 700; background: var(--lp-brand); }
.pc-cta:hover { color: #fff; background: var(--lp-brand-hover); box-shadow: 0 8px 20px rgba(49, 95, 147, .25); }
.pc-trial { color: var(--lp-text); border: 1px solid var(--lp-text-light); }
.pc-trial:hover { color: var(--lp-text); background: var(--lp-surface); }

.pc-includes {
  display: flex; align-items: center; gap: 12px;
  margin-top: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--lp-border);
  font-size: 17px; font-weight: 700; color: var(--lp-text);
}
.pc-badge { flex: none; color: var(--lp-blue); }

.pc-details { border-bottom: 1px solid var(--lp-border); }
.pc-details.is-open { animation: pc-reveal .25s ease-out; }
@keyframes pc-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pc-details.is-open { animation: none; } }
/* หมวดฟีเจอร์: ไอคอน + หัวข้อ, รายการเช็กใต้หัวข้อ, เส้นคั่นระหว่างหมวด */
.pc-group { padding: 20px 0; border-bottom: 1px solid var(--lp-border); }
.pc-group:last-child { border-bottom: 0; }
.pc-group-head { display: flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 700; color: var(--lp-text); }
.pc-group-icon {
  flex: none; width: 24px; height: 24px; background: var(--lp-text);
  -webkit-mask: var(--pc-icon) center / contain no-repeat; mask: var(--pc-icon) center / contain no-repeat;
}
.pc-card .pc-group-desc { margin: 6px 0 0 40px; font-size: 16px; line-height: 1.6; color: var(--lp-text-muted); }
.pc-features { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pc-features li { display: flex; align-items: flex-start; gap: 16px; font-size: 16px; line-height: 1.55; color: var(--lp-text); }
.pc-check { flex: none; width: 24px; margin-top: 1px; color: var(--lp-blue); }
.pc-integrations-icons { display: flex; gap: 8px; margin: 12px 0 0 40px; }
.pc-integrations-icons span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--lp-border); background: #fff;
}
.pc-integrations-icons img { width: 24px; height: 24px; object-fit: contain; }

.pc-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px -20px 0; padding: 14px; border: 0; border-radius: 16px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--lp-brand); background: transparent;
}
.pc-toggle:hover { background: var(--lp-surface); }
.pc-toggle:focus-visible { outline: 2px solid var(--lp-brand); outline-offset: -2px; }
.pc-toggle svg { transition: transform .2s; }
.pc-toggle svg.is-up { transform: rotate(180deg); }

/* การ์ด "ติดต่อฝ่ายขาย": รายการโมดูลที่รวมอยู่ */
.pc-modules { margin: 20px 0 8px; padding: 16px 18px; border-radius: 16px; background: var(--lp-surface); }
.pc-modules-title { margin-bottom: 10px; font-size: 15px; font-weight: 700; color: var(--lp-text); }
.pc-modules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.pc-modules li { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--lp-text); }
.pc-modules .pc-check { width: 18px; height: 18px; margin-top: 2px; }
@media (max-width: 480px) { .pc-modules ul { grid-template-columns: 1fr; } }

/* การ์ด "ติดต่อฝ่ายขาย": จุดขาย */
.pc-pitch { margin-top: 24px; }
.pc-pitch-title { margin-bottom: 12px; font-size: 18px; font-weight: 700; color: var(--lp-text); }
.pc-pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pc-pitch li { display: flex; align-items: flex-start; gap: 12px; }
.pc-pitch li > span { display: flex; flex-direction: column; gap: 2px; }
.pc-pitch strong { font-size: 16px; font-weight: 700; color: var(--lp-text); }
.pc-pitch-text { font-size: 15px; line-height: 1.55; color: var(--lp-text-muted); }
.pc-pitch .pc-check { margin-top: 1px; }

/* จัดปุ่มของทุกการ์ดให้อยู่ระดับเดียวกันเมื่อวางเรียงข้างกัน */
@media (min-width: 901px) {
  .pc-card .pc-desc { min-height: calc(19px * 1.55 * 3); }
  .pc-price-block { min-height: 130px; }
}

@media (max-width: 767px) {
  .pc-card { padding: 24px 20px 8px; border-radius: 20px; }
  .pc-card .pc-name { font-size: 30px; }
  .pc-card .pc-price { font-size: 28px; }
  .pc-card .pc-desc { font-size: 17px; }
  .pc-seg button { min-width: 0; padding: 10px 24px; }
  .pc-toggle { margin: 10px -12px 0; }
}
