@import "../../css/colors.css";
@import "../../css/units.css";

.modal-content {
    width: 700px;
    /*margin: 50px auto; /* This modal is taller than most, reduce top margin */
}

.body {
    background: $ui-white;
    padding: 1.5rem 2.25rem;
}

[theme='dark'] .body {
    background-color: $ui-primary-dark;
}

/* Blocks workspace for custom procedure declaration editor */
.workspace {
    min-height: 150px;
    position: relative;
}

.workspace :global(.injectionDiv){
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.workspace :global(.blocklySvg) {
    background-color: $ui-primary;
}

[theme='dark'] .workspace :global(.blocklySvg) {
    background-color: $drop-highlight-dark;
}

.options {
    display: flex;
}

.insert-options {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.function-options {
    flex: 1;
}

.option-card {
    background: white;
    border: 2px solid $ui-black-transparent;
    border-radius: $space;
    padding: calc($space * 2);
    text-align: left;
    flex-grow: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
}

[theme='dark'] .option-card {
    background-color: $drop-highlight-dark;
    color: $text-primary-dark;
}

.option-card:hover {
    border: 2px solid $motion-primary;
    box-shadow: 0px 0px 0px 4px $motion-transparent;
}

.option-card + .option-card {
    margin-top: 0.5rem;
}

.option-icon {
    height: 48px;
}

.option-title {
    margin-left: 1rem;
    line-height: 48px;
}

[theme='dark'] .option-title {
    color: $text-primary-dark;
}

/* "Run without screen refresh" row */
.checkbox-row {
    margin-top: 1rem;
}

/* Confirmation buttons at the bottom of the modal */
.button-row {
    margin-top: 1rem;
    font-weight: bolder;
    text-align: right;
}

.button-row button {
    border: 1px solid $ui-black-transparent;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    background: white;
    font-weight: bold;
    font-size: 0.85rem;
}

[theme='dark'] .button-row button {
    background-color: $ui-tertiary-dark;
    color: $text-primary-dark;
}

[theme='dark'] .checkbox-row {
    color: $text-primary-dark;
}

.button-row button.ok-button {
    background: $motion-primary;
    border: $motion-primary;
    color: white;
}

[dir="ltr"] .button-row button + button {
    margin-left: 0.5rem;
}

[dir="rtl"] .button-row button + button {
    margin-right: 0.5rem;
}
