/*  
    z-index usage, as of 11/22/23

    #ml_cal_header          1       // to support res mgr header fixed position
    product editor popup    100     // in /products/css/productEdit.css
    customer card popup     1006+   // starting number, dynamically modified by ML.WINDOW.promote()
    .reveal-overlay         1005    // foundation default (also set to 9001 in acp-core, maybe to put it above the customer card, which uses reveal)
    .reveal                 1006    // foundation default
    .jqmWindow              3000+   // assigned by jqModal plugin
    #search                 4000    // to keep above jqmWindow's
    .jsPanel                5000+   // assigned by jsPanel plugin (for MLA apps), dynamically modified by ML.WINDOW.promote()
    .mln-modal-wrapper      9000    // in acp-core.css
    .acp-full-modal         9000    // in acp-core.css
    .reveal-overlay         9001    // in acp-core.css and POS style.css (overrides foundation default of 1005)
    #nav-menu-wrapper       10000   // in /assets/theme/core/css/style.css
*/

/* FOUNDATION OVERRIDES
-------------------------------------------------------------------------------------- */

table.hover thead tr:hover {
  background-color: inherit; /*#f3f3f3;*/ }

table.hover tfoot tr:hover {
  background-color: inherit; /*#ececec;*/ }

input[type="checkbox"],
input[type="radio"] { margin: 0.875rem 0 0; } 

input[type="checkbox"].acp-inline-checkbox { margin: 0 .25rem 0 0; }

select{ margin: 0; }

