/**
 * Cost Calculator Charts block – enhanced table and cost-by-model list
 */

.cost-calculator-charts-section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.cost-calculator-charts-inner {
    max-width: 720px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 60/40 layout when side image is set */
.cost-calculator-charts-inner--with-image {
    max-width: none;
    flex-direction: row;
    align-items: stretch;
    gap: 32px;
}

/* Image on left: swap columns */
.cost-calculator-charts-inner--with-image.cost-calculator-charts-inner--image-left {
    flex-direction: row-reverse;
}

.cost-calculator-charts-calculator {
    flex: 0 0 auto;
    width: 100%;
}

.cost-calculator-charts-inner--with-image .cost-calculator-charts-calculator {
    width: 60%;
}

.cost-calculator-charts-image {
    flex: 0 0 40%;
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.cost-calculator-charts-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* ----- Chart 1: Show how we calculate this (toggle + table) ----- */
.cost-calculator-chart--calculation {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cost-calculator-chart-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cost-calculator-chart-toggle:hover {
    background: #f9fafb;
    color: #1d4ed8;
}

.cost-calculator-chart-toggle:focus {
    outline: none;
    background: #f3f4f6;
}

.cost-calculator-chart-toggle[aria-expanded="true"] .cost-calculator-chart-toggle-icon {
    transform: rotate(180deg);
}

.cost-calculator-chart-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.cost-calculator-chart-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.cost-calculator-chart--calculation.is-open .cost-calculator-chart-content {
    max-height: 600px;
}

.cost-calculator-chart--calculation.is-open .cost-calculator-chart-content[aria-hidden="true"] {
    display: block;
}

.cost-calculator-table-wrap {
    padding: 0 20px 20px;
}

.cost-calculator-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #374151;
}

.cost-calculator-table thead {
    border-bottom: 2px solid #e5e7eb;
}

.cost-calculator-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.01em;
}

.cost-calculator-table th:last-child {
    text-align: right;
}

.cost-calculator-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.cost-calculator-table tbody tr:last-child {
    border-bottom: none;
}

.cost-calculator-table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.cost-calculator-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.cost-calculator-table td strong {
    font-weight: 700;
    color: #111827;
}

/* ----- Chart 2: Example cost by model ----- */
.cost-calculator-chart--models {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px 24px 24px 28px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #3b82f6;
}

.cost-calculator-chart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cost-calculator-chart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    flex-shrink: 0;
}

.cost-calculator-chart-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.cost-calculator-chart-intro {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.cost-calculator-model-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cost-calculator-model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
    color: #374151;
}

.cost-calculator-model-item:last-child {
    border-bottom: none;
}

.cost-calculator-model-name {
    font-weight: 500;
}

.cost-calculator-model-credits {
    font-weight: 500;
    color: #6b7280;
}

@media (max-width: 768px) {
    .cost-calculator-charts-inner--with-image {
        flex-direction: column;
    }

    .cost-calculator-charts-inner--with-image .cost-calculator-charts-calculator {
        width: 100%;
    }

    .cost-calculator-charts-image {
        flex: none;
        min-height: 240px;
    }

    .cost-calculator-charts-image-img {
        min-height: 240px;
    }
}

@media (max-width: 640px) {
    .cost-calculator-charts-section {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .cost-calculator-chart-toggle {
        padding: 14px 16px;
        font-size: 15px;
    }

    .cost-calculator-table-wrap {
        padding: 0 16px 16px;
        overflow-x: auto;
    }

    .cost-calculator-table {
        font-size: 14px;
        min-width: 320px;
    }

    .cost-calculator-table th,
    .cost-calculator-table td {
        padding: 10px 12px;
    }

    .cost-calculator-chart--models {
        padding: 20px 20px 20px 24px;
    }

    .cost-calculator-chart-title {
        font-size: 17px;
    }
}
