/* =========================================================
   pricing.css
   用途：价格页面专用样式（版本对比表格）
========================================================= */

/* ---------- Variables ---------- */
:root {
    /* Colors */
    --bfk-white: #ffffff;
    --bfk-primary: #3056d3;

    /* Text colors */
    --bfk-text-primary: #212b36;
    --bfk-text-secondary: rgba(99, 115, 129, 0.95);

    /* Borders & Shadows */
    --bfk-border: rgba(0, 0, 0, 0.08);
    --bfk-shadow: 0px 20px 95px rgba(201, 203, 204, 0.25);
    --bfk-shadow-sm: 0px 18px 60px rgba(201, 203, 204, 0.16);

    /* Border radius */
    --bfk-radius: 10px;
}

/* ---------- Pricing comparison table ---------- */
.pricing-comparison-section {
    padding-top: 40px;
}

.pricing-table-wrapper {
    background: var(--bfk-white);
    border: 1px solid var(--bfk-border);
    border-radius: var(--bfk-radius);
    padding: 24px;
    box-shadow: var(--bfk-shadow-sm);
    overflow: visible;
}

.pricing-table {
    width: 100%;
    margin-bottom: 0;
}

.pricing-table-wrapper .table-responsive {
    overflow: visible;
}

.pricing-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pricing-table thead th {
    color: var(--bfk-white);
    font-weight: 600;
    font-size: 15px;
    padding: 18px 16px;
    border: none;
    text-align: center;
    vertical-align: middle;
}

.pricing-table thead th:first-child {
    text-align: left;
    border-top-left-radius: 8px;
}

.pricing-table thead th:last-child {
    border-top-right-radius: 8px;
}

.pricing-table tbody tr {
    transition: background-color 0.2s ease;
}

.pricing-table tbody tr:hover {
    background-color: rgba(48, 86, 211, 0.03);
}

.pricing-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.pricing-table tbody tr:nth-child(even):hover {
    background-color: rgba(48, 86, 211, 0.05);
}

.pricing-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--bfk-border);
    color: var(--bfk-text-secondary);
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
}

.pricing-table tbody tr.pricing-group-row,
.pricing-table tbody tr.pricing-group-row:hover,
.pricing-table tbody tr.pricing-group-row:nth-child(even),
.pricing-table tbody tr.pricing-group-row:nth-child(even):hover {
    background-color: rgba(48, 86, 211, 0.08);
}

.pricing-table tbody tr.pricing-group-row td {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1f3a8a;
    text-align: left;
    letter-spacing: 0.2px;
    border-bottom: 1px solid var(--bfk-border);
}

.pricing-table tbody tr.pricing-group-row:first-child td {
    border-top: none;
}

.pricing-table tbody td:first-child {
    font-weight: 600;
    color: var(--bfk-text-primary);
    text-align: left;
    min-width: 180px;
}

.pricing-table tbody tr.pricing-group-row td:first-child {
    min-width: 0;
    font-weight: 700;
    color: #1f3a8a;
}

.pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.pricing-label-with-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pricing-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    cursor: help;
    outline: none;
}

.pricing-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    background: #ffffff;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.pricing-tip:hover .pricing-tip-icon,
.pricing-tip:focus .pricing-tip-icon,
.pricing-tip:focus-visible .pricing-tip-icon {
    transform: translateY(-1px);
    color: #3056d3;
    border-color: #3056d3;
    background-color: #eef2ff;
}

.pricing-tip:focus-visible {
    border-radius: 50%;
    outline: 2px solid rgba(48, 86, 211, 0.35);
    outline-offset: 2px;
}

.pricing-tip-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 8px);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    width: max-content;
    max-width: 360px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #1f2937;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: left;
}

.pricing-tip-popup::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #1f2937;
}

.pricing-tip:hover .pricing-tip-popup,
.pricing-tip:focus .pricing-tip-popup,
.pricing-tip:focus-visible .pricing-tip-popup {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Highlight recommended column */
.pricing-table thead th.recommended {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
}

.pricing-table thead th.recommended::after {
    content: '推荐';
    position: absolute;
    top: 6px;
    right: 14px;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-table tbody td.recommended {
    background-color: rgba(245, 87, 108, 0.05);
    font-weight: 600;
    color: var(--bfk-primary);
}

/* Check/cross icons */
.pricing-check {
    color: #10b981;
    font-weight: 600;
}

.pricing-cross {
    color: #ef4444;
}

.pricing-table-cta {
    margin-top: 24px;
    text-align: center;
}

.pricing-table-cta .ud-main-btn + .ud-main-btn {
    margin-left: 12px;
}

/* Responsive table */
@media (max-width: 991px) {
    .pricing-table-wrapper {
        padding: 16px;
        overflow-x: auto;
    }

    .pricing-table-wrapper .table-responsive {
        overflow-x: auto;
        overflow-y: visible;
    }

    .pricing-table {
        min-width: 700px;
    }

    .pricing-table thead th,
    .pricing-table tbody td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .pricing-table tbody td:first-child {
        min-width: 150px;
    }

    .pricing-tip-popup {
        left: 0;
        max-width: calc(100vw - 48px);
        transform: translate(0, 8px);
    }

    .pricing-tip-popup::after {
        left: 12px;
        transform: rotate(45deg);
    }

    .pricing-tip:hover .pricing-tip-popup,
    .pricing-tip:focus .pricing-tip-popup,
    .pricing-tip:focus-visible .pricing-tip-popup {
        transform: translate(0, 0);
    }
}

@media (max-width: 767px) {
    .pricing-table-wrapper {
        padding: 12px;
    }

    .pricing-table {
        min-width: 600px;
    }

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

    .pricing-table tbody td:first-child {
        min-width: 120px;
    }

    .pricing-tip-popup {
        max-width: calc(100vw - 32px);
    }
}
