﻿/*//TODO: move this to DBx stylesheets or in to core PWii classes

    .pwlist textarea, .pwlist input {
        display: inline-block;
        width: 610px;
        font-family: "Helvetica Neue","Segoe UI",helvetica,verdana,sans-serif;
        line-height: 1.33334;
        padding: 3px 4px;
        min-height: 24px;
        background: white;
        border: 1px solid #5f81c0;
    }

        .pwlist input[type='checkbox'], .pwlist input[type='radio'] {
            width: auto;
            height: 1ex;
        }

/*.pwlist textarea {
    min-height: 5em;
    overflow: auto;
}* /
    .pwlist span {
        display: inline-block;
        width: 108px;
        float: left;
        font-size: 12px;
        color: #305496;
    }
    span.pwsubheading {
        display: block;
        clear: both;
        width: 100%;
        font-size: 14px;
        font-weight:bold;
    }
    label.pwcaption {
        color: #305496;
        align-items: flex-start;
    }
    span.compulsory{
        color:red;
        width:1em;
        float:left;
    }
pw-compound-row {
    float: left;
    clear: right;
    width: 100%;
}
pw-multi-choice label, pw-multi-select label {
    color: #305496;
}
    */

/* 
    CSS for PW components 
    CSS which are dependent on how individual components are written.  Mostly about layout and an integral part of the component they support.

    Naming convention 
     - all styles start with "pw"
     - pwlowercasewithoutbreaks

    Replaceable sets have syntax
        pw<stem>-<value>
        pw<stem>-<value>
    e.g.
    pwsolo-editable
    pwsolo-readonly
    pwsolo-disabled

    By using function PwClassReplace the style can easily be changed at runtime
    to another within the set.


:root {
    /* For widths "px" suffix is compulsory.  Browsers erratically require and assume it.
                                Even if a plain number works in a situation, it might not work in another. * /
    --pwcaptionwidth: 124px; /* + 4px right margin * /
    --pwsolowidth: 101px; /* date, money, number* /
    --pwsolowidthgrid: 75px; /* date etc in a grid * /
    --pwsolowidthwide: 244px; /* Text and drop down.  With caption fills one column of 2-column form. 
                                  Should be 246px, but too wide in 2-column form.  Don't know why. * /
    --pwsolowidthfull: 100%; /* full width, esp when double column * /
}
 
/*** Classes for components, generic *** /

.pwcaption {
    align-items: center; 
    display: flex;
}

.pwcaption span:first-of-type /* Only apply to span for caption, not any other spans that might be in the control proper * / {
    width: var(--pwcaptionwidth);
    margin-right: 4px;
    display: inline-block;
}

.pwcaption-top {
    align-items: center;
    display: block;
}
    
.pwcaption-top span:first-of-type /* Only apply to span for caption, not any other spans that might be in the control proper * / {
    width: var(--pwcaptionwidth);
    display: inline-block;
}

input.pwsolo-Editable[type=checkbox]{
    width:1em;
}

.pwsolo-editable {
    width: 100%;
}

.pwsolo-align-centre{
    margin-left:auto;
    margin-right:auto;
    margin-top:0px;
    margin-bottom:0px;
}
END OF //TODO: move this to DBx stylesheets or in to core PWii classes
*/

/*** Classes for components, solo generic ***/

.pwcaption {
    display: inline-flex;  /* For pwcompulsory margin */
}

.pwcompulsory {
    color: red;
    margin: auto 2px auto auto;
}

/*** Classes for components, solo specific ***/
pw-memo textarea, pw-memo-2check textarea {
    /* memo expands as typing, up to 12 lines */
    field-sizing: content;
    width: 100%; /* Fill parent control */
    padding: 0px;
    min-height: 2lh;
    max-height: 12lh;
}

.tab-shown {
    display: block;
}

.tab-hidden {
    display: none;
}

pw-page > pw-memo span:has(textarea) {
    width: var(--PAGE-WIDTH);
}

/*** Classes for components, Compound specific ***/
.pwform {
    display: block;
}


.pwlist {
    display: block;
    > * {
        display: block;
    }
}

