div.input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;

    > div.input {
        width: calc(50% - 5px);
        min-width: 300px;
    }
}

div.input {
    display: flex;
    min-height: 45px;
    border: solid var(--taurusNetworkDarkBlue) 1px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: var(--borderRadius);

    :first-child {
        border-left: 0 !important;
        border-top-left-radius: var(--borderRadius);
        border-bottom-left-radius: var(--borderRadius);
    }

    :last-child {
        border-right: 0 !important;

        &.switch {
            border-top-right-radius: var(--borderRadius) !important;
            border-bottom-right-radius: var(--borderRadius) !important;
        }
    }

    label {
        background-color: #B9D8E5;
        padding: 5px;
        padding-top: 11px;
        padding-left: 10px;
        padding-right: 10px;
        border-left: solid var(--taurusNetworkDarkBlue) 1px;
        border-right: solid var(--taurusNetworkDarkBlue) 1px;
        user-select: none;

        text-align: right;
        /*text-wrap: nowrap;*/
        text-wrap: wrap;
    }

    button,.button {
        border: 0 !important;
    }

    div[role="application"] {
        width: 100%;
        border-radius: 0;
    }

    input,select,textarea {
        flex-grow: 1;
        border: none;
        padding: 5px;
        padding-left: 10px;
        padding-right: 10px;
        box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.25);
        background-color: #efefefc0;
        min-width: 0;

        &[type='color'] {
            block-size: unset;
            padding: 0;

            &::-webkit-color-swatch-wrapper {
                padding: 0;
            }
            
            &::-webkit-color-swatch {
                border: 0;
            }
            
            &::-moz-color-swatch,
            &::-moz-focus-inner {
                border: 0;
            }
            
            &::-moz-focus-inner {
                padding: 0;
            }
        }
    }

    div.read-only {
        background-color: #efefefc0;
        padding: 5px;
        padding-left: 10px;
        padding-right: 10px;
        border-radius: var(--borderRadius);
        flex-grow: 1;
        display: flex;
        align-items: center;
    }

    .tagify {
        width: 100% !important;
        background-color: #efefefc0 !important;
    }

    &.multi {
        span {
            padding-left: 6px;
            padding-right: 6px;
            display: flex;
            align-items: center;
            user-select: none;
        }
    }

    textarea {
        min-height: 150px;
    }

    &.switch {
        --checkedColour: var(--taurusNetworkPrimaryDark);

        &.success {
            --checkedColour: var(--successColour);
        }

        &.danger {
            --checkedColour: var(--dangerColour);
        }
        
        width: fit-content;

        &.plain {
            border: none;
            box-shadow: none;

            label {
                border-right: none;
                background: none;
            }
        }

        label:nth-child(1) {
            flex-grow: 1;
        }

        label:nth-child(2) {
            background: none;
            border-right: 0;
            display: block;
            margin-left: 4px;
            margin-right: 4px;
            margin-top: 4px;
            border-left: none !important;

            height: 34px;
            position: relative;
            width: 60px;

            input {
                display: none;
            }
            
            .slider {
                background-color: #ccc;
                bottom: 0;
                cursor: pointer;
                left: 0;
                position: absolute;
                right: 0;
                top: 0;
                transition: .4s;
                border-radius: 34px;
                z-index: 1;

                &:before {
                    background-color: #fff;
                    bottom: 4px;
                    content: "";
                    height: 26px;
                    left: 4px;
                    position: absolute;
                    transition: .4s;
                    width: 26px;
                    border-radius: 50%;
                }
            }
            
            input:checked+.slider {
                background-color: var(--checkedColour);
            }
            
            input:checked+.slider:before {
                transform: translateX(26px);
            }

            input:disabled+.slider {
                opacity: 0.6;
                cursor: not-allowed;
            }
        }
    }

    @media screen and (max-width: 500px) {
        flex-wrap: wrap;

        label,input {
            width: 100%;
            border: none;
            border-radius: var(--borderRadius);
        }

        label {
            font-size: 14px;
            padding-top: 7px;
            padding-bottom: 3px;
            font-weight: bold;
            text-align: left !important;
            border-bottom-left-radius: 0 !important;
            border-bottom-right-radius: 0 !important;
            border-right: none !important;
        }

        input,select,div[role="application"] {
            border-top-left-radius: 0 !important;
            border-top-right-radius: 0 !important;
        }
    }
}

form {
    div.image-selector {
        display: flex;
        gap: 30px;
        align-items: stretch;

        div.card.preview {
            flex: 1;
            aspect-ratio: 16/9;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        div.controls {
            width: 30%;
            min-width: 200px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            label {
                font-weight: bold;
            }

            p.filename {
                margin-top: 30px;
                margin-bottom: 0;
            }
        }

        @media screen and (max-width: 600px) {
            flex-wrap: wrap;

            div.card.preview, div.controls {
                width: 100%;

                .description {
                    display: none;
                }
            }
        }
    }

    div.submit-with-checkbox {
        display: flex;
        align-items: center;
        gap: 20px;
        justify-content: flex-end;

        div.checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            border: none;
            box-shadow: none;
        }

        label {
            background-color: transparent !important;
            border-right: 0 !important;
        }
    }

    p.help-text {
        color: rgb(92, 92, 92);
        font-size: 14px;
        margin-top: 10px;
    }

    &.flex {
        display: flex;
        gap: 18px;
        
        @media (max-width: 768px) {
            overflow-y: auto;
        }

        @media (min-width: 769px) {
            flex-wrap: wrap;
        }
    }
}