/*Containers*/

.policy-editor { padding:0; margin:0; border-width:0; }

.policy-editor [data-schemaid="root"] *:not(i) { vertical-align:top; }
.policy-editor [data-schemaid="root"]>h3,
.policy-editor [data-schemaid="root"]>p { display:none }
.policy-editor [data-schemaid="root"] .form-control { position:relative; }



/*Override specified container*/
.policy-editor .je-indented-panel,
.policy-editor .je-switcher + div > [data-schematype="object"],
.policy-editor [data-schemaid="root"],
.policy-editor [data-schemaid="root"] i {
    border:0 !important;
    margin:0 !important; padding:0 !important; 
}

.policy-editor .je-switcher + div.je-indented-panel { display:none; }
.policy-editor .je-indented-panel > div > div > div.row { min-height:2.5rem; }

/*Add margin back to root container*/
.policy-editor [data-schemaid="root"] { 
    margin-bottom:1em !important; 
}

/*Hidden*/
.policy-editor .je-object__controls,
.policy-editor [data-schematype="array"] [data-schematype="object"] h3,
.policy-editor [data-schemaid="root"] div:empty,
.policy-editor [data-schemaid="root"] span:empty,
.policy-editor [data-schemaid="root"] label:empty { display:none !important; }

.policy-editor [data-schemaid="root"] > .je-indented-panel p { display:none !important; }
.policy-editor [data-schemapath="root.definition"] > h3,
.policy-editor [data-schemapath="root.definition"] > .je-indented-panel > div > div > div.row:first-child { display:none; }

/*Form controls*/
.policy-editor [data-schemaid="root"] table,
.policy-editor [data-schemaid="root"] table > * {
    padding:0;
    margin:0;
    width:100%;
    border:none;
    border-spacing:0;
}
.policy-editor [data-schemaid="root"] select,
.policy-editor [data-schemaid="root"] input,
.policy-editor [data-schemaid="root"] textarea { 
    margin:0;
    width:100%; 
    padding:0.5em !important;
    font-style:normal;
    min-height:2.5rem;
    max-height:2.5rem;
    background-color:var(--cavelo-white);
}
.policy-editor [data-schemaid="root"] textarea {
    box-sizing:border-box; 
    min-height:6em;
    border-color:var(--cavelo-grey);
    border-radius:2px;
}

.policy-editor [data-schemaid="root"] .je-range-control > output { font-weight:bold; }
.policy-editor [data-schemaid="root"] .je-range-control > input { 
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;
    width: 100%; 
    height: 16px; 
    background: var(--cavelo-platinum); 
    border:1px solid var(--cavelo-grey);
    outline: none; 
    opacity: 0.7; 
    -webkit-transition: .2s;
    -moz-transition: .2s;
    transition: opacity .2s;
    border-radius:2px;
}
.policy-editor [data-schemaid="root"] .je-range-control > input::-webkit-slider-thumb {
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;
    width: 24px; 
    height: 24px; 
    background: var(--cavelo-green); 
    border-radius:2px;
    cursor: pointer; 
    
}
.policy-editor [data-schemaid="root"] .je-range-control > input::-moz-range-thumb {
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;
    width: 24px; 
    height: 24px; 
    background: var(--cavelo-green); 
    border-radius:2px;
    cursor: pointer; 
}

/* Buttons */
.policy-editor [data-schemaid="root"] button {
    position:relative; display:inline-block; 
    box-sizing:border-box; 
    height:3em; 
    width:3em;
    text-decoration:none; 
    vertical-align:middle; 
    outline:none;
    transition:background-color 0.3s, color 0.3s; 
    line-height:1.5;
    text-align:center;     
    border:1px solid;
    color:var(--cavelo-black); 
    border-color: var(--cavelo-platinum);
    background:var(--cavelo-white); 
    font-size:0.8em;    
    right:0;
    cursor:pointer;
}

.policy-editor [data-schemaid="root"] button.json-editor-btn-add:hover { 
    color:var(--cavelo-green); 
    background:var(--cavelo-platinum); 
}

.policy-editor [data-schemaid="root"] button.json-editor-btn-delete:hover { 
    color:var(--cavelo-orange); 
    background:var(--cavelo-platinum); 
}

/* Tables */
.policy-editor .je-indented-panel > table thead { display:none; }
.policy-editor .je-indented-panel > table td { width:auto; padding-bottom:0.5rem; }
.policy-editor .je-indented-panel > table td:last-child { width:3em; text-align:right; }


