/*
 * TheBodyProject – app styles on top of the Kendo Bootstrap theme (light + dark, ADR-019).
 * Colours come from the theme's CSS variables (--kendo-color-*) so they follow light/dark.
 * Fallback values apply only if the theme could not be loaded.
 */

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--kendo-font-family, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    font-size: 14px;
    color: var(--kendo-color-on-app-surface, #212529);
    background: var(--kendo-color-surface, #f8f9fa);
}

#tbp-app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ---- App bar ---------------------------------------------------------------------- */

#tbp-appbar {
    flex: 0 0 auto;
}

.tbp-app-title {
    font-size: 18px;
    font-weight: 600;
}

/* Round light/dark button on the primary-coloured app bar (ADR-019).
   The ring is drawn on the inner icon span: the Kendo theme forces border and box-shadow of flat
   buttons with !important. */
#tbp-appbar .tbp-theme-toggle.k-button {
    width: 38px;
    height: 38px;
    padding: 0;
    color: #fff;
}

#tbp-appbar .tbp-theme-toggle .tbp-theme-icon {
    width: 36px;   /* button is 38px incl. its 1px (transparent) border */
    height: 36px;
    flex-shrink: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

#tbp-appbar .tbp-theme-toggle.k-button:hover,
#tbp-appbar .tbp-theme-toggle.k-button:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
}

.tbp-theme-icon {
    display: inline-flex;
}

/* ---- Drawer + content ------------------------------------------------------------- */

.k-drawer-container {
    flex: 1 1 auto;
    min-height: 0;
}

.tbp-drawer-icon {
    display: inline-flex;
    width: 16px;
    justify-content: center;
}

#tbp-content {
    height: 100%;
    overflow: auto;
    outline: none;
}

.tbp-view {
    max-width: 880px;
    padding: 24px 32px 48px;
}

.tbp-view h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.tbp-view h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 18px;
}

.tbp-lead {
    margin: 0 0 24px;
    color: var(--kendo-color-subtle, #555);
    font-size: 15px;
}

.tbp-card {
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--kendo-color-app-surface, #fff);
    border: 1px solid var(--kendo-color-border, #dee2e6);
    border-radius: 6px;
}

.tbp-view a {
    color: var(--kendo-color-primary-on-surface, var(--kendo-color-primary, #0d6efd));
}

.tbp-card p:last-child,
.tbp-card ul:last-child {
    margin-bottom: 0;
}

.tbp-placeholder {
    border-style: dashed;
    color: var(--kendo-color-subtle, #555);
}

/* ---- Info tip (question mark) ----------------------------------------------------- */

.tbp-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--kendo-color-primary, #0d6efd);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.k-tooltip {
    max-width: 300px;
}

.tbp-info:hover,
.tbp-info:focus-visible {
    background: var(--kendo-color-primary, #0d6efd);
    color: var(--kendo-color-on-primary, #fff);
}

/* ---- Dialogs ---------------------------------------------------------------------- */

.tbp-dialog-list {
    margin: 0;
    padding-left: 20px;
}

.tbp-dialog-list li:first-child {
    margin-bottom: 8px;
    margin-left: -20px;
    list-style: none;
}

/* ---- Fatal error (libraries could not be loaded) ----------------------------------
 * Fixed colours on purpose: shown when the theme may be missing too. */

.tbp-fatal {
    max-width: 560px;
    margin: 48px auto;
    padding: 20px 24px;
    background: #fff4f4;
    border: 1px solid #e0a0a0;
    border-radius: 6px;
    color: #7a1f1f;
    font-size: 15px;
}

@media (max-width: 600px) {
    .tbp-view {
        padding: 16px;
    }
}
