/* =============================================================================
   NET5 Terminvereinbarung – Einbettung (iframe) und Kunden-Themes
   Wird nach n5-terminvereinbarung.css geladen.
   Eingeschaltet über die URL:  ?einbetten=1  und/oder  ?theme=<name>
   (siehe Services/EinbettungService.cs). Die Klassen sitzen am Root-Element #app.n5-app.
   Tokens auf html:has(...), damit auch DevExpress-Popups (hängen am body) das Theme bekommen.
   ============================================================================= */

/* ---------- Einbettungsmodus ---------- */
/* Seite so hoch wie ihr Inhalt, damit embed.js die iframe-Höhe anpassen kann */
html:has(.n5-app--embed),
html:has(.n5-app--embed) body {
    height: auto;
    min-height: 0;
    background: transparent;
}

#app.n5-app.n5-app--embed {
    min-height: 0;
    background: transparent;
}

.n5-app--embed .n5-app__bg { display: none; }

/* Kopfzeile: kein Logo, nicht kleben (im iframe gibt es keinen eigenen Scrollbereich) */
.n5-app--embed .n5-header {
    position: static;
    background: transparent;
}
.n5-app--embed .n5-header__logo { display: none; }
/* Erfolgsseite: Kopfzeile enthält nur das Logo -> ganz weglassen */
.n5-app--embed .n5-header:has(.n5-header__inner--logo) { display: none; }

/* Fußleiste direkt unter dem Inhalt statt am Fensterrand */
.n5-app--embed .n5-footer {
    position: static;
    background: transparent;
}

.n5-app--embed .n5-page { padding-top: 20px; padding-bottom: 20px; }

/* ---------- Theme: IDENTICA ---------- */
@font-face {
    font-family: 'Roboto Condensed';
    src: url('../fonts/RobotoCondensed-VariableFont_wght.ttf') format('truetype-variations'),
         url('../fonts/RobotoCondensed-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html:has(.n5-theme-identica) {
    --bs-primary: #005971;
    --font-display: 'Roboto Condensed', 'Roboto', sans-serif;

    --c-brand: #005971;
    --c-brand-dark: #003750;
    --c-brand-end: #007092;
    --g-brand: #005971;

    --c-bg: #F6F6F6;
    --g-page: #F6F6F6;
    --c-surface-elevated: #EEF3F5;

    --c-text: #223036;
    --c-text-sub: #4B4F54;
    --c-text-muted: #8A8F94;

    --c-hairline: rgba(0, 89, 113, .18);
    --c-focus-ring: rgba(0, 89, 113, .16);
    --c-open: #F8B700;

    /* IDENTICA arbeitet mit eckigen Formen */
    --r-check: 0;
    --r-sm: 0;
    --r-input: 0;
    --r-card: 0;

    --shadow-cta: none;

    --dx-calendar-table-active-color: #005971;
    --dx-calendar-table-selection-color: #005971;
}

/* Überschriften in Roboto Condensed fett, wie auf identica.de */
.n5-theme-identica .n5-title,
.n5-theme-identica .n5-summary__date,
.n5-theme-identica .n5-login__title {
    font-weight: 700;
}
.n5-theme-identica .n5-title { text-transform: none; }

/* Primärbutton wie auf identica.de: flach, Hover dunkler */
.n5-theme-identica .n5-btn--primary:hover:not(:disabled) { background: var(--c-brand-dark); }