/*Main containers*/
.policy-editor .row > [data-schemapath="root.name"],
.policy-editor .row > [data-schemapath="root.description"],
.policy-editor .row > [data-schemapath="root.salience"],
.policy-editor .row > [data-schemapath="root.status"],
.policy-editor .row > [data-schemapath="root.definition"],
.policy-editor [data-schemapath="root.definition.condition"],
.policy-editor [data-schemapath="root.definition.exception"],
.policy-editor [data-schemapath="root.definition.actions"] { 
    margin:1em 0 0 0 !important; padding:1em !important; 
    border:1px solid var(--cavelo-platinum) !important;
    border-radius:2px !important;
}

.policy-editor .row > [data-schemapath="root.name"] > .form-control,
.policy-editor .row > [data-schemapath="root.description"] > .form-control,
.policy-editor .row > [data-schemapath="root.salience"] > .form-control,
.policy-editor .row > [data-schemapath="root.status"] > .form-control,
.policy-editor .row > [data-schemapath="root.definition"] {
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:2.5rem;
    align-content:center;
    align-items:center;
}

.policy-editor [data-schemapath="root.definition.actions"] {
    margin-bottom:0;
}
.policy-editor .je-header { 
    font-size:14px;
    font-weight:normal;
    margin-bottom:1em; 
}


/*Conditions*/
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"],
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"],
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] {
    display:grid;
    column-gap:0.5em;
    box-sizing:border-box;
    grid-template-columns: 3rem 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 2.5rem; 
    margin:0 !important; padding:0.5em !important; 
    margin-bottom:0.5em !important;
    border:1px solid var(--cavelo-platinum) !important;
    border-radius:2px !important;
    background-color:var(--cavelo-platinum);
}

/*conditional(and)*/
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"]:first-child::before,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"]:first-child::before {
    font-size:0.8em;
    margin-top:0.8em;
    font-weight:bold;
    content:'match';
    text-align:center;
}
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"]:first-child::before {
    font-size:0.8em;
    margin-top:0.8em;
    font-weight:bold;
    content:'do';
    text-align:center;
}

.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"]:not(:first-child)::before,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"]:not(:first-child)::before,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"]:not(:first-child)::before {
    font-size:0.8em;
    margin-top:0.8em;
    font-weight:bold;
    content:'and';
    text-align:center;
}


.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > label,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > label,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > label {
    display:none;
}
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > select,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > select,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > select {
    grid-column: span 3 !important;
}
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > div {
    grid-column: span 5 !important;
}
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > h3,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > h3,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > h3 {
    display:none;
}
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"],
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"],
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"] {
    margin:0 !important;
    border:0 !important;
    padding:0 !important;
}

/* .policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="boolean"] label, */
.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"] label,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"] label,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] > .je-indented-panel [data-schematype="string"] label {
    display:none;
}

.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] tbody td,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] tbody td,
.policy-editor [data-schemapath="root.definition.actions"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] tbody td { overflow:visible; }

.policy-editor [data-schemapath="root.definition.condition"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] tbody > tr:not(:first-child) td:first-child::before,
.policy-editor [data-schemapath="root.definition.exception"] > .je-indented-panel > div > [data-schematype="object"] > div > [data-schematype="object"] tbody > tr:not(:first-child) td:first-child::before {
    position:absolute;
    font-size:0.8em;
    margin-top:0.8em;
    margin-left:-2em;
    font-weight:bold;
    content:'or';
    text-align:right;
}

.policy-editor [data-schemapath="root.definition.condition"] select,
.policy-editor [data-schemapath="root.definition.condition"] input,
.policy-editor [data-schemapath="root.definition.exception"] select,
.policy-editor [data-schemapath="root.definition.exception"] input,
.policy-editor [data-schemapath="root.definition.actions"] select,
.policy-editor [data-schemapath="root.definition.actions"] input {
    border:0 !important;
    border-radius:2px;
}


