/*
 * Pricing section on product landing pages (resources/views/landing/partials/pricing.blade.php).
 * Self-contained so it fits every landing design; recolour with --kbp-accent.
 */
.kbp {
    --kbp-accent: #2563eb;
    --kbp-ink: #0f172a;
    --kbp-muted: #64748b;
    --kbp-line: #e2e8f0;
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    color: var(--kbp-ink);
}

.kbp *, .kbp *::before, .kbp *::after { box-sizing: border-box; }

.kbp-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.kbp-eyebrow {
    margin: 0 0 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--kbp-accent);
}

.kbp-title {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.25;
    font-weight: 800;
}

/* Monthly / yearly switch */
.kbp-toggle {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 36px;
    padding: 4px;
    border: 1px solid var(--kbp-line);
    border-radius: 999px;
    background: #fff;
}

.kbp-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--kbp-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.kbp-toggle button.is-active { background: var(--kbp-accent); color: #fff; }

.kbp-save {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.kbp-toggle .is-active .kbp-save { background: rgba(255, 255, 255, .22); color: #fff; }

.kbp[data-kbp-period="monthly"] [data-kbp-show="yearly"],
.kbp[data-kbp-period="yearly"] [data-kbp-show="monthly"] { display: none; }

/* Plan cards */
.kbp-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 720px) {
    .kbp-n2, .kbp-n3, .kbp-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .kbp-n1 { max-width: 420px; margin: 0 auto; }
    .kbp-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kbp-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kbp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    border: 1px solid var(--kbp-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .25);
}

.kbp-card.is-featured { border: 2px solid var(--kbp-accent); box-shadow: 0 22px 44px -22px rgba(37, 99, 235, .45); }

.kbp-ribbon {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--kbp-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.kbp-body { flex: 1 1 auto; padding-bottom: 22px; }
.kbp-name { margin: 0; font-size: 21px; font-weight: 800; }
.kbp-condition { margin: 4px 0 0; color: var(--kbp-accent); font-size: 14px; font-weight: 600; }

.kbp-prices { margin: 18px 0 6px; }
.kbp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.kbp-price strong { font-size: 32px; line-height: 1.15; font-weight: 800; }
.kbp-price span { color: var(--kbp-muted); font-size: 15px; }
.kbp-price-alt { margin-top: 6px; }
.kbp-price-alt strong { font-size: 20px; }

.kbp-install, .kbp-min { margin: 6px 0 0; font-size: 14px; color: var(--kbp-muted); }
.kbp-install b { color: var(--kbp-ink); }
/* Per-unit plans: rate tiers and the calculator */
.kbp-tiers { width: 100%; margin: 12px 0 4px; border-collapse: collapse; font-size: 14px; }
.kbp-tiers th { padding: 0 0 6px; text-align: left; font-size: 12px; font-weight: 700; color: var(--kbp-muted); text-transform: uppercase; letter-spacing: .04em; }
.kbp-tiers th:last-child, .kbp-tiers td:last-child { text-align: right; }
.kbp-tiers td { padding: 7px 0; border-top: 1px solid var(--kbp-line); }
.kbp-tiers td:last-child { font-weight: 800; }

.kbp-calc { margin-top: 14px; padding: 14px; border-radius: 12px; background: #eff6ff; }
.kbp-calc label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 14px; font-weight: 600; }
.kbp-calc input { width: 110px; padding: 8px 10px; border: 1px solid #bfdbfe; border-radius: 8px; background: #fff; color: var(--kbp-ink); font: inherit; font-weight: 700; text-align: right; }
.kbp-calc input:focus { outline: 2px solid var(--kbp-accent); outline-offset: 1px; }
.kbp-calc-out { display: flex; align-items: baseline; gap: 4px; margin-top: 10px; }
.kbp-calc-out strong { font-size: 26px; font-weight: 800; color: var(--kbp-accent); }
.kbp-calc-out span { color: var(--kbp-muted); font-size: 14px; }
.kbp-calc-year { font-size: 14px; color: var(--kbp-muted); }
.kbp-calc-year b { color: var(--kbp-ink); }

.kbp-desc { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: #334155; }

.kbp-features { margin: 16px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--kbp-line); list-style: none; }
.kbp-features li { position: relative; margin: 0 0 9px; padding-left: 26px; font-size: 15px; line-height: 1.5; }
.kbp-features li::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.kbp-cta {
    display: block;
    padding: 12px 18px;
    border: 2px solid var(--kbp-accent);
    border-radius: 12px;
    color: var(--kbp-accent);
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.kbp-cta:hover, .kbp-card.is-featured .kbp-cta { background: var(--kbp-accent); color: #fff; }

/* Quote only */
.kbp-quote { max-width: 620px; margin: 0 auto; padding: 28px; border: 1px solid var(--kbp-line); border-radius: 18px; background: #fff; text-align: center; }
.kbp-quote p { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: #334155; }
.kbp-quote .kbp-cta { display: inline-block; min-width: 220px; background: var(--kbp-accent); color: #fff; }

/* Plan options (choices that change the price) */
.kbp-options { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--kbp-line); }
.kbp-options-group { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--kbp-muted); }
.kbp-options ul { margin: 0; padding: 0; list-style: none; }
.kbp-options li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.kbp-options li b { flex: none; font-weight: 700; color: var(--kbp-ink); }

/* Products sold by module: module list and running total */
.kbp-modules { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .kbp-modules { grid-template-columns: minmax(0, 1fr) 320px; } }
.kbp-module-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.kbp-module { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--kbp-line); border-radius: 14px; background: #fff; cursor: pointer; }
.kbp-module:hover { border-color: var(--kbp-accent); }
.kbp-module input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--kbp-accent); }
.kbp-module.is-core { cursor: default; background: #f8fafc; }
.kbp-module-text { flex: 1 1 auto; min-width: 0; }
.kbp-module-text b { font-size: 16px; }
.kbp-module-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--kbp-muted); }
.kbp-core { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 11px; font-style: normal; font-weight: 700; vertical-align: middle; }
.kbp-module-price { flex: none; text-align: right; font-size: 14px; color: var(--kbp-muted); white-space: nowrap; }
.kbp-module-price b { color: var(--kbp-ink); font-size: 16px; }
.kbp-module-price small { display: block; font-size: 12px; }
.kbp-module-total { position: sticky; top: 20px; padding: 22px; border: 2px solid var(--kbp-accent); border-radius: 18px; background: #fff; box-shadow: 0 22px 44px -22px rgba(37, 99, 235, .45); }
.kbp-module-count { margin: 0 0 10px; font-size: 14px; color: var(--kbp-muted); }
.kbp-module-total dl { margin: 0 0 18px; }
.kbp-module-total dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--kbp-line); }
.kbp-module-total dl div[hidden] { display: none; }
.kbp-module-total dt { font-size: 14px; color: var(--kbp-muted); }
.kbp-module-total dd { margin: 0; font-size: 20px; font-weight: 800; }
.kbp-module-total .kbp-cta { background: var(--kbp-accent); color: #fff; }

/* Add-ons */
.kbp-addons { max-width: 820px; margin: 44px auto 0; padding: 24px; border: 1px solid var(--kbp-line); border-radius: 18px; background: #fff; }
.kbp-addons h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.kbp-addons ul { margin: 0; padding: 0; list-style: none; }
.kbp-addons li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--kbp-line); }
.kbp-addons li:first-child { border-top: 0; }
.kbp-addons li small { display: block; color: var(--kbp-muted); font-size: 13px; font-weight: 400; }
.kbp-addons strong { flex: none; text-align: right; white-space: nowrap; }

.kbp-note { margin: 26px 0 0; text-align: center; font-size: 14px; color: var(--kbp-muted); }

@media (max-width: 575.98px) {
    .kbp { padding: 56px 0; }
    .kbp-toggle button { padding: 8px 14px; }
    .kbp-addons li { flex-direction: column; gap: 4px; }
    .kbp-addons strong { text-align: left; }
}

@media print { .kbp-toggle { display: none; } .kbp [data-kbp-show] { display: flex !important; } }
