.dnnForm{
    width: 100%;
    fieldset{
        clear: none;
        position: relative;
        margin-bottom: 1.125rem;
        text-align: left;
        fieldset{
            width: 100%;
        }
    }
    .dnnFormItem{
        clear: both;
        width: 100%;
        display: block;
        position: relative;
        text-align: left;
        a.dnnFormHelp{
            span{
                position: relative;
            }
            img{
                display: block;
            }
        }
    }
}

.dnnFormItem{
    input[type="text"],
    select,
    textarea,
    input[type="email"],
    input[type="search"],
    input[type="password"] {
        margin-bottom: 1.125rem;
        padding: 0.5rem;
        background: var(--dnn-color-background, #fff);
        border: 1px solid var(--dnn-color-foreground-light, #c9c9c9);
        border-radius: var(--dnn-controls-radius, 3px);
        color: var(--dnn-color-foreground, #333);
        font-size: 0.75rem;
        width: 45%;
        max-width: 445px;
        + .dnnTertiaryAction{
            display: inline-block;
            max-width: 60px;
        }
    }
    input[type="checkbox"],
    input[type="radio"] {
        width: 0.8125rem;
        height: 0.8125rem;
        padding: 0;
        box-sizing: border-box;
    }
    input[type="search"] {
        box-sizing: content-box;
    }
    input[type="checkbox"]{
        margin: 0 5px;
    }
    table{
        background: none;
    }
    .dnnSpinner {
        width: 45%;
        margin-bottom: 1.125rem;
    }
    .dnnTagsInput {
        width: 45%;
    }
    textarea {
        min-height: 5rem;
    }
    /* Groupped controls */
    .dnnInputGroup {
        float: left;
        display: block;
        width: 32.075%;
        padding: 0.3125rem;
        margin-bottom: 1.125rem;
        .dnnLeft {
            width: 100%;
        }
        span {
            display: inline-block;
            width: 33%;
            text-align: right;
        }
    }
    /* normal checkbox fix */
    input[type="checkbox"].normalCheckBox {
        display: inline-block;
        margin: 8px 0 4px 0;
    }
    /* Disabled State */
    input.aspNetDisabled,
    textarea.aspNetDisabled {
        background: var(--dnn-color-neutral-light, #ebebeb);
        color: var(--dnn-color-neutral, #444);
        border-color: var(--dnn-color-neutral-dark, #a7a7a7);
        border-width: 1px;
    }
    button[disabled], input[disabled]{
        cursor: default;
        opacity: 0.5;
    }
    /* Active and Focus States */
    input[type="text"]:active, .dnnFormItem input[type="text"]:focus,
    input[type="password"]:focus, .dnnFormItem input[type="password"]:active,
    input[type="email"]:active, .dnnFormItem input[type="email"]:focus,
    select:active, .dnnFormItem select:focus,
    textarea:active, .dnnFormItem textarea:focus,
    input[type="search"]:active, .dnnFormItem input[type="search"]:focus {
        background: var(--dnn-color-background, #fff);
        border: 1px solid var(--dnn-color-primary, rgba(2,139,255,0.5));
        box-shadow: 0px 0px 3px 0px var(--dnn-color-primary, rgba(2, 139, 255, 0.4));
        color: var(--dnn-color-foreground, #333);
    }
    /* Invalid state */
    input:invalid, textarea:invalid{
        background-color: var(--dnn-color-neutral, #f0dddd);
    }
    /* Error tooltip */
    span.dnnFormMessage.dnnFormError {
        display: block;
        position: absolute;
        overflow: visible;
        bottom: 95%;
        right: 12%;
        width: 200px;
        margin-bottom: 0;
        padding: 0.625rem;
        border: none;
        border-radius: var(--dnn-controls-radius, 3px);
        background: var(--dnn-color-danger, rgba(255,0,0,0.75));
        font-size: 0.75rem;
        color: var(--dnn-color-danger-contrast, #fff);
        text-align: left;
        &:after{
            position: absolute;
            bottom: -0.4375rem;
            left: 0.9375rem;
            content: "";
            width: 0;
            height: 0;
            opacity: 0.75;
            border-left: 0.4375rem solid transparent;
            border-right: 0.4375rem solid transparent;
            border-top: 0.4375rem solid var(--dnn-color-danger, red);
        }
    }
}
div.dnnFormGroup {
    display: inline-block;
    padding: 10px;
    margin-bottom: 5px;
    width: 65%;
}

/* Display hand cursor for clickable form elements */
.dnnFormItem button, .dnnFormItem input[type="button"],
.dnnFormItem input[type="reset"],
.dnnFormItem input[type="submit"],
.dnnPrimaryAction,
.dnnSecondaryAction,
.dnnTertiaryAction,
.dnnLogin .LoginTabGroup span {
    display: inline-block;
    padding: 0.5625rem;
    margin-bottom: 0.5625rem;
    cursor: pointer;
    min-width: 4.6875rem;
    overflow: visible;
    border: 1px solid var(--dnn-color-foreground-light, #c2c2c2);
    background: var(--dnn-color-background-dark, #eaeaea);
    border-radius: var(--dnn-controls-radius, 3px);
    color: var(--dnn-color-foreground, #333);
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}
.dnnFormItem button, .dnnFormItem input[type="button"],
.dnnFormItem input[type="reset"],
.dnnFormItem input[type="submit"],
.dnnPrimaryAction,
.dnnSecondaryAction,
.dnnTertiaryAction {
    padding: 0.375rem;
}

.dnnFormMessage{
    display: block;
    padding: 0.95rem 1rem;
    margin-bottom: 1.125rem;
    border: 1px solid var(--dnn-color-info-dark, rgba(2,139,255,0.2));
    background: var(--dnn-color-info, rgba(2,139,255,0.15));
    border-radius: var(--dnn-controls-radius, 3px);
    max-width: 100%;
    color: var(--dnn-color-info-contrast, black);
    a {
        color: var(--dnn-color-info-contrast, black);
        text-decoration: underline;
    }
    &.dnnFormError,
    &.dnnFormValidationSummary {
        background-color: var(--dnn-color-danger, rgba(255,0,0,0.15));
        border-color: var(--dnn-color-danger-dark, rgba(255,0,0,0.2));
        color: var(--dnn-color-danger-contrast, black);
        a {
            color: var(--dnn-color-danger-contrast, black);;
        }
    }
    &.dnnFormWarning {
        background-color: var(--dnn-color-warning, rgba(255,255,0,0.15));
        border-color: var(--dnn-color-warning-dark, #CDB21F);
        color: var(--dnn-color-warning-contrast, black);
        a {
            color: var(--dnn-color-warning-contrast, black);
        }
    }
    &.dnnFormSuccess {
        background-color: var(--dnn-color-success, rgba(0,255,0,0.15));
        border-color: var(--dnn-color-success-dark, rgba(0,255,0,0.5));
        color: var(--dnn-color-success-contrast, black);
        a {
            color: var(--dnn-color-success-contrast, black);
        }
    }
    .dnnLabel {
        float: none;
        width: 90%;
        text-align: left;
    }
}

.dnnFormItem{
    input[type="checkbox"] + span,
    input[type="radio"] + span {
        display: inline-block;
        width: auto;
        margin: 0.375rem 0.3125rem 0.375rem 0.3125rem;
    }
    .dnnLabel{
        margin-top: 0.3125rem;
    }
}

/* Pane header */
.dnnFormSectionHead span {
    font-size: 18px;
    color: #222;
}

/* Tooltips */
.dnnTooltip {
    position: relative;
    display: block;
    width: 32.075%;
    margin-right: 1.125rem;
}
.dnnHelperTip {
    position: relative;
    display: block;
}
.dnnDragdropTip {
    z-index: 10000;
    position: absolute;
    width: auto !important;
    height: auto !important;
    padding: 0.625rem;
    padding-left: 1.875rem;
    border-radius: var(--dnn-controls-radius, 3px);
    background: rgba(
        var(--dnn-color-background-contrast, 0),
        var(--dnn-color-background-contrast, 0),
        var(--dnn-color-background-contrast, 0),
        0.75) url(../../../../../images/pin-icn.png) no-repeat 7px 12px;
    font-size: 0.6875rem;
    color: var(--dnn-color-foreground-contrast, #DDD);
    text-align: left;
}

span.dnnFormRequired:after,
div.dnnFormItem.dnnFormRequired > div.dnnLabel span:after {
    content: "*";
    display: inline-block;
    margin: 0 0 0 0.3125rem;
    color: var(--dnn-color-danger, red);
    font-size: 1rem;
    line-height: 1rem;
    font-weight: bold;
}

a.dnnFormHelp,
.dnnForm .dnnFormItem a.dnnFormHelp,
.dnnTooltip label a.dnnFormHelp {
    color: var(--dnn-color-foreground, #333);
    text-decoration: none;
    font-weight: bold;
}

a.dnnFormHelp {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 2px;
    width: 14px;
    height: 15px;
    background: url(../../../../../images/helpI-icn-grey.png) no-repeat left 2px;
    padding: 0 !important;
    margin: 0 !important;
}

.aspNetDisabled, a.aspNetDisabled,
.dnnDisabled, a.dnnDisabled {
    border: none;
    background-color: var(--dnn-color-neutral, #ebebeb) !important;
    color: var(--dnn-color-neutral-dark, #ccc) !important;
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.7;
}

/* Required Fields */
.required label:after,
legend.required:after {
    display: inline-block;
    margin-top: -0.125rem;
    margin-left: 0.5625rem;
    padding: 0.0625rem 0.5625rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--dnn-controls-radius, 3px);
    background: rgba(0,0,0,0.03);
    content: 'Required';
    font-weight: normal;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 0.6875rem;
    font-style: italic;
    color: var(--dnn-color-foreground-light, #777);
}

/* Error Styles */
.error label, legend.error {
    color: var(--dnn-color-danger, rgba(255,0,0,0.9));
}
.error{
    input[type="text"],
    select, .error textarea,
    input[type="email"],
    input[type="search"] {
        border: 1px solid var(--dnn-color-danger, rgba(255,0,0,0.6));
        color: var(--dnn-color-danger, rgba(255,0,0,0.7));
    }
}
.dnnFormError{
    label a span {
        color: var(--dnn-color-danger, red);
    }
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        border: 1px solid var(--dnn-color-danger, red);
    }
}
/* Address field */
.dnnAddress input[type="checkbox"] {
    margin: 0 5px;
}

/* Action Items */
.dnnActions {
    float: none;
    clear: both;
    display: block;
    margin: 0;
    padding-top: 1.125rem;
    text-align: left;
    li {
        float: left;
        margin-right: 0.3125rem;
        list-style: none;
    }
}

/* Primary Action */
.dnnPrimaryAction, .dnnFormItem input[type="submit"], a.dnnPrimaryAction {
    background: var(--dnn-color-primary, #3792ED);
    border-color: var(--dnn-color-primary-dark, #0D569E);
    color: var(--dnn-color-primary-contrast, #efefef);
    &:hover, &:active{
        background: var(--dnn-color-primary-light, #6cb6f3);
        color: var(--dnn-color-primary-contrast, #fff);
    }
    &[disabled], &[disabled]:hover, &[disabled]:active {
        background: var(--dnn-color-neutral-light, #ebebeb);
        border-color: var(--dnn-color-neutral-dark, #a7a7a7);
        color: var(--dnn-color-neutral, #444);
    }
}

/* Secondary Action */
.dnnSecondaryAction,
.dnnFormItem input[type="reset"],
 a.dnnSecondaryAction, a.dnnSecondaryAction, .dnnLogin .LoginTabGroup span {
    background: var(--dnn-color-secondary, #f5f5f5);
    border-color: var(--dnn-color-secondary-dark, #f5f5f5);
    color: var(--dnn-color-secondary-contrast, #333);
    &:hover, &:active{
        background: var(--dnn-color-secondary-light, #fefefe);
        color: var(--dnn-color-secondary-contrast, #333);
    }
    &[disabled], &[disabled]:hover, &[disabled]:active {
        background: var(--dnn-color-neutral-light, #ebebeb);
        border-color: var(--dnn-color-neutral-dark, #a7a7a7);
        color: var(--dnn-color-neutral, #444);
    }
}

/* Tertiary Action */
.dnnTertiaryAction, a.dnnTertiaryAction {
    background: var(--dnn-color-tertiary, #eaeaea);
    border-color: var(--dnn-color-tertiary-dark, #c2c2c2);
    color: var(--dnn-color-tertiary-contrast, #333);
    &:hover, &:active{
        background: var(--dnn-color-tertiary-dark, #d8d8d8);
        color: var(--dnn-color-tertiary-contrast, #333);
    }
}

/* Action Button behind input */
.dnnFormItem{
    input[type="text"] + a.dnnPrimaryAction,
    input[type="text"] + a.dnnSecondaryAction,
    input[type="text"] + a.dnnTerriaryAction { 
        margin-left: 0.3125rem;
    }
    input[type="checkbox"] + span,
    input[type="radio"] + span {
        margin: 0.3125rem;
    }
}

/* Help tooltip */
.dnnTooltip .dnnFormHelpContent,
.dnnHelperTip .dnnFormHelpContent {
    visibility: hidden;
    z-index: 10;
    position: absolute;
    width: 200px;
    padding: 10px;
    padding-left: 30px;
    border-radius: var(--dnn-controls-radius, 3px);
    background: var(--dnn-color-info, rgba(0,0,0,0.75));
    font-size: 0.6875rem;
    color: var(--dnn-color-info-contrast, #ddd);
    text-align: left;
}
.dnnFormHelpContent span {
    display: block;
	word-wrap: break-word;
}
.dnnTooltip .dnnFormHelpContent .dnnHelpText {
    word-wrap: break-word;
}

/* Radio Buttons */
.dnnFormRadioButtons label,
.dnnFormItem input[type=radio] + label {
    float: none;
    display: inline;
    width: auto;
    padding-right: 0;
    margin: 0 10px 0 0;
    text-align: left;
    font-weight: normal;
}
.dnnFormRadioButtons {
    float: left;
    display: block;
    width: auto;
    input[type=radio] {
        float: none;
    }
}

/* Text Editor */
.dnnTextEditor {
    margin-bottom: 1.125rem;
}

/* LABEL AND HELP */
.dnnLabel, .dnnFormLabel {
    float: left;
    position: relative;
    width: 32.075%;
    padding-right: 20px;
    margin-right: 18px;
    overflow: visible;
    text-align: right;
    > span {
        text-align: right;
    }
    + span {
        display: inline-block;
        margin-top: 6px;
        margin-bottom: 6px;
        white-space: pre-line;
    }
}
.bottomArrow:after
{
    position: absolute;
    content: "";
    left: 15px;
    bottom: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--dnn-color-info, #000);
}
.topArrow:before {
    position: absolute;
    content: "";
    left: 15px;
    top: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--dnn-color-info, #000);
}
a.pinHelp {
    display: block;
    position: absolute;
    left: 7px;
    top: 12px;
    width: 15px;
    height: 15px;
    opacity: 0.5;
    background: url(../../../../../images/pin-icn.png) no-repeat 0 0;
    filter: contrast(3);
}
.ui-draggable a.pinHelp,
a.pinHelp:hover {
    opacity: 1;
}

/* Input Customised Checkbox*/
.dnnCheckbox {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    img {
        width: 18px;
        height: 18px;
        background: transparent url(../../../../../images/checkbox.png) no-repeat;
        background-position: 0px 0px;
    }
}
.dnnCheckbox-checked img {
    background-position: -51px 0px;
}
.dnnCheckbox-disabled {
    cursor: not-allowed;
    img {
        opacity: .5;
    }
}
.dnnCheckbox-error img {
    background-position: -100px 0px;
}
.dnnCheckbox-checked-error img {
    background-position: -150px 0px;
}
.dnnCheckbox-focus {
    outline: 2px solid var(--dnn-color-forground, black);
    outline-offset: 2px;
}
.dnnBoxLabel{ display: inline-block;}

/* Input Customised Radiobutton */
.dnnRadiobutton {
    display: inline-block;
    cursor: pointer;
    .mark {
        display: inline-block;
    }
    img {
        width: 20px;
        height: 18px;
        min-width: 20px;
        vertical-align: middle;
        background: transparent url(../../../../../images/radiobutton.png) no-repeat;
        background-position: 0px 0px;
    }
}
.dnnRadiobutton-checked img {
    background-position: -50px 0px;
}
.dnnRadiobutton-disabled img {
    opacity: .5;
}
.dnnRadiobutton-checked-error img {
    background-position: -150px 0px;
}
.dnnRadiobutton-error img {
    background-position: -100px 0px;
}
.dnnRadiobutton-focus {
	outline: 2px solid var(--dnn-color-foreground, black);
    outline-offset: 2px;
}

/* Input RadioButton group */
div.dnnFormRadioButtons,
div.dnnHSRadioButtons,
span.dnnFormRadioButtons,
span.dnnHSRadioButtons {
    display: inline-block;
    padding: 10px;
    margin-bottom: 5px;
}
table.dnnFormRadioButtons {
    margin-bottom: 5px;
}
/* We no longer use Telerik but we need to keep this as we still run logic based on this class name. */
.RadComboBox_Default .rcbInput {
    width: 100% !important;
}

/* Input Customised Tags */
div.dnnTagsInput {
    display: inline-block;
    margin: 0;
    padding: 5px 0 0 5px;
    border: 1px solid var(--dnn-color-foreground-light, #c9c9c9);
    border-radius: var(--dnn-controls-radius, 3px);
    background: var(--dnn-color-background, #FFF);
    span.tag {
        display: block;
        float: left;
        padding: 2px 6px 2px 6px;
        margin-right: 5px;
        margin-bottom: 5px;
        border: 1px solid var(--dnn-color-neutral-dark, #c9c9c9);
        border-radius: var(--dnn-controls-radius, 3px);
        font-size: 0.75rem;
        text-decoration: none;
        color: var(--dnn-color-neutral-contrast, #888);
        cursor: pointer;
        background-color: var(--dnn-color-neutral, #eee);
        word-break: break-word;
        &:hover {
            background-color: var(--dnn-color-primary, #e8f1fa);
            color: var(--dnn-color-primary-contrast, #444);
            border-color: var(--dnn-color-primary-dark, #000);
        }
        a {
            display: inline-block;
            width: 8px;
            height: 8px;
            margin: 0.375rem 0 0 0;
            background: transparent url(../../../../../images/dnnTagClose.png) no-repeat;
            background-position: center;
            filter: contrast(5);
        }
    }
    > div > input{
        border: none;
        background: transparent;
        font-size: 0.75rem;
        display: inline-block;
        vertical-align: top;
        height: 1.1875rem;
        padding: 0.5rem 0 0.1875rem 0.1875rem;
        margin-bottom: 0.3125rem;
        &:focus, &:active {
            outline: none;
        }
        &.dnnTagsInvalid {
            display: block;
            float: left;
            margin-right: 5px;
            border: none;
            outline: none;
            border-radius: var(--dnn-controls-radius, 3px);
            background: var(--dnn-color-danger, #FBD8DB);
            cursor: pointer;
            font-size: 0.75rem;
            color: var(--dnn-color-danger-contrast, #90111A) !important;
            text-decoration: none;
        }
    }
    div {
        display: block;
        float: left;
        &.dnnTags_filter {
            float: right;
            position: relative;
            margin: 0 0 0.3125rem 0.3125rem;
            > .dnnTags_filter_label {
                display: inline-block;
                border-left: 1px solid #ccc;
                padding: 3px 15px 0 10px;
                margin-right: 3px;
                color: #999;
                cursor: pointer;
                background: url(../../../../../images/dnnSpinnerDownArrow.png) no-repeat;
                background-position: right center;
                height: 22px;
            }
        }
    }
}

/* POPUP */
.dnnFormPopup {
    position: absolute;
    padding: 1.125rem;
    background: var(--dnn-color-background, #fff);
    box-shadow: 0 0 25px 0 rgba(
        var(--dnn-color-foreground-r, 0),
        var(--dnn-color-foreground-g, 0),
        var(--dnn-color-foreground-b, 0),
        0.75);
	z-index: 100000;
    .dnnFormPopup > * {
        box-sizing: content-box;
    }
    .ui-dialog-titlebar {
        position: relative;
        padding: 0 0 1.125rem 0;
        border-bottom: 1px solid var(--dnn-color-foreground-light, #ddd);
        cursor: move;
        font-size: 1.125rem;
        font-weight: bold;
    }
    .dnnModalCtrl {
        /* This is the min/max button and the close button in module popups like the module settings. */
        /* PNG images are used for the buttons so we need to keep a color that works with white overlay and fixed sizes.*/
        display: block;
        position: absolute;
        top: -30px;
        right: -30px;
        width: 69px;
        height: 26px;
        border-radius: 10px;
        background-color: #fff;
        box-shadow: 0px 0px 5px #666;
        .ui-dialog-titlebar-close {
            float: right;
            display: block;
            height: 18px;
            width: 30px;
            margin: 4px 4px 0 1px;
            overflow: hidden;
            border: none;
            border-top-right-radius: 8px;
            border-bottom-right-radius: 8px;
            background: #585858 url(../../../../../images/closeBtn.png) no-repeat;
            background-position: 8px 4px;
            text-indent: -9999em;
            min-width: 0 !important;
            &:hover{
                background: var(--dnn-color-primary, #358EEA) url(../../../../../images/closeBtn.png) no-repeat;
                background-position: 8px 4px;
                cursor: pointer;
            }
        }
        a.dnnToggleMax {
            float: left;
            display: block;
            height: 18px;
            width: 30px;
            margin: 4px 0 0 4px;
            overflow: hidden;
            border-top-left-radius: 8px;
            border-bottom-left-radius: 8px;
            background: #585858 url(../../../../../images/resizeBtn.png) no-repeat;
            background-position: 10px 2px;
            text-indent: -9999em;
            &:hover {
                background: var(--dnn-color-primary, #358EEA) url(../../../../../images/resizeBtn.png) no-repeat;
                background-position: 10px 2px;
            }
        }
    }
    .ui-resizable-se {
        float: right;
        height: 24px;
        width: 24px;
        background: url(../../../../../images/modal-resize-icn.png) no-repeat bottom;
    }
    .dnnDialog {
        padding: 10px;
    }
    /* Popup Iframe */
    #iPopUp {
        width: 100%!important;
        padding-top: 10px;
    }
    .ui-dialog-content, #iPopUp .ui-dialog-content {
        position: relative;
        border: 0;
        padding: 0px;
        overflow: auto;
        background: var(--dnn-color-background, #fff);
        zoom: 1;
    }
    .ui-dialog-buttonpane {
        margin: .5em 0 0 0;
        padding: .3em 1em 0em 0em;
        overflow: hidden;
        border-width: 1px 0 0 0;
        background-image: none;
        text-align: left;
        border-top: 1px solid var(--dnn-color-foreground-light, #ddd);
        button {
            margin: 0.5em 0.4em 0.5em 0em;
            padding: 0.5em 1em;
            cursor: pointer;
            border: none;
        }
    }
}
/* Loading overlay, block UI */
.dnnLoading {
    background: #fff url(../../../../../images/loading.gif) no-repeat center center;
    position: absolute;
    z-index: 9999;
}
.dnnPanelLoading {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
}