/* Fullscreen overlay behind dialog */

.fullscreen-shader {
    position: fixed;
    width: 100%;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(38, 50, 56, 0.7);
    z-index: 1020;
    transition-property: background;
    transition-duration: 0.25s;
}

.fullscreen-shader:not(.show) {
    pointer-events: none;
    background: none;
}

.fullscreen-shader:not(.show) .dialog {
    top: 20pt;
    opacity: 0;
}

/* Dialog */

.dialog {
    top: 0;
    position: relative;
    transition-property: all;
    transition-duration: 0.25s;
    background: white;
    box-shadow: 4px 4px 35px rgba(0, 0, 0, 0.5);
    max-width: 480pt;
    padding: 24pt 12pt 12pt;
    border-radius: 4pt;
}

.dialog.scroll {
    max-height: 90vh;
    overflow-y: auto;
}

.dialog div.field {
    width: 100%;
    padding: 8pt;
}

.dialog input.text,
.dialog textarea {
    width: 100%;
    padding: 8pt;
    border: solid 1px #ccc;
    border: none;
    border-radius: 4pt;
    background: rgba(241, 243, 244);
}

.dialog textarea {
    white-space: pre-wrap;
}

.dialog .field.select select {
    width: 100%;
    min-height: 105pt;
}

.dialog select {
    border-radius: 4pt;
    outline: none;
    border: none;
    background: rgba(241, 243, 244, 1);
    cursor: pointer;
    padding: 5px;
}

.dialog input.text:focus {
    outline: none;
}

.dialog input.text::placeholder {
    color: #aaa;
}

.dialog input[type="number"]::-webkit-inner-spin-button,
.dialog input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dialog label {
    margin-bottom: 0 !important;
}

.dialog h3 {
    padding: 0 8pt 8pt;
    font-weight: 400;
}

.dialog-btns {
    display: flex;
    justify-content: flex-end;
    padding: 8pt 8pt 8pt;
}

.dialog-btn-center {
    justify-content: center !important;
}

.dialog-btns button {
    cursor: pointer;
    border: none;
    padding: 8pt;
    min-width: 74pt;
    border-radius: 4pt;
}

.dialog-btns button:focus {
    outline: none;
}

/* Dialog datepicker element */

.dialog .datepicker-wrapper {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
}

.dialog .datepicker-wrapper > i {
    color: #aaa;
    position: absolute;
    pointer-events: none;
}

.dialog .datepicker-wrapper > i:lang(en) {
    right: 20pt;
}

.dialog .datepicker-wrapper > i:lang(ar) {
    left: 20pt;
}

.dialog .datepicker-wrapper input {
    flex: 1;
    cursor: pointer;
    width: 100%;
}

.dialog .radio-item {
    display: inline-block;
}

.dialog input[type=radio] {
    display: none;
}

.dialog input[type=radio] + label {
    padding: 4pt 12pt 4pt !important;
    margin: 2pt !important;
    border-radius: 16pt !important;
    text-align: center;
    background: #eee;
    user-select: none;
    cursor: pointer;
    display: inline-block;
    transition-property: *;
    transition-duration: 0.2s;
}

.dialog input[type=radio] + label:hover {
    background: #ddd;
}

.dialog input[type=radio]:checked + label {
    background: #4F469C;
    color: white;
}

/* Checkbox field */

.dialog .field.checkbox .click-area {
    cursor: pointer;
    user-select: none;
}

.dialog .field.checkbox .box {
    border: solid 2px #78909c;
    border-radius: 2pt;
    padding: 2pt;
    width: 16pt !important;
    height: 16pt !important;
    display: inline-flex;
    justify-content: center;
    text-align: center;
    transition-property: background;
    transition-duration: 0.1s;
}

.dialog .field.checkbox input[type=checkbox]:checked ~ .box {
    background: #4F469C;
    border-color: #4F469C;
}

.dialog .field.checkbox label {
    cursor: pointer;
    user-select: none;
}

/*

Override x-select styles to improve visual consistency within dialog
(specifically, give x-select a similar size to text inputs).

*/

.dialog .x-select-wrapper .x-input {
    padding: 4pt;
    min-height: 38pt;
    border-radius: 4pt;
}

.dialog .field .label,
.dialog .field .separator-label {
    color: #999;
}

.dialog .field .label:lang(en) {
    margin-bottom: 2pt;
}

.dialog .field .label:lang(ar) {
    margin-bottom: 3pt;
}

.multiselect__content-wrapper {
    width: inherit !important;
}

.dialog button.close {
    position: absolute;
    top: 1.5rem;
    z-index: 9999;
    opacity: initial;
    color: var(--font-color);
}

.dialog button.close:lang(en) {
    right: 1.5rem;
}

.dialog button.close:lang(ar) {
    left: 1.5rem;
}

.line-broken-text-only {
    line-break: anywhere;
}
/* Apply style 2 */
.style-2 {
    padding: 2% 0.5%;
}

.style-2 > * {
    width: 80%;
    margin: auto;
    justify-content: center;
}

.style-2 .center-content {
    text-align: center;
}

.style-2 .dialog-title {
    color: #3A2F81;
    font-weight: bold;
}

.style-2 .dialog-image {
    display: block;
    margin: auto;
}