.policy-editor [data-schemapath="root.definition.condition"] [data-schematype="object"] button.json-editor-btn-delete,
.policy-editor [data-schemapath="root.definition.exception"] [data-schematype="object"] button.json-editor-btn-delete,
.policy-editor [data-schemapath="root.definition.actions"] [data-schematype="object"] button.json-editor-btn-delete {
    background:var(--cavelo-platinum); 
}
.policy-editor [data-schemapath="root.definition.condition"] [data-schematype="object"] button.json-editor-btn-delete:hover,
.policy-editor [data-schemapath="root.definition.exception"] [data-schematype="object"] button.json-editor-btn-delete:hover,
.policy-editor [data-schemapath="root.definition.actions"] [data-schematype="object"] button.json-editor-btn-delete:hover { 
    background:var(--cavelo-white); 
}

.policy-editor [data-schematype] > label { display:none; }

/* SPECIFIC TO METRICS - split operators into side-by-side */
.policy-editor [data-schemapath*=".event.metric."] .row,
.policy-editor [data-schemapath*=".event.vulnerability."] .row { display:inline-block; }
.policy-editor [data-schemapath*=".event.metric."] .row:first-child,
.policy-editor [data-schemapath*=".event.vulnerability."] .row:first-child { width:50%; }
.policy-editor [data-schemapath*=".event.metric."] .row:last-child,
.policy-editor [data-schemapath*=".event.vulnerability."] .row:last-child { width:calc(50% - 0.5em); margin-left:0.5em; }
.policy-editor [data-schemapath*=".event.metric."] .row:last-child label,
.policy-editor [data-schemapath*=".event.vulnerability."] .row:last-child label { display:none; }


/* SPECIFIC TO RESOURCE ACCESS */
.policy-editor [data-schemapath*="resourceaccess.cooldown"] > .form-control > label,
.policy-editor [data-schemapath*="resourceaccess.eventtype"] > .form-control > label { display:none; }
.policy-editor [data-schemapath*="resourceaccess.eventtype"] > .form-control > select[multiple] {
    max-height:5em;
    overflow-y:auto;
}

/* SPECIFIC TO PERMISSIONS */
.policy-editor [data-schemapath*="permission.permissions"] > .form-control > label { display:none; }
.policy-editor [data-schemapath*="permission.permissions"] > .form-control > select[multiple] {
    max-height:5em;
    overflow-y:auto;
}

/* SPECIFIC TO SOFTWARE */
.policy-editor [data-schemapath*="software.approval"] > .form-control > label,
.policy-editor [data-schemapath*="software.action"] > .form-control > label { display:none; }
.policy-editor [data-schemapath*="software.approval"] > .form-control > select[multiple],
.policy-editor [data-schemapath*="software.action"] > .form-control > select[multiple] {
    max-height:5em;
    overflow-y:auto;
}


/* SPECIFIC TO PORTS */
.policy-editor tr[data-schemapath*=".portRange."] > td > .form-control { position:relative; width:calc(100% - 1em); }
.policy-editor tr[data-schemapath*=".portRange."] > td:nth-child(2) > .form-control { margin-left:1em; }
.policy-editor tr[data-schemapath*=".portRange."] > td:first-child > .form-control::after { position:absolute; content:'to'; right:-1.5em; top:0.5em; }

/* [data-schemapath*=".portRange."] .row { position:relative; margin-bottom:0.5em; }
[data-schemapath*=".portRange."] .row .form-control { position:relative; }
[data-schemapath*=".portRange."] .row .form-control > label { position:relative; display:inline-block; width:80px !important; padding-top:0.5em; text-align:center; }
[data-schemapath*=".portRange."] .row .form-control > input { position:relative; display:inline-block; width:calc(100% - 80px - 1em); margin-left:1em; } */
/* [data-schemapath*=".portRange."] .row .form-control > label::after { position:absolute; display:inline-block; width:50px; z-index:10; top:50%; left:0; transform:translateY(-50%);color: initial; text-align:center; } */
/* [data-schemapath$=".rangeStart"] .form-control > label::after { content:'Start' } */
/* [data-schemapath$=".rangeEnd"] .form-control > label::after { content:'End' } */


.policy-editor #conditions > div:empty,
.policy-editor #actions > div:empty { padding:1em;  }
.policy-editor #conditions > div:empty::before { content:'No conditions' }
.policy-editor #actions > div:empty::before { content:'No actions' }

.policy-editor [data-schemaid="root"] [data-error] input {
    border-color:var(--cavelo-orange-60) !important;
    background-color:var(--cavelo-orange-20) !important;
}

.policy-editor [data-schemapath="root.definition.condition"][data-error],
.policy-editor [data-schemapath="root.definition.exception"][data-error],
.policy-editor [data-schemapath="root.definition.actions"][data-error] {
    border-color:var(--cavelo-orange-60) !important;
}

