/*
 * Preserve the source Startup desktop design.
 * The PHP table renderer uses adm-table-wrap while the source component CSS
 * names its scroll container adm-table-scroll. Keep the same local scrolling
 * behavior for that renderer without changing table typography or columns.
 * Mobile corrections are maintained separately in design-mobile-fixes.css.
 */
@media (min-width: 769px) {
    /* List cards must contain their original CTA row and padding without clipping. */
    .public-app .p-programs-grid.list .p-program-card {
        height: auto;
        min-height: 185px;
    }

    .workspace .adm-table-wrap {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Keep Korean words intact in the source sidebar encouragement copy. */
    .workspace .sidebar-message strong {
        word-break: keep-all;
    }

    /* The source tab underline overlaps its border by 1px; scroll only across. */
    .workspace .op-tabs {
        overflow-y: hidden;
    }

    /* PHP section links keep link semantics and the source button tab design. */
    .workspace .op-tabs > a {
        flex: 1;
        padding: 13px 16px;
        border: 0;
        border-bottom: 3px solid transparent;
        background: transparent;
        color: #5e7399;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.5;
        margin-bottom: -1px;
        min-width: max-content;
        text-align: center;
    }

    .workspace .op-tabs > a:hover {
        background: #f7faff;
        color: #0755ff;
    }

    .workspace .op-tabs > a.active {
        color: #0755ff;
        border-bottom-color: #0755ff;
    }

    .workspace .adm-tabs {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
    }

    .workspace .adm-detail-tabs > a {
        position: relative;
        background: transparent;
        border: 0;
        padding: 11px 3px;
        font-size: 10px;
        font-weight: 600;
        color: #8591a8;
        white-space: nowrap;
    }

    .workspace .adm-detail-tabs > a.active {
        color: #0759f7;
    }

    .workspace .adm-detail-tabs > a.active::after {
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        content: "";
        background: #0759f7;
    }

    /* Native dialogs use the source React modal backdrop and heading tokens. */
    body.startup-portal-theme dialog.adm-modal::backdrop {
        background: #0b193c66;
        backdrop-filter: blur(3px);
    }

    body.startup-portal-theme dialog.adm-modal > h2:first-child {
        font-size: 18px;
        letter-spacing: -.4px;
    }

    /* Retain Moodle's policy link and align it with the source footer tokens. */
    body.startup-portal-theme > .tool_dataprivacy {
        padding: 12px 4%;
        border-top: 1px solid #e6edf7;
        background: #fcfdff;
        color: #34568a;
        font-size: 12px;
        line-height: 1.6;
    }

    body.startup-portal-theme > .tool_dataprivacy a {
        text-decoration: underline;
        text-underline-offset: 2px;
    }
}

/* Preserve the source admin detail-tab type size at its tablet breakpoint. */
@media (min-width: 769px) and (max-width: 1000px) {
    .workspace .adm-detail-tabs > a {
        font-size: 12px;
    }
}
