// global styles, available for extended components too
// must @import "@eurosat/form/assets/styles.scss";

// Flatpickr package require to import its styles globally or it breaks.
@import 'flatpickr/dist/flatpickr.min.css';

@import 'quill/dist/quill.core.css';
@import 'quill/dist/quill.bubble.css';
@import 'quill/dist/quill.snow.css';
//@import '~quill-better-table/dist/quill-better-table.css';

.es-form {

    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;

    .form-container {
        display: flex;
        align-items: center;
    }

    .dynamic-field {
        .mat-form-field, .mat-mdc-form-field {
            width: 100%;
            //display: inline-table;
        }
        .datepickers-container {
            width: 100%;
            > * {
                display: -webkit-box;
                display: flex;
            }
        }
    }

    .form-group {
        width: calc(100% - 10px);
        margin: 10px 5px;
        padding: 15px;
    }

    .group-button {
        //width: 100%;
        margin: 10px 15px 10px 15px;
        .dynamic-field {
            height: auto;
            display: inline-block;
            button {
                margin-right: 20px;
            }
        }
    }

    .group-name {
        margin-bottom:5px;
        //text-transform: capitalize;
    }

    .app-spinner {
        position: absolute;
        left: calc(50% - 50px);
        top: calc(50% - 50px);
        z-index: 1;
    }

    .display-true {
        //display: block;
        visibility: visible;
        opacity: 1;
        min-height: 55px;
        max-height: 4000px;
        transition: visibility 500ms, opacity 500ms, max-height 500ms;
    }

    .display-false {
        display: none !important;
        visibility: hidden;
        opacity: 0;
        min-height: 0 !important;
        max-height: 0 !important;
        transition: visibility 350ms ease, opacity 175ms, max-height 180ms;
    }
}
.mat-option-text{
    position: relative;
}
.mat-select-offset-top{
    margin-top: 30px;
}


// Styly bez barev presunute z puvodnich theme mixinu (barvy jsou v colors.scss)

.es-form {
    .form-group {
        border-radius: 3px;
    }

    .mat-custom-label {
        font-size: 75%;
    }
}


// form-colorpicker

.md2-colorpicker-content {
    .md2-color-picker-actions {
        .md2-button {
            font-weight: 500;
            text-transform: none;
        }
    }
}

.es-form {
    .input-focused {
        .md2-colorpicker-value {
            margin-bottom: -1px !important;
        }
    }

    .md2-color-picker {
        .alpha {
            display: none;
        }
    }

    .color-clear {
        cursor: pointer;
    }
}


// form-flatpickr, form-range-flatpicker

.flatpickr-today {
    cursor: pointer;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.flatpickr-confirm {
    width: 100%;
    height: 40px;
    max-height: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.flatpickr-confirm.visible {
    max-height: 40px;
    visibility: visible;
}

.flatpickr-today-confirm-wrapper {
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}


// form-slider

.es-form {
    .noUi-handle {
        border-radius: 3px;
        cursor: default;
        box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
    }

    .noUi-tooltip {
        display: block;
        position: absolute;
        border: none;
        border-radius: 3px;
        padding: 5px;
        text-align: center;
        white-space: nowrap;
        box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
    }

    .noUi-target {
        -webkit-box-shadow: none;
        box-shadow: none;
    }
}


// form-wysiwyg-jodit

.jodit-container {
    border-width: 0 !important;
}
.jodit_theme_es {
    .jodit-toolbar__box,
    .jodit-status-bar,
    .jodit-ui-separator {
        border-width: 1px !important;
    }
    &.jodit-container {
        border-width: 1px !important;
    }
    &.jodit-container:not(.jodit_inline) {
        border-radius: 3px;
    }
    .jodit-wysiwyg {
        p:first-of-type {
            margin-top: 0;
        }
        p:last-of-type {
            margin-bottom: 0;
        }
    }
}


@import 'colors';