.policy-editor [data-schematype="boolean"] label { 
    display:grid;
    grid-template-columns:auto 1fr;
    column-gap:0.5rem;
    align-content:center;
    align-items:center;
}



.policy-editor [data-schemapath$="send_email"] > .je-indented-panel > div > div > div.row:nth-child(2) {
    margin-top:0.5rem;
    border-top-left-radius:0.25rem;
    border-top-right-radius:0.25rem;
    border:1px solid var(--cavelo-white);
    border-bottom-width:0px;
    padding:0.5rem 0.5rem 0 0.5rem;
}
.policy-editor [data-schemapath$="send_email"] > .je-indented-panel > div > div > div.row:nth-child(3) {
    border-bottom-left-radius:0.25rem;
    border-bottom-right-radius:0.25rem;
    border:1px solid var(--cavelo-white);
    border-top-width:0px;
    padding:0 0.5rem 0.5rem 0.5rem;
}


.policy-editor [data-schemapath$="send_email.excludeFooter"] > .form-control {
    display:grid;
    grid-template-columns:auto 1fr;
    grid-template-rows:2.5rem;
    column-gap:1rem;
    align-content:center;
    align-items:center;
}


/* .policy-editor [data-schemapath$="send_email.recipients"] > h3.je-header {
    margin:0;
    display:grid !important;
    grid-template-columns:1fr;
    grid-template-rows:2.5rem;
    align-content:center;
    align-items:center;
} */

.policy-editor [data-schemapath$="send_email.footerContent"] > .form-control > label { display:block !important; }
.policy-editor [data-schemapath$="send_email.footerContent"] > .form-control {
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:2.5rem;
    align-content:center;
    align-items:center;
}


.policy-editor [data-schemaid="root"] .form-control .errmsg {
    display:flex;
    align-items: center;
    position: absolute;
    max-width:400px;
    background-color:var(--cavelo-white);
    border:2px solid var(--cavelo-orange);
    font-size:0.8rem;
    padding:0.25em 0.5em;
    z-index:10;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    right:0; top:0;
    transform:translate(100%, 0.2em);
    border-top-left-radius:10em;
    border-bottom-left-radius:10em;

    /* display:none; */
    /* opacity:1; visibility:1;
    column-span:all;
    display:block;
    position:absolute;
    width:auto;
    height:auto;
    white-space: nowrap;
    background-color:var(--cavelo-platinum);
    border:1px solid var(--cavelo-orange);
    z-index:99999;
    text-align:center;
    box-shadow: var(--box-shadow); */
}

/* [data-schemaid="root"] .form-control .errmsg {
    max-width:334px;
    width: auto !important;
}

[data-schemaid="root"] .form-control .errmsg {
    left:0;
    bottom:0;
    transform: translate(calc(-100% - 20px), 0);
    border-top-left-radius:4px;
    border-bottom-left-radius:4px;
    border-top-right-radius:3px;
    border-bottom-right-radius:3px;
    padding:0em 0em 0em 0.5em;
}

[data-schemaid="root"] .form-control .errmsg:after {
    content:'';
    position:relative;
    display:inline-block;
    border-top: 1em solid transparent;
    border-bottom: 1em solid transparent;    
    border-left: 1em solid var(--cavelo-orange);
    border-right: 0em solid transparent;
    left:1em;
    vertical-align:middle;    
} */



 
form[data-theme="barebones"].je-ready * { outline:none; }

form[data-theme="barebones"].je-ready input, 
form[data-theme="barebones"].je-ready select { min-height:2.5rem; padding:0.5rem; margin:0; width:100%; border-color:var(--cavelo-grey); } 
form[data-theme="barebones"].je-ready label { min-height:2.5rem; padding:0.5rem 0; margin:0; } 

form[data-theme="barebones"].je-ready .input-group { position:relative; }
form[data-theme="barebones"].je-ready input + .input-group-append {
    display:block;
    width:fit-content;
    white-space:nowrap;
    position:absolute;
    top:0; right:0;
}
form[data-theme="barebones"].je-ready input + .input-group-append > button { 
    border-width:0; 
}

