/* ── CCG Bundle Page v12 Layout + Chart ── */

/* Chart + Bundle 2-col wrapper (desktop) */
#ccg-chart-bundle-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Chart column: 45% on desktop */
#ccg-comparison-chart {
    flex: 0 0 44%;
    max-width: 44%;
}

#ccg-comparison-chart h2 {
    color: #13294B;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    line-height: 1.3;
}

#ccg-comparison-chart .chart-sub {
    text-align: center;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 16px;
}

#ccg-comparison-chart .chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#ccg-comparison-chart table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 360px;
    border: 1px solid #d0dce8;
}

/* Bundle column: takes remaining space */
#ccg-chart-bundle-wrapper > .bundle_form {
    flex: 1;
    min-width: 0;
}

/* ATC clone: ensure width on desktop */
#ccg-atc-clone {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Mobile: stack, bundle first then chart ── */
@media (max-width: 980px) {
    #ccg-chart-bundle-wrapper {
        flex-direction: column;
    }

    /* Bundle on top on mobile */
    #ccg-chart-bundle-wrapper > .bundle_form {
        order: 1;
        width: 100%;
    }

    /* Chart below on mobile */
    #ccg-comparison-chart {
        order: 2;
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    /* ATC clone: keep full width, ensure visible on mobile */
    #ccg-atc-clone {
        display: block !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
