#sectionDetails {

    display: flex;
    /* This overrides apparently the hide in the navigation */
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg);

    header {
        padding: 20px 28px 16px;
        border-bottom: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        flex-shrink: 0;

        .details-header {
            display: flex;
            flex-direction: row;
            width: 100%;
        }

        .details-title {
            /* should grow to push actions to the rigth */
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;

            [data-role="name"] {
                font-size: 22px;
                font-weight: 500;
                color: var(--text);
                line-height: 1.2;
            }

            [data-role="isin"] {
                font-size: 12px;
                color: var(--text3);
                font-family: var(--font-mono);
                margin-top: 3px;
            }
        }

        .details-action {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        input {
            /* TODO : REMOVE */
            display: none;
        }
    }

    .displaystock-state {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .main {
        flex: 1;
        display: flex;
        overflow: hidden;

        .meta-section h1 ,
        .log-header h1{
            /* better would be to use h1 */
            font-size: 14px;
            font-weight: 500;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text3);
            margin-bottom: 14px;
        }

        .left {
            width: 260px;
            flex-shrink: 0;
            border-right: 1px solid var(--border);
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 24px;



            #btnAddLink {
                width: 100%;
            }
        }

        .link-list {
            a {
                display: block;
                margin-bottom: 15px;
            }
        }

        label {
            border: 1pt solid black;
            corner-shape: round bevel bevel round;
            border-radius: 16px 48px 48px 16px / 16px 50% 50% 16px;

            input {
                display: none
            }
        }

        .right {
            width: 100%;
            padding: 20px 28px;
            overflow-y: scroll;

            .log-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 16px;
                position: sticky;
                /* top: -20px ist nur  eine Notlösung */
                top: -20px;
                background-color: var(--bg) ;
            }

            [data-role="logentries"] {
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            [data-role="name"] {
                font-weight: bold;
            }

            .small {
                font-size: small;
            }
        }


        .entry {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 14px 16px;
            transition: border-color var(--transition);


            .meta {
                display: flex;
                align-items: center;
                margin-bottom: 8px;
                gap: 10px;
            }

            .date {
                font-weight: bold;
            }

            .type {
                color: blue;
            }

            .contents {
                white-space: pre-wrap;
            }
        }
    }

    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;

        .em-icon {
            font-size: 50px;
        }
    }

    #activeStockDetails {
        display: none;
    }

    #activeStockDetails:checked~.empty-state {
        display: none !important;
    }

    #activeStockDetails:not(:checked)~.displaystock-state {
        display: none !important;
    }




    #dialogLogentry {
        display: none;
        background: var(--surface);
        border: 1px solid var(--border2);
        border-radius: var(--radius-lg);
        padding: 14px 16px;
        margin-bottom: 12px;
        flex-direction: column;
        gap: 10px;

        &.visible {
            display: flex;
        }

        .logentry-header {
            display: flex;
            gap: 8px;

            #dialogLogentryDate {
                flex-grow: 1;
            }
        }

        textarea {
            resize: vertical;
            min-height: 150px;
            width: 100%;
            line-height: 1.5;
        }

        .logentry-actions {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
        }


    }

    /*
    #dialogLogentry {
        >* {
            display: block;
            margin: 15px;
        }
    }

    #dialogLogentryText {
        height: 25ch;
        width: 35ch;
    }
*/
    /* ── Process flow visual ────────────────────────────────────────── */
    #detailsProcessTrack {
        display: flex;
        align-items: center;
        gap: 0;
        padding: 12px 28px;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        flex-shrink: 0;
        width: 100%;
    }

    #detailsProcessTrack::-webkit-scrollbar {
        height: 0;
    }

    .process-step {
        display: flex;
        align-items: center;
        gap: 0;
        flex-shrink: 0;
    }

    .process-node {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 500;
        color: var(--text3);
        white-space: nowrap;
        transition: all var(--transition);
    }

    .process-node.current {
        color: inherit;
    }

    .process-arrow {
        width: 24px;
        height: 1px;
        background: var(--border2);
        margin: 0 4px;
        flex-shrink: 0;
        position: relative;
    }

    .process-arrow::after {
        content: '';
        position: absolute;
        right: 0;
        top: -3px;
        border: 3.5px solid transparent;
        border-left-color: var(--border2);
    }




    @media (max-width: 500px) {
        .main {
            grid-template-columns: 1fr;
            grid-template-rows: 1fr 1fr;
        }

        .right {
            border-top: 1px solid black;
        }
    }
}