/*-- VCB Variables --*/
vcb {
    --vcb-el-pad: .25rem;
    --vcb-ico-size: 1.25rem;
    --vcb-btn-size: 3rem;
    
    --vcb-header-height: 4rem;
    --vcb-title-icon-size: 4rem;
    --vcb-title-font-size: 2rem;
    --vcb-date-font-size: 1.75rem;
    --vcb-date-bigger-font-size: 1.5em;
    
    --vcb-footer-height: 3.5rem;
    --vcb-footer-font-size: 1.5rem;
    --vcb-lastupdate-font-size: 1.25rem;
    --vcb-total-font-size: 2.5rem;

    --vcb-header-color: orange;
    --vcb-header-view-only-color: steelblue;
    --vcb-main-color: #444;
    --vcb-footer-color: #888;
    
    --vcb-title-icon: url(../EMSD.ico);
    --vcb-date-icon: url(../assets/calendar.svg);
    --vcb-lastupdate-icon: url(../assets/pen.svg);
    --vcb-total-icon: url(../assets/total.svg);
    --vcb-touchlock-icon: url(../assets/finger.svg);
}
:root {
    --vcb-btn-O-size: 2.5rem;
    --vcb-btn-o-size: 1.75rem;
    --vcb-btn-o-border: .25rem solid;
}

button>*, btn>*, .btn>*, .btn-O>*, .btn-o>* { pointer-events: none; }
/* .btn {} */
.btn-O, .btn-o { background-color:grey;
    box-sizing: border-box;
    border-radius: 50%;

    /* color: white; */
    font-weight: 900;
    cursor: pointer;
    flex: 0 0 auto;

    display: flex;
    place-content: center;
    align-items: center;
}
.btn-O {
    width: var(--vcb-btn-O-size);
    height: var(--vcb-btn-O-size);
}
.btn-o {
    width: var(--vcb-btn-o-size);
    height: var(--vcb-btn-o-size);
    border: var(--vcb-btn-o-border);
    font-size: calc(var(--vcb-btn-o-size)*.75);
}



/*-- VCB Structure --*/
vcb, vcb>*, vcb>*>* { 
    display: flex; 
    place-content: stretch;
    align-items: center;
}
vcb {
    width:100%; height:100%;
    flex-flow: column;
    align-items: stretch;
}
vcb>*:nth-child(2),
vcb>*>*:nth-child(2) { flex: 1; }


/*-- VCB Style --*/
vcb>*:nth-child(1)>*,
vcb>*:nth-last-child(1)>* { margin: 0 var(--vcb-el-pad); }

vcb .ico-itm { font-weight: bold; }
vcb .ico-itm::before {
    width : var(--vcb-ico-size);
    height: var(--vcb-ico-size);
    content: '';
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: .05em;
    filter: invert(100%);
    flex: 0 0 auto;
}


vcb > header { background: var(--vcb-header-color);
    padding: var(--vcb-el-pad);
    font-size: var(--vcb-title-font-size);
}
vcb.view-only > header { background: var(--vcb-header-view-only-color); }

vcb > header > title { 
    white-space: nowrap;
    overflow: hidden;
}
vcb > header > title::before { background-color: white;
    width : var(--vcb-title-icon-size) !important;
    height: var(--vcb-title-icon-size) !important;
    background-image: var(--vcb-title-icon); 
    background-size: 90% !important;
    border-radius: 25%;
    margin-right: .1em;
    filter: none!important;
}

vcb > header > date {
    font-size: var(--vcb-date-font-size);
    align-items: baseline;
    white-space: nowrap;
}
vcb > header > date::before {
    background-image: var(--vcb-date-icon);
}
vcb > header > date > span {
    font-size: var(--vcb-date-bigger-font-size);
}


vcb > main { background: var(--vcb-main-color);
    overflow: auto;
    flex-direction	: column;
}


vcb > footer { background: var(--vcb-footer-color);
    padding: var(--vcb-el-pad);
    min-height: var(--vcb-footer-height);
    font-size: var(--vcb-footer-font-size);
    align-items: center !important;
}

vcb > footer > lastupdate { font-size: var(--vcb-lastupdate-font-size);}
vcb > footer > lastupdate::before {
    background-image: var(--vcb-lastupdate-icon); 
}
vcb > footer > total {
    font-size: var(--vcb-total-font-size);
}
vcb > footer > total::before { 
    background-image: var(--vcb-total-icon);
}


/*-- Touch Lock --*/
touchlock { background-color: #0f0;
    width: 2.5rem; height: 2.5rem;
    border: none; border-radius: 50%; 
    padding: 0; vertical-align: middle;
    overflow: visible;
    background-image: url(../assets/finger.svg);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
}
touchlock.lock { background-color: #ccc;
    filter: invert(100%); opacity: 0.5; 
    position: relative
}
touchlock.lock:before {
    position: absolute;
    content: '';
    left: 0;
    top: 50%;
    right: 0;
    border-top: .25rem solid;
    border-color: inherit;
    transform:rotate(-45deg);
}
    
	@keyframes lockTimeout {
		0%   { transform: scale(1.5); background-color: red; }
		/*50%  { transform: scale(1.5); }*/
		100% { transform: scale(1); opacity: 1; }
	}
	.ani {
		animation: lockTimeout 1s;
		position: relative;
		z-index: 3000;
	}


