/* This overwrite the default react-sortable-tree css to display events list */

/**
 * Remove the outline visible on the events sheet (contrary to most
 * controls on screen, we don't want a visible focus there).
 */
.gd-events-sheet:focus { outline: none; }

/**
 * Draggable handle on the left of an event
 */
.gd-events-sheet .rst__moveHandle {
    width: 10px;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

@media only screen and (max-width: 750px) {
    /**
     * Slightly reduce the size of the handle on small screens
     * and phones (where drag'n'drop is not supported anyway).
     */
    .gd-events-sheet .rst__moveHandle {
        width: 4px;
    }
}

.gd-events-sheet .events-tree {
    height: 100%;
}

/**
 * Container of an event line (including the scaffolding lines and the event).
 */
.gd-events-sheet .rst__node {
    display: flex;
}

.gd-events-sheet .rst__nodeContent {
    /* Ensure the event take all the space after the scaffolding lines */
    flex: 1;
    right: 0;

    min-width: 0; /* But don't shrink scaffolding lines */
    margin-bottom: 2px; /* Margin after an event */
}

.gd-events-sheet .rst__row {
    /* The "landing pad" highlight box is done with position: absolute.
     * Ensure it will cover all the event row but not the scaffolding lines.
     */
    position: relative;
}

/**
 * Container of the content of an event
 */
.gd-events-sheet .rst__rowContents {
    display: flex;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    flex: 1;
}

.gd-events-sheet .rst__rowWrapper {
    padding: 0;
}

.gd-events-sheet .rst__rowLabel {
    padding: 0;
    flex: 1;
    min-width: 0;
}

.gd-events-sheet .rst__rowTitle {
    font-weight: normal;
}

/**
 * Expand/collapse buttons
 */
.gd-events-sheet .rst__collapseButton, .rst__expandButton {
    border-radius: 0;
    border: none;
    box-shadow: none;
    background-repeat: no-repeat;
    background-color: transparent;
    height: 12px;
    width: 22px;
}

.gd-events-sheet .rst__collapseButton:hover:not(:active), .rst__expandButton:hover:not(:active) {
    background-size: initial !important; /*Avoid buttons size to change*/
    height: 12px !important; /*Avoid buttons size to change*/
    width: 22px !important; /*Avoid buttons size to change*/
}

.gd-events-sheet  .rst__expandButton {
    background-image: url('./unfold.png');
    background-position: 11px 3px !important;
}

.gd-events-sheet  .rst__collapseButton {
    background-image: url('./fold.png');
    background-position: center 7px !important;
}

/**
 * Lines between events
 */
.gd-events-sheet .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after {
  opacity: 0.3;
}

/**
 * Links to add a condition or an action
 */
.gd-events-sheet .add-link {
    background:none!important;
    color:inherit;
    border:none;
    padding:0!important;
    font: inherit;
    cursor: pointer;
    opacity: 0.3;
}
.gd-events-sheet .add-link:hover {
    opacity: 0.8;
}

/**
 * Selectable area (instructions)
 */
.gd-events-sheet .selectable {
    box-sizing: border-box;
    border: 1px transparent solid;
}

/**
 * Large selectable area (events)
 */
.gd-events-sheet .large-selectable {
    box-sizing: border-box;
    border: 1px transparent solid;
}

/**
 * Disabled text
 */
.gd-events-sheet .disabled-text {
    text-decoration: line-through;
    opacity: 0.6;
}

/**
 * Icon (variable, object icon...)
 */
.gd-events-sheet .icon {
    vertical-align: sub;
    object-fit: contain;
    width: var(--icon-size);
    height: var(--icon-size);
}

.gd-events-sheet .rst__nodeContent .MuiIconButton-root {
    font-size: inherit;
}

/**
 * Container having an icon next to the associated name.
 * No rules to be set, we used to have a nowrap but it creates issues
 * with overflowing long object/variable names (that can contain expressions).
 */
/*
.gd-events-sheet .name-and-icon-container {
    white-space: nowrap;
}
*/
