/* Remote chart page only. Selectors stay off the other plugin's page-chart template. */
@media (max-width: 1000px) {
    .page-template-page-chart-remote-php .page-hero-section {
        display: none !important;
    }
    /* Scroll under the fixed 86px bar, not with document-flow padding
       (padding would scroll away and the chart would tuck under the menu). */
    html:has(.page-template-page-chart-remote-php),
    .page-template-page-chart-remote-php {
        overflow: hidden;
        height: 100%;
        height: 100dvh;
        padding-top: 0 !important;
    }
    .hdcr-page-main {
        position: fixed;
        top: 86px;
        top: calc(86px + env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        bottom: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 1.25rem;
    }
    .hdcr-result,
    .hdcr-result.mt-4 {
        margin-top: 0 !important;
        padding-top: 1.25rem;
    }
    .hdcr-result-name {
        display: none !important;
    }
}

@media (min-width: 1001px) {
    .hdcr-result,
    .hdcr-result.mt-4 {
        margin-top: 1.5rem !important;
        padding-top: 50px;
    }
}

.hdcr-result-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hdcr-result-image img {
    max-width: 100%;
    height: auto;
}

.hdcr-result-info .table th,
.hdcr-result-info .table td {
    vertical-align: middle;
    padding: 0.75rem 0.9rem;
}

.hdcr-result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hdcr-result-actions .btn {
    width: 100%;
}

/* <= 999px: image, table, then buttons stacked at the bottom */
@media (max-width: 999px) {
    .hdcr-result-layout {
        flex-direction: column;
    }
    .hdcr-result-actions {
        flex-direction: column;
    }
}

/* >= 1000px: image left, table right, two buttons in a row under the table */
@media (min-width: 1000px) {
    .hdcr-result-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .hdcr-result-image {
        flex: 0 0 58.333%;
        max-width: 58.333%;
        padding-right: 1rem;
    }
    .hdcr-result-info {
        flex: 1 1 41.667%;
        max-width: 41.667%;
    }
    .hdcr-result-actions {
        flex-direction: row;
    }
    .hdcr-result-actions .btn {
        flex: 1 1 0;
        width: auto;
    }
}

/* Five columns sit in the narrow info column. Keep each label on one line and scroll if needed. */
.hdcr-arrows-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hdcr-result-info .hdcr-arrows {
    width: max-content;
    min-width: 100%;
    margin-bottom: 1rem;
}

.hdcr-result-info .hdcr-arrows th,
.hdcr-result-info .hdcr-arrows td {
    white-space: nowrap;
    padding: 0.4rem 0.45rem;
    font-size: 0.875rem;
    text-align: center;
}

/* Section title matches 輪迴交叉: same size, weight, and padding as the property-table headers. */
.hdcr-result-info .hdcr-arrows tr.bg-secondary > th {
    padding: 0.75rem 0.9rem;
    font-size: inherit;
    font-weight: 700;
}