form[data-theme="barebones"].je-ready select { 
    -moz-appearance:none; /* Firefox */
    -webkit-appearance:none; /* Safari and Chrome */
    appearance:none;
    outline:none;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="rgb(62,62,62)" d="M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>') no-repeat;
    background-position: calc(100% - 0.2rem) center !important;
    background-size:0.75em;
}

form[data-theme="barebones"].je-ready .je-indented-panel { margin:0; padding:0; border-width:0; }
form[data-theme="barebones"].je-ready .je-object__controls { margin:0; padding:0; border-width:0; display:none; }
form[data-theme="barebones"].je-ready .form-control > label { 
    min-height: 2.5rem;
    align-items:center;
    display:inline-flex;
}

form[data-theme="barebones"].je-ready [data-schematype="boolean"] > .form-control,
form[data-theme="barebones"].je-ready [data-schematype="boolean"] > .form-control > label,
form[data-theme="barebones"].je-ready [data-schematype="boolean"] > .form-control > label > input[type="checkbox"] { 
    min-height: 1rem !important;
    height: fit-content;
    padding:0;
}


form[data-theme="barebones"].je-ready input[type="checkbox"] {
    appearance:none;
    display:inline-flex;
    align-items:center;
    padding:0; margin:0;
    margin-right:0.5rem;
}
form[data-theme="barebones"].je-ready input[type="checkbox"]:before {
    position: relative;
    display: block;
    height: fit-content;
    width: fit-content;
    font-family: "Font Awesome 6 Free";
    font-weight: 300;
    font-size: 1.25rem;
    content: "\f0c8";
    color: var(--cavelo-grey);
}

form[data-theme="barebones"].je-ready input[type="checkbox"]:checked:before {
    content: "\f14a";
    color: var(--cavelo-green);    
}


form[data-theme="barebones"].je-ready p {
    display:block; 
    width:100%; 
    background-color:var(--cavelo-platinum-20); 
    border:1px solid var(--cavelo-platinum); 
    color:var(--cavelo-dark-grey) !important;  
    margin-top:0.5rem;
    margin-bottom:0.5rem;
    border-radius:0.5rem;
    padding:0.5rem;
}


form[data-theme="barebones"].je-ready p[style="color: red;"],
form[data-theme="barebones"].je-ready .errmsg { 
    display:block; 
    width:100%; 
    background-color:var(--cavelo-orange-20); 
    border:1px solid var(--cavelo-orange-80); 
    color:var(--cavelo-orange-80) !important;  
    margin-top:0.5rem;
    margin-bottom:0.5rem;
    border-radius:0.5rem;
    padding:0.5rem;
}


form[data-theme="barebones"].je-ready button:hover { cursor:pointer; color:var(--cavelo-green) }
form[data-theme="barebones"].je-ready button.json-editor-btn-delete:hover { color:var(--cavelo-orange); }
form[data-theme="barebones"].je-ready button {
    appearance:none;
    display:inline-flex;
    height:2rem;
    width:2rem;
    align-items:center;
    border:1px solid var(--cavelo-platinum);
    background-color:var(--cavelo-white);
    color:var(--cavelo-black);
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-content: center;
}
form[data-theme="barebones"].je-ready button + button { margin-left:0.2rem; }

form[data-theme="barebones"].je-ready div { width:100%; }
form[data-theme="barebones"].je-ready p { white-space: break-spaces; }

form[data-theme="barebones"].je-ready .row > .root-string > .form-control { display:grid; align-items:center; grid-template-columns:8rem 1fr; width:100%; }
form[data-theme="barebones"].je-ready .row > .root-string > .form-control > * { display:flex; width:100% }
form[data-theme="barebones"].je-ready .row > .root-string > .form-control > *.errmsg { grid-column:span 2; }

form[data-theme="barebones"].je-ready .row > .root-definition { display:grid; align-items:center; grid-template-columns:8rem 1fr; width:100%; }
form[data-theme="barebones"].je-ready .row > .root-definition > * { display:flex; width:100% }
form[data-theme="barebones"].je-ready .row > .root-definition > *:last-child { align-items:start; grid-column:span 2; }

