@CHARSET "UTF-8";
/*
 * xAdmin Modern Theme - Popup-, Login- und Dialog-Layouts
 *
 * Deckt die Layout-Scripts popup.phtml und login.phtml sowie die ueber
 * jQuery UI geoeffneten Dialoge ab. Wie im uebrigen Theme greift alles
 * ausschliesslich unter body.xtheme-modern.
 */

/* ------------------------------------------------------------------ Popup */

body.xtheme-modern.x-popup {
    background: var(--x-bg);
    padding: 14px;
}

body.xtheme-modern .x-popup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

body.xtheme-modern.x-popup #footer {
    justify-content: flex-end;
}

/* Popups werden haeufig in einen jQuery-UI-Dialog geladen. Dort traegt der
   aeussere Rahmen bereits Karte und Schatten - die innere Karte entfaellt. */
body.xtheme-modern .ui-dialog .x-popup-body {
    gap: 0;
}

body.xtheme-modern .ui-dialog .x-content-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.xtheme-modern .ui-dialog #footer {
    display: none;
}

/* ------------------------------------------------------------------ Login */

body.xtheme-modern.x-login {
    background: var(--x-bg);
}

body.xtheme-modern .x-login-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 100vh;
    padding: 24px;
}

body.xtheme-modern .x-login-brand img {
    display: block;
    max-height: 42px;
    width: auto;
}

/* Vor der Anmeldung ist die Navigation ohnehin nicht bedienbar. */
body.xtheme-modern .x-login-nav {
    display: none;
}

body.xtheme-modern .x-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--x-surface);
    border: 1px solid var(--x-border);
    border-radius: var(--x-radius);
    box-shadow: var(--x-shadow);
    overflow: hidden;
}

body.xtheme-modern .x-login-card .content {
    min-width: 0;
}

body.xtheme-modern #login {
    background: var(--x-surface) !important;
    padding: 24px;
}

/* Staging bleibt erkennbar - aber als Akzentkante statt als gelbe Flaeche. */
body.xtheme-modern #login.yellow {
    border-top: 3px solid var(--x-warn);
}

body.xtheme-modern #login.lime {
    border-top: 3px solid var(--x-accent);
}

body.xtheme-modern #login table {
    margin: 0 auto;
    width: 100%;
}

body.xtheme-modern #login td {
    padding: 6px 4px;
    white-space: normal;
}

body.xtheme-modern #login td:first-child {
    color: var(--x-text-muted);
    width: 90px;
}

body.xtheme-modern #login input[type="text"],
body.xtheme-modern #login input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

body.xtheme-modern #login .login-text {
    color: var(--x-danger) !important;
    font-size: 12.5px;
    margin-bottom: 10px;
}

body.xtheme-modern.x-login #footer {
    background: transparent;
    border: 0;
    padding: 0;
}

/* -------------------------------------------------------- jQuery UI Dialog */

body.xtheme-modern .ui-widget-overlay {
    background: rgba(16, 24, 40, .45);
    opacity: 1;
}

body.xtheme-modern .ui-dialog {
    background: var(--x-surface);
    border: 1px solid var(--x-border);
    border-radius: var(--x-radius);
    box-shadow: var(--x-shadow-pop);
    padding: 0;
    font-family: var(--x-font);
    font-size: 13px;
}

body.xtheme-modern .ui-dialog .ui-dialog-titlebar {
    background: var(--x-surface-alt);
    border: 0;
    border-bottom: 1px solid var(--x-border);
    border-radius: var(--x-radius) var(--x-radius) 0 0;
    color: var(--x-text);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 14px;
}

body.xtheme-modern .ui-dialog .ui-dialog-titlebar-close {
    border: 0;
    background: none;
    right: 10px;
}

body.xtheme-modern .ui-dialog .ui-dialog-content {
    background: var(--x-surface);
    color: var(--x-text);
    padding: 14px;
}

body.xtheme-modern .ui-dialog .ui-dialog-buttonpane {
    background: var(--x-surface-alt);
    border-top: 1px solid var(--x-border);
    margin: 0;
    padding: 10px 14px;
}

/*
 * Konvention: Der erste Button einer Dialog-Buttonleiste ist die Hauptaktion,
 * alle weiteren sind sekundaer. jQuery UI liefert dafuer keine eigene Klasse.
 */
body.xtheme-modern .ui-dialog .ui-dialog-buttonpane button,
body.xtheme-modern .ui-button {
    background: var(--x-surface);
    border: 1px solid var(--x-border-strong);
    border-radius: var(--x-radius-sm);
    color: var(--x-text);
    font-family: var(--x-font);
    font-size: 12.5px;
    font-weight: 500;
    margin-left: 8px;
    padding: 5px 14px;
}

body.xtheme-modern .ui-dialog .ui-dialog-buttonpane button:hover,
body.xtheme-modern .ui-button:hover {
    background: var(--x-surface-sunk);
}

body.xtheme-modern .ui-dialog .ui-dialog-buttonset button:first-child {
    background: var(--x-accent);
    border-color: var(--x-accent);
    color: var(--tmo-on-primary);
}

body.xtheme-modern .ui-dialog .ui-dialog-buttonset button:first-child:hover {
    background: var(--x-accent-hover);
    border-color: var(--x-accent-hover);
}

/* Der Schliessen-Button darf nicht als Aktionsbutton eingefaerbt werden. */
body.xtheme-modern .ui-dialog .ui-dialog-titlebar-close,
body.xtheme-modern .ui-dialog .ui-dialog-titlebar-close:hover {
    background: none;
    border: 0;
    color: var(--x-text-muted);
}

body.xtheme-modern .ui-tooltip,
body.xtheme-modern .infobox-popup {
    border-radius: var(--x-radius);
    box-shadow: var(--x-shadow-pop);
}
