/* Copyright (c) Zhmara X. All rights reserved.
   Proprietary and confidential. Unauthorized copying of this file, via any medium, is prohibited. See LICENSE.txt. */

.zx-pricing {
    --zx-primary: #7539FF;
    --zx-primary-soft: #F1EBFF;
    --zx-text: #1F2937;
    --zx-muted: #6B7280;
    --zx-line: #E5E7EB;
    --zx-yes: #16A34A;
    --zx-no: #C0C4CC;
    color: var(--zx-text);
    padding: 8px 0 24px;
}

/* Header */
.zx-head {
    text-align: center;
    margin-bottom: 28px;
}

.zx-head h2 {
    font-weight: 700;
    margin-bottom: 6px;
}

.zx-head p {
    color: var(--zx-muted);
    margin-bottom: 18px;
}

.zx-period {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    margin-top: 6px;
    border-radius: 999px;
    background: #F3F4F6;
}

.zx-period button {
    border: 0;
    background: transparent;
    color: var(--zx-muted);
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.zx-period button.active {
    background: var(--zx-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(117, 57, 255, .3);
}

/* Cards: wraps to as many columns as fit, works for any number of plans */
:where(.zx-pricing) .zx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    justify-content: center;
    gap: 20px;
}

:where(.zx-pricing) .zx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--zx-line);
    border-top: 4px solid var(--zx-primary);
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 3px 18px -4px rgba(20, 45, 100, .12);
    transition: transform .2s, box-shadow .2s;
}

:where(.zx-pricing) .zx-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -6px rgba(20, 45, 100, .2);
}

:where(.zx-pricing) .zx-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}

:where(.zx-pricing) .zx-card h6 {
    margin: 18px 0 8px;
    font-weight: 700;
    color: var(--zx-muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}

:where(.zx-pricing) .zx-desc {
    color: var(--zx-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.zx-badge {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    background: var(--zx-primary-soft);
    color: var(--zx-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

:where(.zx-pricing) .zx-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 6px 0 4px;
}

.zx-amount {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
}

.zx-unit {
    color: var(--zx-muted);
    font-size: 14px;
}

:where(.zx-pricing) .zx-total {
    font-size: 14px;
    color: var(--zx-muted);
}

:where(.zx-pricing) .zx-total b {
    color: var(--zx-text);
}

.zx-meter {
    margin: 14px 0 16px;
}

.zx-meter-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--zx-muted);
    margin-bottom: 4px;
}

.zx-meter-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--zx-line);
    overflow: hidden;
}

.zx-meter-bar span {
    display: block;
    height: 100%;
    background: var(--zx-primary);
    border-radius: 999px;
}

.zx-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--zx-primary);
    background: var(--zx-primary);
    color: #fff;
    font-weight: 600;
    transition: background .2s, color .2s;
}

.zx-btn:hover {
    background: #5B20E6;
    color: #fff;
}

.zx-btn-sm {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.zx-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: start;
}

.zx-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 5px 0;
    font-size: 14px;
}

.zx-list li i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.zx-list li small {
    display: block;
    color: var(--zx-muted);
    font-size: 12px;
}

.zx-list .zx-na {
    color: var(--zx-no);
}

.zx-list .zx-na span {
    text-decoration: line-through;
}

.zx-yes {
    color: var(--zx-yes);
}

.zx-no {
    color: var(--zx-no);
}

/* Custom plan */
.zx-custom {
    border-top-color: #F59E0B;
    background: linear-gradient(180deg, #FFFBEB 0, #fff 140px);
}

.zx-custom .zx-amount {
    font-size: 26px;
}

.zx-custom .zx-btn {
    background: #F59E0B;
    border-color: #F59E0B;
}

.zx-custom .zx-btn:hover {
    background: #D97706;
}

/* "Compare all features" link at the bottom of each card */
.zx-more {
    margin-top: auto;
    padding-top: 12px;
    border: 0;
    background: transparent;
    color: var(--zx-primary);
    font-weight: 600;
    font-size: 14px;
    text-align: start;
    cursor: pointer;
}

.zx-more:hover {
    text-decoration: underline;
}

.zx-more span {
    color: var(--zx-muted);
    font-weight: 400;
}

/* Comparison section (target of "Compare all features") */
html:has(.zx-pricing) {
    scroll-behavior: smooth;
}

.zx-compare {
    margin-top: 40px;
    scroll-margin-top: 20px;
    outline: none;
}

.zx-compare h4 {
    text-align: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.zx-compare-period {
    text-align: center;
    margin-bottom: 14px;
}

/* Comparison table */
.zx-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--zx-line);
    border-radius: 12px;
}

.zx-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.zx-table th,
.zx-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--zx-line);
    text-align: center;
    vertical-align: middle;
    min-width: 150px;
}

.zx-table thead th {
    background: #FAFAFF;
    position: sticky;
    top: 0;
}

.zx-table th[scope="row"],
.zx-table thead th:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background: #fff;
    text-align: start;
    font-weight: 600;
    min-width: 190px;
}

.zx-table thead th:first-child {
    background: #FAFAFF;
    z-index: 2;
}

.zx-table th[scope="row"] i {
    color: var(--zx-primary);
    margin-inline-end: 8px;
}

.zx-th-name {
    display: block;
    font-weight: 700;
}

.zx-th-price {
    display: block;
    font-weight: 400;
    color: var(--zx-muted);
    font-size: 12px;
}

.zx-table td i {
    font-size: 18px;
}

.zx-table td small {
    display: block;
    color: var(--zx-muted);
    font-size: 12px;
    white-space: nowrap;
}

.zx-table .zx-group th {
    background: var(--zx-primary-soft);
    color: var(--zx-primary);
    text-align: start;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.zx-table tbody tr:not(.zx-group):hover td,
.zx-table tbody tr:not(.zx-group):hover th {
    background: #FBFAFF;
}

.zx-table tfoot td,
.zx-table tfoot th {
    border-bottom: 0;
}

@media (max-width: 575px) {
    :where(.zx-pricing) .zx-grid {
        grid-template-columns: 1fr;
    }

    .zx-amount {
        font-size: 28px;
    }

    .zx-table th[scope="row"],
    .zx-table thead th:first-child {
        min-width: 140px;
    }
}