form[data-theme="barebones"].je-ready [data-schemapath="root.definition.condition"] { border:1px solid var(--cavelo-platinum); margin-bottom:1rem; padding:1rem; }
form[data-theme="barebones"].je-ready [data-schemapath="root.definition.exception"] { border:1px solid var(--cavelo-platinum); margin-bottom:1rem; padding:1rem; }
form[data-theme="barebones"].je-ready [data-schemapath="root.definition.actions"] { border:1px solid var(--cavelo-platinum); padding:1rem; }
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.condition.expressions."] > .je-object__controls + div,
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.condition.expressions."] > h3 + div,
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.exception.expressions."] > .je-object__controls + div,
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.exception.expressions."] > h3 + div,
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.actions."] > .je-object__controls + div,
form[data-theme="barebones"].je-ready [data-schemapath^="root.definition.actions."] > h3 + div { display:none !important; } 

form[data-theme="barebones"].je-ready .condition { position:relative; }
form[data-theme="barebones"].je-ready .condition h3 { display:none; }
form[data-theme="barebones"].je-ready .expression h3 { display:none; }
form[data-theme="barebones"].je-ready .expression label { display:none; }

/* form[data-theme="barebones"].je-ready .condition > .je-indented-panel > div > .expression > *:last-child { margin-top:0.2rem; } */
form[data-theme="barebones"].je-ready .condition > .je-indented-panel > div > .expression:before {
    display:grid; 
    position:absolute;
    width:4rem;
    transform:translateX(-4rem);
    font-size:0.8rem;
    font-weight:600;
    left:0; 
    top:0;
    height:2.5rem;
    text-align:center;
    align-items:start;
    align-content:center;
    content:'and';
}
form[data-theme="barebones"].je-ready .condition > .je-indented-panel > div > .expression:first-child:before { content:'match'; }
form[data-theme="barebones"].je-ready .condition > .je-indented-panel > div > .expression:last-child { margin-bottom:1rem; }
form[data-theme="barebones"].je-ready .condition > .je-indented-panel > div > .expression { 
    /* border:1px solid var(--cavelo-platinum); */
    width:calc(100% - 4rem);
    margin-left:4rem;
    display:grid;
    position:relative;
    grid-template-columns:20rem 1fr 2rem;
    column-gap:1rem;
    align-items:start;
}

form[data-theme="barebones"].je-ready .action > .je-indented-panel > div > .expression:before {
    display:grid; 
    position:absolute;
    width:4rem;
    transform:translateX(-4rem);
    font-size:0.8rem;
    font-weight:600;
    left:0; 
    top:0;
    height:2.5rem;
    text-align:center;
    align-items:start;
    align-content:center;
    content:'and';
}
form[data-theme="barebones"].je-ready .action > .je-indented-panel > div > .expression:first-child:before { content:'do'; }
form[data-theme="barebones"].je-ready .action > .je-indented-panel > div > .expression { 
    width:calc(100% - 4rem);
    margin-left:4rem;
    display:grid;
    position:relative;
    grid-template-columns:20rem 1fr 2rem;
    column-gap:1rem;
    margin-bottom:0.5rem;
    align-items:start;
}

form[data-theme="barebones"].je-ready .array-value > div:not(.form-control) { display:none; }
form[data-theme="barebones"].je-ready .array-value {
    display:grid;
    grid-template-columns:1fr 2rem;
    column-gap:1rem;
    margin-bottom:0.5rem;
    align-items:start;
}


form[data-theme="barebones"].je-ready .metric-value > .je-indented-panel > div > div {
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:1rem;
    margin-bottom:0.5rem;
    align-items:start;
}

form[data-theme="barebones"].je-ready .range-value > .je-indented-panel > div > div {
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:3rem;
    margin-bottom:0.5rem;
    align-items:start;
}
form[data-theme="barebones"].je-ready .range-value > .je-indented-panel > div > div > .row:first-child:after { 
    display:grid; 
    position:absolute;
    width:3rem;
    height:2.5rem;
    font-size:0.8rem;
    font-weight:600;
    text-align:center;
    align-items:start;
    align-content:center;
    right:0; 
    top:0; 
    content:'to'; 
    transform:translateX(3rem)
}


/* CHOICES */

form[data-theme="barebones"].je-ready .choices { position:relative; width:100%; }
form[data-theme="barebones"].je-ready .choices > .choices__inner { width:100%; }
form[data-theme="barebones"].je-ready .choices > .choices__inner > * { width:100% !important; }
form[data-theme="barebones"].je-ready .choices[data-type="select-multiple"] > .choices__inner > input.choices__input { 
    display:none; 
    border:1px solid var(--cavelo-platinum); 
    background-color:var(--cavelo-white);
    outline:none; 
    position:absolute; 
    top:100%;
    box-shadow:rgba(0,0,0,0.2) 0px 5px 10px 0px;
    z-index:100;
    
}