.reveal { border: none; box-shadow: 0 0.125rem 0.313rem #00000066; outline: none; }
.reveal > :last-child { margin-bottom: 1rem; } /* undo a weird Foundation setting of 0 */
.reveal-overlay { z-index: 9001; }

/* LEGACY SUPPORT
-------------------------------------------------------------------------------------- */

.ml_acp_content_point { clear: both; display: block; width: 100%; }

.ui-datepicker table { border-bottom: none; box-shadow: none; }

div.ml-main-e-expiring { background-color: #4fb954; border-color: #4fb954; color: #fff; padding: 1em; max-width: 100%; width: 100%; }
    div.ml-main-e-expiring .fa { font-size: 1.5rem; }
    div.ml-main-e-expiring a { color: #000; }
    div.ml-main-e-expiring .action_link { color: #fff; font-size: 1.5rem; line-height: 1; }

/* CORE
-------------------------------------------------------------------------------------- */

.acp-action-link { color: #2ba6cb; cursor:pointer; line-height: inherit; text-decoration: none; }
.acp-active-icon { left: -8px; position: absolute; top: 0; }
.acp-box { background: #fff; padding: 0.938rem 0; box-shadow: 0 0.125rem 0.313rem #00000066; }
.acp-box-footer { border-top: 1px solid #cacaca; font-size: 0.9rem; margin-top: 1.25rem; padding-top: 1rem; }
.acp-box-footer-2 { background-color: #f5f5f5; border-top: 1px solid #e0e0e0; font-size: 0.9rem; margin-top: 1.25rem; padding-bottom: 1rem; padding-top: 1rem; }
.acp-buttons { margin-top: 1rem; }
.acp-cancel-link { margin-left: 1rem; }
.acp-col-squeeze { width: 1%; white-space: nowrap; }
.acp-date-picker { width: 6rem; }
.acp-display-inline { display: inline-block; }
.acp-error-border { border-color: red; }
.acp-flex-grow-scroll { overflow-y: auto; height: 100%; padding-right: 1rem; }
.acp-font-normal { font-weight: normal; }
.acp-font-small-9 { font-size: 0.9rem; }
.acp-form-text { display: inline-block; margin-bottom: 0.5625rem; padding: 0.5625rem 0; }
.acp-hide { display: none; }
.acp-icon-false { color: red; }
.acp-icon-true { color: green; }
.acp-icon-working { color: #999; }
.acp-info-row { background-color: #eaeaea; font-size: 0.9rem; padding-bottom: 0.625rem; padding-top: 0.625rem; }
.acp-inline-label { display: inline-block; font-size: inherit; }
.acp-inline-tip { margin-left: .5rem; }
.acp-input-hint { color: #999; font-size: 0.9rem; margin-top: 0.25rem; }
.acp-margin-bottom-0 { margin-bottom: 0; }
.acp-margin-bottom-1 { margin-bottom: 1rem; }
.acp-margin-top-1 { margin-top: 1rem; }
.acp-margin-top-2 { margin-top: 2rem; }
.acp-no-wrap { white-space: nowrap; }
.acp-opacity-5 { opacity: 0.5; }
.acp-pointer { cursor: pointer; }
.acp-postfix { padding-left: 0.9375rem; } /* based on Foundation grid-padding-x cell */
.acp-processing { background: url(/images/loading2.gif) no-repeat 10px 10px; padding: 2rem; } /* TODO_SKIN: get a different image? */
.acp-required { color: red; } /* used for some asterisks */
.acp-row-buttons a.button { float: right; margin: 0 0 0 .25rem; }
.acp-section-heading { background: #eaeaea; font-weight: bold; line-height: 1; margin-bottom: .5rem; padding: .5rem 0.625rem; width: 100%; }
.acp-space-children > :not(:first-child) { margin-top: 1rem; }
.acp-table-highlight { color: #ff0000; font-weight: bold; }
.acp-vert-splitter { border-left: 1px solid silver; }
.acp-warning { color: red; }
.acp-warning-border { border-color: orange; }
.acp-width-auto { width: auto; }
.acp-table { background: #FFF; box-shadow: 0 0.125rem 0.313rem #00000066; }
.acp-thead { background-color: #415364; color: #FFF; line-height: 1.313rem; font-size: 1.125rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.acp-tbody .acp-tr:nth-child(even) { background-color: #F1F1F1; }
.acp-tr .cell { margin-top: 0.15rem; padding-top: 1rem; padding-bottom: 0.75rem; min-height: 3.5rem; }
.acp-tr .cell.acp-btn-container { padding-top: 0.5rem; }
.acp-tr .cell.acp-range-container { padding-top: 1.25rem; }

.acp-details-popup { background-color: #fff; border: 1px solid #000; display: none; position: absolute; z-index: 10; }
    .acp-details-popup h4.acp-details-popup-title { font-size: 1.1rem; font-weight: normal; margin: 0; padding: .5rem; }
    .acp-details-popup h4.acp-details-popup-close { color:#8a8a8a; cursor: pointer; float: right; font-size: 1rem; font-weight: bold; margin: 0; padding: .5rem .75rem .5rem 0; }
        .acp-details-popup h4.acp-details-popup-close:hover { color: #0a0a0a; }
    .acp-details-popup table { border: none; border-bottom: none; box-shadow: none; margin-bottom: 0; } /* overrides style.css */

.go_home_on_error { display: inline-block; float: right; background-color: #1779ba; color: #fefefe; margin: 0 0 1rem 0; padding: 0.85rem 1rem; font-size: 0.9rem; cursor: pointer; }

.acp-task-info { font-size: 0.8rem; color: #666; margin: 0.3333rem 0 0; line-height: 1.3333; }

.acp-task-overdue { background-color: pink; }
.acp-task-due { background-color: palegreen; }
.acp-task-pending { background-color: lightblue; }
.acp-task-completed { background-color: #e8e8e8; }

.acp-tasks-tab { 
    background-color: #f8f8f8; 
    border: 1px solid silver; 
    border-top: none; 
    border-bottom-left-radius: 3px; 
    border-bottom-right-radius: 3px; 
    display: inline-block; 
    line-height: 1; 
    padding: .25rem 2rem; 
    position: absolute; 
    top: 0; 
    left: 540px;
}

h4.acp-iconized { border-bottom: 1px solid silver; margin-bottom: 1rem; padding-bottom: 0.5rem; }
    h4.acp-iconized i.fas { margin-right: 0.5rem; }

tr.acp-grand-totals td { font-weight: bold; }
tr.acp-horiz-splitter td { border-top: 1px solid #ddd; }
tr.acp-sticky-highlight { background-color: pink !important; }

label.middle { float: right; font-size: inherit; line-height: inherit; margin-bottom: 0; } /* expands on Foundation's default */
label span.required:after {content: ' *'; color: red; font-weight: bold;}
label.acp-line-height-1 { line-height: 1; }

table thead tr:nth-child(2) { background-color: #c5cfd8; color: #415364; }

table.acp-no-bottom { border-bottom: none; }
table.acp-no-decorations { border: 1px solid #cbcbc8; box-shadow: none; } /* border color is based on what default box-shadow produces */
table.acp-no-shadow { box-shadow: none; }

table.acp-form-table { border-bottom: none; box-shadow: none; }
table.acp-form-table tbody tr:nth-child(even) { background-color: transparent; }

table tbody tr.acp-subsection { background-color: #c5cfd8; }
table.unstriped tbody tr.acp-subsection { background-color: #f1f1f1; border-bottom-color: #ddd; }
table.acp-hover tbody tr:hover { background-color: #fff5d3; /* alt: #fff1c4*/ } /* from https://paletton.com/ using thead background color #415364 and Lightest Pale Pastel preset */

table.acp-top-align tr td { vertical-align: top; }

form.acp-one-liner input { display: inline-block; margin-bottom: 0; width: auto; }
form.acp-one-liner select,
form.acp-one-liner input[type=text] { margin-left: 0.5rem; margin-right: 0.5rem; width: 80%; }
form.acp-one-liner input[type=submit] { vertical-align: inherit; }

form.acp-short-fields select,
form.acp-short-fields input[type=text] { height: 2rem; margin-bottom: 0.5rem; }
form.acp-short-fields input[type=checkbox] { margin-right: 0.5rem; }
form.acp-short-fields .acp-form-label { line-height: 2; margin: 0; padding: 0 0.5rem 0 0; }
form.acp-short-fields .far { line-height: 2; margin: 0; } /* font-awesome icons */

ul.acp-plain { margin: 0; }
    ul.acp-plain li { list-style: none; }

ul.acp-functions { margin: 0; }
    ul.acp-functions li { display: inline-block; list-style: none; margin: 0 .25rem .25rem 0; }
        ul.acp-functions li .fa,
        ul.acp-functions li .far,
        ul.acp-functions li .fas { border: 1px solid #ddd; color: #008CBA; cursor: pointer; font-size: 1.1rem; padding: .3rem; text-align: center; width: 34px; }
        ul.acp-functions li .fa.mln-su,
        ul.acp-functions li .far.mln-su { color: red; }
        ul.acp-functions li .fa.mln-disabled,
        ul.acp-functions li .far.mln-disabled { color: #ccc; cursor: not-allowed; }

        /* tried to get this to work, but no luck. Maybe pick it back up later:
        ul.acp-functions li:nth-child(3):after { content: "\A"; white-space: pre; }
        */

ul.acp-functions-lite { margin: 0; }
    ul.acp-functions-lite li { display: inline-block; list-style: none; margin: 0 .25rem .25rem 0; }
        ul.acp-functions-lite li .fa,
        ul.acp-functions-lite li .far { color: #008CBA; cursor: pointer; font-size: 1.1rem; padding: .3rem; text-align: center; }
        ul.acp-functions-lite li .fa.mln-su,
        ul.acp-functions-lite li .far.mln-su { color: red; }
        ul.acp-functions-lite li .fa.mln-disabled,
        ul.acp-functions-lite li .far.mln-disabled { color: #ccc; cursor: not-allowed; }

div.acp-link-list { border-top: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; height: 500px; overflow-y: auto; }
    div.acp-link-list a,
    div.acp-link-list div.acp-link-list-subtitle { border: 1px solid #f1f1f1; border-top: none; display: block; padding: .25rem .5rem; }
    div.acp-link-list div.acp-link-list-subtitle { background-color: #f1f1f1; }
        div.acp-link-list a:hover { background-color: #fff5d3; } /* same as table.acp-hover tbody tr:hover */
        div.acp-link-list a:last-child { border-bottom: none; }
        div.acp-link-list a.acp-link-list-selected { font-weight: bold; }

div.acp-button-bar { margin-right: 2rem; }
    div.acp-button-bar p.acp-button-bar-title { margin-bottom: .5rem; }

table.acp-voodoo {}
table.acp-voodoo td,
table.acp-voodoo th[scope="row"] { ^font-weight: normal; ^min-width: 7rem; overflow-wrap: break-word; }
table.acp-voodoo th[scope="row"] { ^max-width: 20rem; }
table.acp-voodoo td { ^max-width: 30rem; }

@media only screen and (max-width:1023px){
    table.acp-voodoo {}

    table.acp-voodoo ul.mln-deep-links-h-functions-list { margin: 0; line-height: 1rem; }
    table.acp-voodoo tr:nth-child(even) { background-color: transparent; }
    table.acp-voodoo thead tr { display:none; }
    table.acp-voodoo tr { border: : 1px solid #ddd; border-left: none; border-right: none; padding: 0.5625rem 0; margin-top: -1px; display: block; }
    table.acp-voodoo { border: none; }
    table.acp-voodoo td {
        border: none;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-justify-content: flex-start;
            -ms-flex-pack: start;
                justify-content: flex-start;
        -webkit-align-items: center;
            -ms-flex-align: center;
                align-items: center;
        padding: 0 0 0 8rem;
        margin: 0 .125rem;
        position: relative;
        min-width: 100%
    }
    table.acp-voodoo td:before {
        content: attr(data-label);
        display: inline-block;
        text-align: right;
        font-weight: bold;
        line-height: 1.5;
        margin-left: -8rem;
        margin-right: 0.5rem;
        padding-left: 1rem;
        width: 8rem;
        min-width: 8rem;
        position: relative;
        z-index: 1;
    }
    table.acp-voodoo th[scope="row"] {
        display: inline-block;
        max-width: 100%;
        font-weight: bold;
        padding: 0 0 0 1.25rem;
    }
}

/* based on https://css-tricks.com/rotated-table-column-headers/ */

table.acp-rotate-headers {}
    table.acp-rotate-headers td { border-collapse: collapse; border-right: 1px solid silver; }

    table.acp-rotate-headers th.acp-rotate { height: 140px; white-space: nowrap; } /* override height depending on col content length */
        table.acp-rotate-headers th.acp-rotate > div { transform: translate(25px, 51px) rotate(315deg); width: 30px; } /* translate uses Magic Numbers, 45 is really 360 - 45 */
            table.acp-rotate-headers th.acp-rotate > div > span { color: black; padding: 5px 10px; }
    
    table.acp-rotate-headers th.acp-rotate-odd > div span { background-color: yellow; }
    table.acp-rotate-headers th.acp-rotate-even > div span { background-color: orange; }

    table.acp-rotate-headers td.acp-rotate-odd { background-color: rgba(255, 255, 0, 0.2); } /* yellow with opacity */
    table.acp-rotate-headers td.acp-rotate-even { background-color: rgba(255, 165, 0, 0.2); } /* orange with opacity */

/* loading animation from https://loading.io/css/ */

.lds-ripple { display: inline-block; height: 80px; position: relative; width: 80px; }
.lds-ripple div { border: 4px solid #fff; border-radius: 50%; opacity: 1; position: absolute; animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite; }
.lds-ripple div:nth-child(2) { animation-delay: -0.5s; }
@keyframes lds-ripple {
  0% { height: 0; left: 36px; opacity: 1; top: 36px; width: 0; }
  100% { height: 72px; left: 0px; opacity: 0; top: 0px; width: 72px; }
}

.blockUI.processing { /* these are !important because blockUI sets a default inline style */
    background: red !important;
    border: none !important;
    color: #fff !important;
    top: 25% !important;
    left: 250px !important;
    width: 500px !important;
    box-shadow: 0 0.125rem 0.313rem #00000066; 
    outline: none;
}

.blockUI.processing #blockerMessage { padding: 3rem 4rem; text-align: left; }
    .blockUI.processing #blockerMessage h2 { margin: 0 0 1rem; }
    .blockUI.processing #blockerMessage p:last-child { margin-bottom: 0; }
    .blockUI.processing #blockerMessage .lds-ripple { position: absolute; top: .25rem; right: 0; }

div.mln-modal-wrapper {
    position: fixed;
    display: flex;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 9000;
    background-color: rgba(0,0,0,0.8);
}
div.mln-modal-wrapper div.mln-modal-content {
    margin: auto;
    padding: 1rem 2.5rem;
    background-color: #fff;
    width: 54vw;
    max-width: 54vw;
}
div.mln-modal-wrapper div.mln-modal-content form {
    max-height: 66vh;
    overflow-y: auto;
}
div.mln-modal-wrapper div.mln-modal-content form label {
    font-size: inherit;
}

div.mln-modal-wrapper div.mln-modal-content.processing { background: red; color: #fff; position: relative; }
div.mln-modal-wrapper div.mln-modal-content.processing .lds-ripple { position: absolute; top: .25rem; right: 0; }
div.mln-modal-wrapper div.mln-modal-content.processing a { color: #fff; text-decoration: underline; }

div.mln-modal-wrapper div.mln-modal-content-errors { background-color: yellow; border-radius: .25rem; color: #000; display:none; line-height: 1; margin-bottom: 1rem; padding: .5rem; text-align: center; }

@media only screen and (max-width:39.99875em){
    div.mln-modal-wrapper div.mln-modal-content {
        width: 75vw;
        max-width: 75vw;
    }
}

.acp-full-modal { 
    background-color: #f4f4f1;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9000;
}
.acp-full-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.acp-full-modal-content-padded {
    padding: 1rem;
}
.acp-full-modal-content .mln-flex-grow {
    flex-grow: 1;
    min-height: 10vh; 
}

/* Debugging window */
#debuggingme {
    max-height: 20em;
    overflow: auto;
}

#debuggingme span.log, #debuggingme span.warn, #debuggingme span.error {
    float:left;
    clear:both;
} 

#debuggingme span.show_log, #debuggingme span.show_warn, #debuggingme span.show_error {
    float:left;
    margin-right: 2em;
} 

#debuggingme span.show_log {
} 

#debuggingme span.show_warn, #debuggingme span.warn {
    background-color:#FFFF00;
} 

#debuggingme span.show_error, #debuggingme span.error {
    background-color:#FF0000;
} 

#debuggingme span.hiding {
    opacity:0.5;
}

/* OLD STUFF
------------------------------------------------------------------------------------------ */

/* note: various things still use this, typically to make a <span> look like a link */
.action_link { color: #2ba6cb; cursor: pointer; line-height: inherit; text-decoration: none; }

/* TODO_SKIN: look for any lingering uses of ml-form */
form.ml-form { margin-top: 1rem; }
form.ml-form label { font-weight: bold; line-height: 2.3125rem; text-align: right; }
form.ml-form select { margin-bottom: 1rem; }
form.ml-form input[type="checkbox"] { margin-top: 0.875rem; } /* weird, but works */
form.ml-form .ml-form-no-margin { margin: 0; }

.mln-search-criteria_include,
.mln-search-criteria_exclude { border: 3px solid transparent; margin-bottom: 1rem; }

.mln-search-criteria_include h4,
.mln-search-criteria_exclude h4 { background-color: #ddd; margin: 0; padding-left: 0.9375rem; padding-right: 0.9375rem; }

.mln-search-criteria_include { border-color: #66A3CC }
.mln-search-criteria_exclude { border-color: #E18185 }

.mln-search-criteria_blocks { margin: 0; margin-top: .5rem; }
    .mln-search-criteria_block {}
        .mln-search-criteria_block h5 { border-bottom: 1px solid #999; }
        .mln-search-criteria_block .mln-search-criteria_pair { margin: 0 0 0.5rem; }
        .mln-search-criteria_block .mln-search-criteria_pair:last-child {word-break: break-all;}

