/* German labels share Tutor's existing type, spacing and theme tokens. */
/* The standalone editor supplies its own body class instead of body_class(). */
html[lang|="de"] #tutor-certificate-builder .tutor-certificate-builder-header-logo {
    gap: 0;
}

html[lang|="de"] #tutor-certificate-builder :is(.tcb-publish-btn, .tcb-preview-btn) {
    width: auto;
    min-width: 96px;
    padding-inline: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

html[lang|="de"] #tutor-certificate-builder .tcb-sidebar-ul-top > li > a > p {
    max-width: 100%;
    padding-inline: 4px;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
}

body.ia-german-interface .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav ul li a {
    min-height: 44px;
    box-sizing: border-box;
}

body.ia-german-interface .tutor-dashboard-sidebar-nav a > span:last-child,
body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover a > span:last-child {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.ia-german-interface .tutor-dashboard-sidebar-nav a > .tutor-icon,
body.ia-german-interface .tutor-dashboard-sidebar-nav a > svg,
body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover a > .tutor-icon,
body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover a > svg {
    flex-shrink: 0;
}

/* Native Tutor rules suppress outlines; restore a distinct keyboard state. */
body.ia-german-interface .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav ul li a:focus-visible,
body.ia-german-interface .tutor-dashboard-nav-mobile-list > li > :is(a, button):focus-visible,
body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover a:focus-visible,
body.ia-german-interface .tutor-profile-settings-tab button:focus-visible,
body.ia-german-interface .isa-cat :is(a, button):focus-visible {
    outline: 2px solid var(--tutor-text-brand, var(--ia-emerald, #047857)) !important;
    outline-offset: 2px;
}

body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover {
    width: max-content;
    min-width: min(220px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(70dvh, 480px);
    overflow-y: auto;
}

body.ia-german-interface .tutor-dashboard-nav-mobile-more-popover ul li a {
    min-height: 44px;
    box-sizing: border-box;
}

/* Translated tabs retain their spelling and adapt to the available width. */
body.ia-german-interface :is(.tutor-dashboard-layout, .tutor-profile-settings-section) .tutor-tabs-tab {
    text-transform: none;
}

body.ia-german-interface .tutor-profile-settings-tab button {
    min-height: 44px;
    white-space: normal;
    text-align: start;
}

body.ia-german-interface .tutor-profile-settings-tab button > div,
body.ia-german-interface .tutor-profile-settings-tab-content,
body.ia-german-interface .tutor-preferences-setting-content,
body.ia-german-interface .tutor-profile-header-left {
    min-width: 0;
}

body.ia-german-interface .tutor-profile-settings-tab button > div,
body.ia-german-interface .tutor-preferences-setting-title,
body.ia-german-interface .tutor-profile-header-title {
    overflow-wrap: break-word;
}

/* Catalog controls stay legible when German labels span two lines. */
body.ia-german-interface .isa-cat-filter {
    max-width: 100%;
    flex-wrap: wrap;
}

body.ia-german-interface .isa-cat-fbtn {
    min-height: 44px;
    line-height: 1.4;
}

body.ia-german-interface .isa-cat-foot {
    flex-wrap: wrap;
}

body.ia-german-interface .isa-cat-btn {
    min-height: 44px;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.4;
}

body.ia-german-interface .isa-cat-btn svg {
    flex-shrink: 0;
}

/* Repeated task screens appear immediately; keep occasional hero feedback. */
body.ia-german-interface .tutor-dashboard-content > .tutor-row > [class*="tutor-col"],
body.ia-german-interface .tutor-dashboard-content > [class*="tutor-card"],
body.ia-german-interface .tutor-dashboard-stats > * {
    animation: none;
}

/* Short, interruptible feedback uses the incumbent dashboard easing. */
body.ia-german-interface .isa-cat-card,
body.ia-german-interface .isa-cat-btn,
body.ia-german-interface .isa-cat-btn svg {
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* A course image is content; it remains steady while the action responds. */
body.ia-german-interface .isa-cat-media img,
body.ia-german-interface .isa-cat-card:hover .isa-cat-media img {
    transition: none;
    transform: none;
}

body.ia-german-interface .isa-cat-card:hover,
body.ia-german-interface .isa-cat-btn:hover,
body.ia-german-interface .isa-cat-btn:hover svg {
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    body.ia-german-interface .isa-cat-card:hover {
        transform: translateY(-2px);
    }

    body.ia-german-interface .isa-cat-btn:hover {
        transform: translateY(-1px);
    }

    body.ia-german-interface .isa-cat-btn:hover svg {
        transform: translateX(2px);
    }

    body.ia-german-interface .isa-cat-btn--ghost:hover {
        transform: none;
    }
}

@media (max-width: 767px) {
    /* Keep Tutor's native flex placement; popovers rely on the trigger's visible center. */
    body.ia-german-interface .tutor-dashboard-nav-mobile-list > li {
        min-width: 44px;
    }

    body.ia-german-interface .tutor-dashboard-nav-mobile-list > li > :is(a, button) {
        width: 100%;
        min-height: 44px;
    }

    body.ia-german-interface .tutor-dashboard-nav-mobile-text {
        max-width: 100%;
        white-space: normal;
        text-align: center;
        line-height: 1.35;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    body.ia-german-interface .tutor-preferences-setting-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    body.ia-german-interface .tutor-preferences-setting-content {
        flex: 0 1 auto;
    }

    body.ia-german-interface .tutor-preferences-setting-action {
        max-width: 100%;
    }
}

/* Honor both the operating system and Tutor's own motion preference. */
[data-tutor-motion="reduce"] body.ia-german-interface .isa-cat :is(.isa-cat-card, .isa-cat-btn, .isa-cat-btn svg),
body.ia-german-interface[data-tutor-motion="reduce"] .isa-cat :is(.isa-cat-card, .isa-cat-btn, .isa-cat-btn svg) {
    transform: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body.ia-german-interface .isa-cat :is(.isa-cat-card, .isa-cat-btn, .isa-cat-btn svg) {
        transform: none !important;
        transition: none !important;
    }
}
