/*
 * Causal-Discovery-Intro vor "Create new Configuration" (Design-Handoff "cdintro")
 *
 * DOM-Overlay, siehe ExpertUI.view.main.CDIntro. Baut auf den xai*-Klassen
 * aus xagent-intro.css auf; hier nur die Abweichungen:
 *   - Akzent #3f7d75 (weiße Schrift erfüllt WCAG, #589999 nicht ganz)
 *   - Highlight der Headline #5ec4b6
 *   - Grafik "Event history" in der linken Spalte
 *
 * Eigenes Stylesheet, weil Main.scss erst nach einem Sencha-Build wirkt.
 */

body .cdiDialog {
    min-height: 560px;
    border-radius: 18px;
}

body .cdiOverlay .xaiHeadline span {
    color: #5ec4b6;
}

body .cdiOverlay .xaiContent {
    gap: 14px;
    padding: 36px 40px 28px;
}

body .cdiOverlay .xaiCard {
    padding: 14px 16px;
    border-radius: 12px;
}

body .cdiOverlay .xaiCardTitle {
    font-weight: 600;
}

body .cdiHint {
    color: #55606C;
    font-weight: 400;
}

body .cdiOverlay .xaiCardBeta .xaiCardBody {
    color: #4d4636;
}

body .cdiSpacer {
    flex-grow: 1;
}

body .cdiOverlay .xaiBtns {
    margin-top: 0;
}

body .cdiOverlay .xaiBtn {
    font-weight: 600;
}

body .cdiOverlay .xaiBtnGhost {
    border-color: #3f7d75;
    color: #3f7d75;
}

body .cdiOverlay .xaiBtnGhost:hover {
    border-color: #346860;
    color: #346860;
}

body .cdiOverlay .xaiBtnPrimary {
    background: #3f7d75;
    box-shadow: 0 6px 18px rgba(63, 125, 117, .28);
}

body .cdiOverlay .xaiBtnPrimary:hover {
    background: #346860;
}

body .cdiOverlay .xaiBtnPrimary:active {
    background: #2b5650;
}

body .cdiOverlay .xaiBtn:focus-visible,
body .cdiOverlay .xaiClose:focus-visible {
    outline-color: rgba(63, 125, 117, .55);
}

/* Canvas-Toolbar-Pille liegt über dem Overlay: ausblenden, solange das
   Intro offen ist (Body-Klasse setzt/entfernt CDIntro) */
body.cdiOpen .xcanvasToolbarPill {
    visibility: hidden !important;
}

/* ---------- linke Spalte: Event history ---------- */

body .cdiStage {
    gap: 14px;
    justify-content: space-between;
}

body .cdiHistory {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 386px;
    max-width: calc(100% + 8px);
    margin-left: -8px;
    padding: 14px 12px;
    border-radius: 14px 14px 0 0;
    background: #F1F3F5;
}

body .cdiHistory .xaiChatHead {
    padding: 0 6px;
}

body .cdiHistory .xaiChatLogo {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: #3f7d75;
}

body .cdiGraph {
    position: relative;
    height: 150px;
    border-radius: 10px;
    background: #FFFFFF;
}

body .cdiGraph svg {
    position: absolute;
    top: 0;
    left: 0;
}

body .cdiWindow {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 222px;
    height: 108px;
    border: 1px dashed #8cc3bb;
    border-radius: 6px;
    background: #e6f2f0;
}

body .cdiIgnored {
    position: absolute;
    top: 14px;
    left: 240px;
    width: 70px;
    height: 108px;
    border-radius: 6px;
    background: repeating-linear-gradient(135deg, #f1f3f5 0 6px, #e3e6ea 6px 12px);
}

body .cdiLabel {
    position: absolute;
    top: 128px;
    font-size: 11px;
    font-weight: 500;
    line-height: normal;
    text-align: center;
}

body .cdiLabelWindow {
    left: 14px;
    width: 222px;
    color: #2f6e66;
}

body .cdiLabelIgnored {
    left: 240px;
    width: 70px;
    color: #5a6270;
}

body .cdiLabelEvent {
    left: 304px;
    width: 50px;
    color: #232a33;
    font-weight: 600;
}

/* ---------- Dark Theme ---------- */

body.oe-theme-dark .cdiHint {
    color: var(--oe-text-dim);
}

body.oe-theme-dark .cdiOverlay .xaiCardBeta .xaiCardBody {
    color: var(--oe-text-dim);
}

body.oe-theme-dark .cdiOverlay .xaiBtnGhost {
    background: transparent;
    border-color: #5ec4b6;
    color: #5ec4b6;
}