/*-- alert --*/
alert.btn-o { background: yellow;
    border-color: red;
    color: red;
}

alert-box { background:rgb(255, 255, 128);
    max-width: 70vw; max-height: 40vh;
    width: auto; overflow: hidden;
    text-align: center; 
    border-radius: 0.5rem;
    font-size: 1.5rem;
    display: flex;
    flex-flow: column;
}
alert-box .title {
    background: red;
    color: white;
    font-weight: bold;
    padding: 1rem;
}
alert-box .list { background: white; 
    overflow: auto;
}
alert-box .list-item { 
    line-height: 3rem;
    margin: 0;
    padding: .5rem 1rem;
}
alert-box .list-item:nth-child(even) { background: #f0f0f0; }
alert-box .btn-clear-alerts {
    max-width: 8rem;
    margin: 1rem;
    align-self: center;
    cursor: pointer;
}


/*-- Report --*/
report { background: #eee; 
    width: 2.25rem; height: 2.25rem; 
    padding: .25rem;
    border-radius: 50%; 
    overflow: visible; 
    cursor: pointer; 
}
report img { filter:invert(50%); }

report-box { background: white; 
    max-width: 70vw; max-height: 70vh;
    width: auto; overflow: hidden;
    text-align: center; 
    border-radius: 0.5rem;
    font-size: 1.5rem;
    display: flex;
    flex-flow: column;
}
report-box .title {
    background: #444;
    color: white;
    font-weight: bold;
    padding: 1rem;
}
report-box .list {
    overflow: auto;
}
report-box .list-item { 
    line-height: 3rem;
    margin: 0;
    padding: .5rem 1rem;
    cursor: pointer;
}
report-box .list-item:nth-child(even) { background: #f0f0f0; }
report-box .list-item:hover { background: #ddd; }
report-box .no-item { margin: .5rem; padding: .5rem; line-height: 3rem; color: lightgrey; }


/*-- Page & Search --*/
footer toolbar {
    place-content: space-around;
}

page, search {
    flex: 0 1 auto;
    min-width: 4rem;
    margin: .25rem;
}

/* ~~~ */
search { display: flex; align-items: center; } 
search #fx { color: white; margin: .5em; }
search #fx.on { color: #0ff; background-color: #f0f; }

vcb:has(search #fx.on) .search-fx-blink {
    animation: search-blink 1s infinite; /*alternate;*/
}
@keyframes search-blink {
    0% { background-color: #0ff; }
    25% { background-color: #0ff; }
    100% { background-color: #f0f; }
}


/* Eye-catching animation effect class for all results */
.highlight-all {
    animation: pulse-highlight-all 1s infinite alternate; 
}
/* Eye-catching animation effect class for the *specific* clicked result */
.highlight-single {
    animation: pulse-highlight-single 1s ease-out forwards; /* Only runs once */
    background-color: orange !important;
}
@keyframes pulse-highlight-all {
    0% { background-color: yellow; }
    100% { background-color: orange; }
}
@keyframes pulse-highlight-single {
    0% { background-color: orange; box-shadow: 0 0 10px 5px rgba(255, 165, 0, 0.9); transform: scale(1.05); }
    100% { background-color: yellow; box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.7); transform: scale(1); }
}
/* ~~~ */

search input[type=search] {
    border: none;
    border-radius: .5rem;
    width: 100%; height: 3rem;
    padding: .5rem .25rem .5rem 3rem; /*9px 4px 9px 40px;*/
    background: white url(../assets/search.svg) no-repeat 13px center;
    font-size: 1.25rem;
}
search input[type=search]:placeholder-shown {  background-color: #aaa; }
search input[type=search]:focus { background-color: white; }
search input[type=search]::placeholder { color: #ddd; }
search input[type=search]:focus::placeholder { color: #bbb; }

page dropdown {
    width: 100%;
    font-size: 1.25rem;
    /* padding: 0 .5rem; */
    margin-right: 1rem;
    border: none;
    border-radius: .5rem;

    display: flex;
    flex-flow: column;
}


/*-- Page Dropdown --*/
dropdown #master::before { background-image: url(../assets/globe.svg);
    background-size: 75%;
    filter:opacity(30%);
}
dropdown #dept0::before { background-image: url(../assets/logo/ambulance.svg); background-size: 80%; }
dropdown #dept1::before { background-image: url(../assets/logo/police.svg); }
dropdown #dept2::before { background-image: url(../assets/logo/postal.svg); background-size: 125%; }
dropdown #dept3::before { background-image: url(../assets/logo/wsd.svg); background-size: 80%; }

droplabel { background: white;
    width: 100%;
    font-size: 1.25rem;
    border-radius: .5rem;
    white-space: nowrap;
    cursor: pointer;
}

dropdown a { display: block; }
dropdown a::before, droplabel::before {
    width: 2em; height: 2em;
    content:'';
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
    margin: .25em;
}

droplist {
    position: absolute;
    bottom: var(--vcb-footer-height);
    background-color: #f9f9f9;
    width: max-content;
    min-width: 10rem;
    box-shadow: 0 .5rem 1rem 
        0 rgba(0, 0, 0, 0.2);
    z-index: 1;
}

droplist a {
    color: black;
    padding: .75rem 1rem;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

droplist a:hover {
    background-color: #f1f1f1
}

/*dropdown:hover droplist {
    display: block;
}*/

/* dropdown:hover .dropbtn {
    background-color: yellow;
} */