form[data-theme="barebones"].je-ready .choices.is-open > .choices__inner > input.choices__input,
form[data-theme="barebones"].je-ready .choices.is-focused > .choices__inner > input.choices__input { color:var(--cavelo-black); display:inline-block; }

form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list {
    position:relative;
    display:flex;
    flex-wrap:wrap;
    min-height:2.5rem;
    border-bottom:1px solid var(--cavelo-grey);
    flex-direction: row;
    /* align-content: flex-start; */
    align-content: center;;
    justify-content: flex-start;
    align-items: flex-start;
}

form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list::after { 
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    position: absolute;
    font-size: 0.7rem;
    content: '\f078';
    height:2.5rem;
    bottom:0; right:0.25rem;
    display:flex;
    align-items:center;
    z-index: 0;
    color:var(--cavelo-black);
}

form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list:empty:before {
    display:flex;
    position:absolute;
    align-items:center;
    align-content:center;
    font-size:0.8rem;
    padding:0.5rem;
    margin:0.1rem;
    bottom:0;
    width:auto;    
}
form[data-theme="barebones"].je-ready label:not(.required) + .choices > .choices__inner > .choices__list:empty:before {
    content:"Any";
    font-size:0.8rem;
    padding:0.25rem 0.4rem;
    border:1px solid var(--cavelo-platinum);
    background-color:var(--cavelo-platinum);
    margin:0.1rem 0.1rem 0.3rem 0.1rem;
    border-radius:0.2rem;
    width:auto; 
}
/* form[data-theme="barebones"].je-ready label.required + .choices[data-type="select-multiple"] > .choices__inner > .choices__list:empty:before {
    content:"Select one or more items ...";
}
form[data-theme="barebones"].je-ready label.required + .choices[data-type="select-one"] > .choices__inner > .choices__list:empty:before {
    content:"Select an item ...";
} */

form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list > .choices__item { 
    font-size:0.8rem;
    padding:0.25rem 0.4rem;
    border:1px solid var(--cavelo-platinum);
    background-color:var(--cavelo-platinum);
    margin:0.1rem;
    border-radius:0.2rem;
    width:auto;    
}
form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list > .choices__item > button { 
    width:1em;
    height:1em;
    margin-left:0.25em;
    appearance:none;
    border:none;
    color:transparent;
    background-color:transparent;
    white-space:nowrap;
    overflow:hidden;
}
form[data-theme="barebones"].je-ready .choices > .choices__inner > .choices__list > .choices__item > button::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    font-size: 0.8rem;
    content: '\f00d';
    cursor: pointer;
    color:var(--cavelo-black);
}


form[data-theme="barebones"].je-ready .choices > .choices__list  { width:100%; background-color:var(--cavelo-white); }
form[data-theme="barebones"].je-ready .choices > .choices__list--dropdown {
    max-height:20rem;
    position:absolute;
    top:calc(100% + 2.5rem);
    left:0; right:0;
    border:1px solid var(--cavelo-platinum);
    overflow-y:scroll;
    box-shadow:rgba(0,0,0,0.2) 0px 5px 10px 0px;
    z-index:100;
}
form[data-theme="barebones"].je-ready .choices[data-type="select-one"] > .choices__list--dropdown { top:100%; }
form[data-theme="barebones"].je-ready .choices[data-type="select-one"] > .choices__list--dropdown > input { z-index:100; }

form[data-theme="barebones"].je-ready .choices > .choices__list--dropdown:not(.is-active)  { display:none; }

form[data-theme="barebones"].je-ready .choices > .choices__list > .choices__list > .choices__item { border-top:1px solid var(--cavelo-platinum); padding:0.25rem; }
form[data-theme="barebones"].je-ready .choices > .choices__list > .choices__list > .choices__item:first-child { border-top:none; }

form[data-theme="barebones"].je-ready .choices > .choices__list > .choices__list > .choices__item--selectable:hover { cursor:pointer; background-color:var(--cavelo-platinum); }
form[data-theme="barebones"].je-ready .choices > .choices__list > .choices__list > .choices__item--selectable.is-highlighted { background-color:var(--cavelo-platinum); }

form[data-theme="barebones"].je-ready [data-container] + [data-container] { margin-top:0.5rem; }



