/**
 * GPU Pricing Table - Public Facing
 * Clean, data-focused design for investment analysis
 */

/* ============================================
   WRAPPER
   ============================================ */

.kgc-pricing-table-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 48px 32px;
    font-family: 'Cantarell', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* ============================================
   HEADER
   ============================================ */

.kgc-pt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #E5E5E5;
}

.kgc-pt-header-content {
    flex: 1;
}

.kgc-pt-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    color: #100F0D;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}

.kgc-pt-subtitle {
    font-size: 1rem;
    color: #484B49;
    margin: 0;
}

.kgc-pt-header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.kgc-pt-source-count,
.kgc-pt-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: #484B49;
    white-space: nowrap;
}

.kgc-pt-source-count svg,
.kgc-pt-updated svg {
    color: #7E00FF;
    flex-shrink: 0;
}

.kgc-pt-calc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: #7E00FF;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    margin-top: 4px;
}

.kgc-pt-calc-link:hover {
    background: #6B00DB;
    color: #fff;
}

.kgc-pt-calc-link svg {
    flex-shrink: 0;
}

/* ============================================
   TABLE CONTAINER
   ============================================ */

.kgc-pt-table-container {
    overflow-x: auto;
    margin: 0 -32px;
    padding: 0 32px;
}

.page-template-page-gpu-pricing .kgc-pt-table-container,
.kgc-pricing-table-wide .kgc-pt-table-container {
    margin: 0 -48px;
    padding: 0 48px;
}

/* ============================================
   TABLE
   ============================================ */

.kgc-pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E5E5;
}

/* Header */
.kgc-pt-table thead {
    background: #F8F7FC;
}

.kgc-pt-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #484B49;
    border-bottom: 2px solid #E5E5E5;
    white-space: nowrap;
}

.kgc-pt-table thead th:not(:first-child) {
    text-align: center;
}

.kgc-pt-th-label {
    display: block;
}

/* Provider column header with link */
.kgc-pt-provider-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #484B49;
    text-decoration: none;
    transition: color 0.15s ease;
}

.kgc-pt-provider-link:hover {
    color: #7E00FF;
}

.kgc-pt-provider-link svg {
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.kgc-pt-provider-link:hover svg {
    opacity: 1;
}

/* Body rows */
.kgc-pt-table tbody tr {
    transition: background-color 0.15s ease;
}

.kgc-pt-table tbody tr:hover {
    background-color: #FAFAFA;
}

.kgc-pt-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #F0F0F0;
}

.kgc-pt-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
}

.kgc-pt-table tbody td:not(:first-child) {
    text-align: center;
}

/* Flagship tier row highlight */
.kgc-pt-tier-flagship {
    background: linear-gradient(90deg, rgba(126, 0, 255, 0.04) 0%, transparent 40%);
}

.kgc-pt-tier-flagship:hover {
    background: linear-gradient(90deg, rgba(126, 0, 255, 0.07) 0%, #FAFAFA 40%);
}

/* ============================================
   GPU COLUMN
   ============================================ */

.kgc-pt-col-gpu {
    min-width: 160px;
}

.kgc-pt-gpu-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kgc-pt-gpu-name {
    font-weight: 600;
    color: #100F0D;
    font-size: 0.9375rem;
}

.kgc-pt-gpu-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7E00FF;
    background: linear-gradient(135deg, rgba(126, 0, 255, 0.1) 0%, rgba(174, 0, 255, 0.08) 100%);
    border: 1px solid rgba(126, 0, 255, 0.2);
    border-radius: 4px;
}

/* ============================================
   PROVIDER COLUMNS
   ============================================ */

.kgc-pt-col-provider {
    min-width: 90px;
}

.kgc-pt-price {
    font-weight: 500;
    color: #100F0D;
    font-variant-numeric: tabular-nums;
}

.kgc-pt-price-na {
    color: #C4C4C4;
}

/* ============================================
   LOW / HIGH / AVERAGE COLUMNS
   ============================================ */

.kgc-pt-col-low,
.kgc-pt-col-high,
.kgc-pt-col-avg {
    min-width: 90px;
}

/* Low column - subtle green tint */
.kgc-pt-col-low {
    background: rgba(5, 150, 105, 0.04);
}

.kgc-pt-table thead .kgc-pt-col-low {
    background: rgba(5, 150, 105, 0.08);
    color: #047857;
}

.kgc-pt-price-low {
    font-weight: 600;
    color: #059669;
    font-variant-numeric: tabular-nums;
}

/* High column - subtle amber tint */
.kgc-pt-col-high {
    background: rgba(245, 158, 11, 0.04);
}

.kgc-pt-table thead .kgc-pt-col-high {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

.kgc-pt-price-high {
    font-weight: 600;
    color: #d97706;
    font-variant-numeric: tabular-nums;
}

/* Average column - purple accent */
.kgc-pt-col-avg {
    background: #F8F7FC;
}

.kgc-pt-table thead .kgc-pt-col-avg {
    background: #EDE8F4;
    color: #6b21a8;
}

.kgc-pt-avg-price {
    font-weight: 700;
    font-size: 1rem;
    color: #7E00FF;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   FOOTER
   ============================================ */

.kgc-pt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E5E5E5;
    flex-wrap: wrap;
}

.kgc-pt-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8125rem;
    color: #484B49;
    max-width: 800px;
    line-height: 1.6;
}

.kgc-pt-footer-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #7E00FF;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.kgc-pt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    background: #F8F7FC;
    border-radius: 12px;
    border: 1px dashed #E5E5E5;
}

.kgc-pt-empty svg {
    color: #C4C4C4;
    margin-bottom: 16px;
}

.kgc-pt-empty p {
    color: #484B49;
    margin: 0;
    font-size: 0.9375rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .kgc-pricing-table-wrapper {
        padding: 40px 24px;
    }

    .kgc-pt-table-container {
        margin: 0 -24px;
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .kgc-pricing-table-wrapper {
        padding: 32px 16px;
    }

    .kgc-pt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .kgc-pt-header-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .kgc-pt-calc-link {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .kgc-pt-table-container {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .kgc-pt-table thead th,
    .kgc-pt-table tbody td {
        padding: 12px 14px;
    }

    .kgc-pt-col-gpu {
        min-width: 120px;
    }

    .kgc-pt-col-provider,
    .kgc-pt-col-low,
    .kgc-pt-col-high,
    .kgc-pt-col-avg {
        min-width: 75px;
    }

    .kgc-pt-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .kgc-pt-gpu-badge {
        display: none;
    }
}

@media (max-width: 600px) {
    .kgc-pt-table {
        font-size: 0.8125rem;
    }

    .kgc-pt-table thead th,
    .kgc-pt-table tbody td {
        padding: 10px 10px;
    }

    /* Hide individual provider columns on small screens, show summary */
    .kgc-pt-col-provider {
        display: none;
    }

    .kgc-pt-provider-link svg {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .kgc-pricing-table-wrapper {
        padding: 0;
        max-width: none;
    }

    .kgc-pt-table {
        box-shadow: none;
        border: 1px solid #999;
    }

    .kgc-pt-tier-flagship {
        background: #f5f5f5 !important;
    }

    .kgc-pt-col-low,
    .kgc-pt-col-high,
    .kgc-pt-col-avg {
        background: #f5f5f5 !important;
    }

    .kgc-pt-gpu-badge {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .kgc-pt-provider-link svg {
        display: none;
    }
}
