/*---------------------------------------------------------------------
#| Copyright (c) 2007,2008,2009,2010,2011,2012,2013,2014,2015,
#|               2016,2017 James Smith
#+----------------------------------------------------------------------
#| The census system is free software: you can redistribute
#| it and/or modify it under the terms of the GNU Lesser General Public
#| License as published by the Free Software Foundation; either version
#| 3 of the License, or (at your option) any later version.
#|
#| This program is distributed in the hope that it will be useful, but
#| WITHOUT ANY WARRANTY; without even the implied warranty of
#| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#| Lesser General Public License for more details.
#|
#| You should have received a copy of the GNU Lesser General Public
#| License along with this program. If not, see:
#|     <http://www.gnu.org/licenses/>.
#+--------------------------------------------------------------------*/

/* Census style sheets - stylesheets for index, forms and reports
//
// Author:  james@curtissmith.me.uk James Smith
// Created: Oct 2016 - Complete HTML/CSS/JS re-write to bring site up
//                     to date.. Some of the markup is taken from
//                     the Pagesmith templating by the same author
//
// Version history:
//  2016-12-20 - re-written from Netscape 3/IE 5 supporting table based
//             - layouts - aim to make reports easier to generate and
//             - simplify markup/minimize download..
//
// Note some of the CSS is based on styles developed for the open
// source project Pagesmith (by the same author) for Genome Research
// Limited - which is released under the same license.
*/

.debug td { border: 1px #fdb solid }

.loginwarn { clear: both; background-color: #fdb; font-weight: bold; padding: 0.5em 2em; text-align: center; border-radius: 1em }
body { margin: 0 auto; font-family: 'Roboto', Arial, Helvetica, sans-serif; padding: 0 }
#wrap { max-width: 960px; padding: 0; margin: 0 auto }
.wide #wrap { max-width: none }
/** For the login page **/
.header svg { float:left;  width:220px; height: 160px; margin: 10px 40px 40px}
path { fill:#7413dc }
.header h1, .header h2, .c { text-align: center }
.header h1 { font-size: 1.2em }
.header h2 { font-size: 1.5em }
.return h2 { font-size: 1.2em }
.clear { clear: both }

h1.bd { font-size: 1.5em }
@media print {
  h1.bd { display: none }
  body { font-size: 75% }
}
a { text-decoration: none }
a:hover { text-decoration: underline }
p, h3 { padding: 2px 5px; margin-bottom: 0.25em }
li p { padding: 0; margin: 0 }
li { margin-bottom: 0.5em; margin-top: 0.5em }
/* Put a box around the input form */
form { padding: 5px 1em }
form#login { border-radius:10px; border: 3px solid #ccc; padding: 5px 1em; margin: 1em; clear: both }
li form { padding: 0; display: inline-block; }
/* Two col layout for dl/dt and forms.. */
dl.c2 dt {
  clear: both; float: left; width: 28%;
  margin: 0.5em 0; padding: 2px 0.5em;
  text-align: right;
}
dl.c2 dd { float: right; width: 65%; margin: 0.5em 0 }
dl.c2 dd input { width: 90%; border: 1px solid #666 }
.login dl.c2 dd input { font-size: 1.2em; }
dl.c2c { overflow: auto; height: 600px }
dl.c2c dt, dl.compact dd { margin: 0 ; font-size: 80%; padding: 2px }

p.in2 { font-weight: bold; padding: 0 0.5em; margin-bottom: 0 }
.ct dl.in2 dt { width: 66%; text-align:left}
.ct dl.in2 dt small { font-weight: normal; display: block }
.ct dl.in2 dd { width: 30%; text-align: right }
.ct dl.in2 dd input { width: 2em }
.ct dl.in2 dt.fifty { width: 45% }
.ct dl.in2 dd.fifty { width: 50% }
.ct dl.in2 dt.pc { width: 60% }
.ct dl.in2 dd.pc { width: 35% }
.ct dl.in2 dd.pc input { width: 6em }
.ct dl.add dt { width: 25% }
.ct dl.add dd { width: 70% }
.ct dl dt.fw { width: 100%; text-align: left; float: none; clear: both }
.ct dl dd.fw { width: 100%; text-align: right; float: none; clear: both }
.ct dl dd.fw input { width: 90% }
dl.c2 dd textarea { width: 90%; border: 1px solid #666 }

/* submit box layout */
form p.c input { border-radius: 0.75em; padding: 0.25em 1em; background-color: #fff; border: 2px solid #ccc; margin: 0.25em 1em 0; display: inline-block; font-weight: bold; vertical-align: middle }
form p.c input:hover          { background-color: #ccc }
form p.c input[type="submit"] { font-size: 1.5em; border-radius: 1em; }
/* Two col layout */
.col2 { width: 48%; float: right }
.col1 { width: 48%; float: left }
.col2x { width: 24%; float: right }
.col1x { width: 72%; float: left }

/* footer */
footer { clear: both; padding-bottom: 2rem  }
#inst { margin-top: 0; border-top: 1px solid #4d1979; font-size: 0.77em; }
#inst p { padding: 0 10px }
@media screen {
  #inst>span { display:block; width: 40%; float: right; text-align: right; padding: 0 10px; margin: 1em 0 }
  #inst>span a { white-space: nowrap }
  #inst p:first-of-type { width: 55% }
  #inst p.full-width { width: auto }
  #inst p:last-of-type { clear: both }
}
@media print {
  #inst { font-size: 60% }
  #inst>span { display: none;}
  #inst p:first-of-type, #inst p.full-width { float: left; width: 35%; text-align: left  }
  #inst p:last-of-type{ float: right; width: 59%; text-align: right }
}

/* Status icons for use in forms */

.f td:first-child { width: auto }
.f td { width: 4em }
.f td.tot:first-child, .f td.tot { vertical-align: bottom }
table.vw td.tot>span { border: 0; }
.tot>span:after, span.blank:after, span.ok:after, span.warn:after, span.error:after {
  width: 1em; height: 1em; line-height: 1em; text-align: center; display: inline-block; font-size: 0.9em;
border-radius: 0.5em; margin: 0 0.25em; content: '';      color: #fff; background-color: #fff }

span.ok:after    { content: '\2714'; color: #090; background-color: #cfc }
span.warn:after  { content: '?';     color: #d60; background-color: #fdb }
span.error:after { content: '\2718'; color: #900; background-color: #fcc }


/* General alignment classes */
.c { text-align: center }
.r { text-align: right }
.rx { text-align: right }
.l { text-align: left }

#wrap table .r { text-align: right; vertical-align: bottom }
/* Button class */

.header_bar { padding: 8px; font-size: 0.8em }
.header_bar .buttons { float: right; margin: -6px }
.btt { font-weight: bold; padding: 3px 0.5em; border-radius: 3px; text-decoration: none; color: #000; margin: 3px; display: inline-block; width: 3.5em; text-align: center; border: 1px solid #000; }
.btt:hover { background-color: #000; color: #fff }
#filter .btt { font-size: 70%; width: 6em}
a.btt:hover { text-decoration: none }
/* Group bar colours! */
.bar_A, .bar_S, .bar_C, .bar_D, .bar_G, .bar_R, .bar_X { clear: both }
.bar_A   { background-color : #fcc } .bar_S .btt:hover { color: #fcc }
.bar_S   { background-color : #fdb } .bar_S .btt:hover { color: #fdb }
.bar_C   { background-color : #cfc } .bar_C .btt:hover { color: #cfc }
.bar_D   { background-color : #fcc } .bar_D .btt:hover { color: #fcc }
.bar_G   { background-color : #ccf } .bar_G .btt:hover { color: #ccf }
.bar_R   { background-color : #ffc } .bar_R .btt:hover { color: #ffc }
.bar_X   { background-color : #ecf } .bar_X .btt:hover { color: #ecf }
/* Now the media tweaks */

.ct { padding: 0 10px 2em;}

@media screen and (max-width: 800px) {
  .ct { padding: 0 10px 2em; overflow: auto }
  .col1, .col2,
  .col1x, .col2x { float: none; width: 100% }
}

/* Make forms label over input */
@media screen and (max-width: 479px) {
  dl.c2 dt, dl.c2 dd {width: 100%; float: none }
  dl.c2 dt { text-align: left }
  dl.c2 dd { text-align: right }
  .header svg { display: block; margin: 0 auto; float: none; width: 200px; height: 120px }
}

.header_bar:after, dl.c2:after { content:"."; display:block; height:0; clear:both; visibility:hidden; }

table { border-collapse: collapse; }
td { padding: 2px; }
.le { border-left: 1px solid black;  }
.re { border-right: 1px solid black; }
.te td, .te, .tdis td, .tdis { border-top: 1px solid black;  }
.be td, .be { border-bottom: 1px solid black; }
.td td:first-of-type { text-align: right; font-weight: bold; vertical-align: bottom; }
p.te { padding-top: 0.25em }

/* CSS for the main index page - status r-sum and list of children... */
.stsum,
.lc { width: 95%; margin: 0 auto}
.lc td:last-child, .lc table td:first-child { text-align: center; }
.lc td { vertical-align: top; }
.lc .header td { font-weight: bold }
.lc .header td:last-child  { width: 15% }
.lc td:first-child { width: 20%; text-align: right; padding-right: 1em }
.stsum tbody td { text-align: right; width: 25%; vertical-align: top}
.stsum tbody td:first-child { width: 50% }
.total td { font-weight: bold }
.stsum th:first-child,
.stsum td:first-child { border-left: 1px solid #666; padding-left: 1em }

/* Dashboard CSS */
.r-dash td { font-size: 0.8em }
.r-dash .sp td { padding: 0.5em 0 }
.r-dash td { text-align: center }
.r-dash th.q { font-size: large; text-align: center }
.r-dash th.le { border-right: 1px solid black; text-align: right; padding-right: 0.5em  }
.r-dash .t td, .r-dash .t th { border-top: 1px solid black; }
.r-dash td.n { text-align: right }
.r-dash .b td, .r-dash .b th { border-bottom: 1px solid black; }
.r-dash { width: 95%; border: 0; border-collapse: collapse; margin: 0px auto }

.r-dash td { width: 3.75% }
.r-dash td:nth-of-type(0) { width: 17.5% }

/* Recent r-ch */
.r-ch { width: 95%; margin: 0 auto }
.r-ch td:nth-of-type(1),
.r-ch td:nth-of-type(4) { text-align: right; width: 6%; padding-right: 0.5em }
.r-ch td:nth-of-type(2) { width: 20% }
.r-ch td:nth-of-type(5) { width: 13%; text-align: center }
.r-ch td:nth-of-type(3) { width: 55% }

.r-recovery { width: 95%; margin: 0 auto }
.r-recovery th { border-bottom: 1px solid black }
.r-recovery .totals td { border-top: 1px solid black; border-bottom: 1px solid black }
.r-recovery th.gpn, .r-recovery td.gpn { font-size: 0.8em; width: 10% }
.r-recovery th.orgn .r-recovery td.orgn { font-size: 0.8em; width: 6% }

.r-recovery th, .r-recovery td { font-size: 0.8em }

.r-recovery.cols-0 th, .r-recovery.cols-0           td { width: 5% }
.r-recovery.cols-0 th.gpn, .r-recovery.cols-0.gpn   td { width: 20% }

.r-recovery.cols-1 th, .r-recovery.cols-1           td { width: 4.5% }
.r-recovery.cols-1 th.gpn, .r-recovery.cols-1.gpn   td { width: 18% }
.r-recovery.cols-1 th.orgn, .r-recovery.cols-1.orgn td { width: 10% }

.r-recovery.cols-2 th, .r-recovery.cols-2           td { width: 4.25% }
.r-recovery.cols-2 th.gpn, .r-recovery.cols-2.gpn   td { width: 16% }
.r-recovery.cols-2 th.orgn, .r-recovery.cols-2.orgn td { width: 8% }

.r-recovery.cols-3 th, .r-recovery.cols-3           td { width: 4% }
.r-recovery.cols-3 th.gpn, .r-recovery.cols-3.gpn   td { width: 12% }
.r-recovery.cols-3 th.orgn, .r-recovery.cols-3.orgn td { width: 8% }



/* Progress report */
.r-prog { margin: 0 auto; width: 90%; font-size: 90% }
.r-prog tr.bg_0 { background-color: #f66 }
.r-prog tr.bg_1 { background-color: #f99 }
.r-prog tr.bg_2 { background-color: #fcc }
.r-prog tr.bg_3 { background-color: #f93 }
.r-prog tr.bg_4 { background-color: #fc9 }
.r-prog tr.bg_5 { background-color: #ffc }
.r-prog tr.bg_6 { background-color: #ff9 }
.r-prog tr.bg_7 { background-color: #cfc }
.r-prog tr.bg_8 { background-color: #9f9 }
.r-prog tr.bg_9 { background-color: #ccf }
.r-prog tr.bg_10 { background-color: #99f }

.r-prog td { text-align: right; padding: 4px; width: 2em}
.r-prog td.pc { font-size: 80%; width: 1.5em }
.r-prog td:first-of-type { text-align: left; width: auto }
.r-prog td.level_1  { border-left: 2em solid white }
.r-prog td.level_2  { border-left: 4em solid white }
.r-prog td.level_3  { border-left: 6em solid white }
.r-prog td.level_4  { border-left: 8em solid white }

/* Comparison table */
.r-comp, .r-age { width: 100%;}
.r-comp { font-size: 90% }
.r-comp tbody td:first-child { text-align: center; font-weight: bold; width: 2em }
.r-comp tbody td:nth-of-type(2) { text-align: left; font-weight: bold; width: auto }
.r-age  tbody td:first-child { text-align: center; font-weight: bold; width: 6.75% }
.r-comp tbody td, .r-age tbody td { width: 6.25%; text-align: right }
.r-age tbody td.comp { font-size: 70% }
.r-comp tbody td.comp { width: 2em; font-size: 70% }
.r-age thead tr:nth-of-type(2) { font-size: 80% }
/* Summary table */
.r-sum { width: 100%; font-size: 80%; }
.r-sum tbody td:first-child { text-align: center; font-weight: bold; width: 2em }
.r-sum tbody td:nth-of-type(2) { text-align: left; font-weight: bold; width: auto }
.r-sum tbody td, table.r-sum tbody td { width: 3em; text-align: right }
.r-sum tbody td.comp, table.r-sum tbody td.comp { width: 2em; font-size: 70% }
@media print {
  .r-sum { font-size: 70%; }
}

.counts { width: 50%; margin: 0 auto }
.counts td { text-align: right }
.counts td:first-child { text-align: left }

.count_errors { width: 100% }
.count_errors td:nth-of-type(5) { text-align: center }
.count_errors td:nth-of-type(6) { text-align: center }
.count_errors td:nth-of-type(7) { text-align: right }

.f b { display: block; text-align: center; font-size: 80%; padding: 0;}

table input { width: 1.2em }
table input[type="number"] { text-align: right; }

.f { width: 100%; }
.f td { text-align: center; vertical-align: bottom }
.f td b { display: block; text-align: center; font-size: 80%; padding: 0;  }
.f input { width: 1em }
.f td.ehead { width: auto; text-align: center; font-weight: bold; font-size: 80% }
.f td:first-child { text-align: left; vertical-align: top }
.f td:first-child small { display: block }
.f td.lh { font-weight: bold; font-size: 90%; text-align: right; vertical-align: bottom }
/*.f td.first-child:lh { width:4em }*/
.f td.lh input { width: 2em }
.f td.tot { width: 6em; text-align: right; font-weight: bold }
.f td.tot input { width: 3em; margin-left: 5px }
.f td.tot b { padding-right: 2em; text-align:right }
.f td.members { width: 6em; text-align: right; font-weight: bold; font-size: 80%; vertical-align: middle }

.vw { font-size: 90% }
.vw td span { border: 1px solid #666; display: inline-block; width: 1.5em; text-align: right; padding: 1px; font-size: 80% }
.vw td.lh span { width: 2em }
.vw td.tot>span { width: 4.5em }
.vw td.tot span span { width: 2.5em; margin-left: 4px }
form#subform { display: none }
.f td.tot span { font-size: 94%; font-weight: normal }
.f td.lh span { font-size: 100%; font-weight: normal }

.changebox { border: 1px solid #666; border-radius: 1em; padding: 0.5em 1em }

span.n { display: inline-block; border: 1px solid #ccc; padding: 2px; width: 2em; }

.debug-err { font-size: 0.8rem;text-align:left; background-color: #fdd; font-weight: normal; overflow:auto }
.debug-inf { font-size: 0.8rem;text-align:left; background-color: #fed; font-weight: normal; overflow:auto }
.debug-tmp { font-size: 0.8rem;text-align:left; background-color: #dfd; font-weight: normal; overflow:auto; border: 1px solid #900 }

.hed tr { vertical-align: top }
.hed td:first-child, .hed td:last-child { width:14% }
.hed td:nth-of-type(2) { width:70% }
.hed td div { overflow: auto; height: 10em; border:1px solid #999 }
.hed td div:hover { overflow: auto; height: auto; border:1px solid #999 }

.gimg { height: 300px; width: 1000px }
@media screen and (max-width: 800px)  { .gimg { height: 90px; width: 600px } }
@media screen and (max-width: 600px)  { .gimg { height: 144px; width: 480px } }
.p { fill:#4d1979}

dl.in2 dd input { text-align: right; margin-left: 2px }
.ct div.vw dl.in2 dd span.in { display: inline-block; width: 2em; border: 1px solid #666; padding: 2px; margin-left: 3px; font-size: 80%}
.add dd>span      { /*border:1px #666 solid; */ display: block; padding: 2px; margin-top: -2px; font-size: 80% }
form .add dd>span { border: 0;padding:0; margin-top: 0px; font-size: 100%; display: inline }
.ct div.vw dd span.sel { width:90%; display: inline-block; border: 1px solid #666; padding: 2px; margin-left: 3px; font-size: 80%}
#wrap div.vw dd span.i-50 { width: 90%; text-align: left }
#wrap .fw input { text-align: left }
#wrap span.i-10 { width: 6em }
span#as { border: 0; width: 3em;font-size: 100% }

.print-show-inline, .print-show { display: none }
@media print {
  .header_bar { display: none }
  big { font-size: 12pt }
  #wrap small.not-print { display: none }
  #wrap div.vw { font-size: 80% }
  #wrap div.vw dt, #wrap div.vw dd { margin:0; padding: 0 }
  .no-print { display: none }
  .print-show { display: block }
  .print-show-inline { display: inline }
}

tr.header { font-weight: bold }
.loc { width: 90%; margin: 0 auto }
.loc td:last-child, .loc td:first-child{ text-align: center; width: 20% }

.r-ann-2020, .r-ann { width: 100%; margin: 0 auto; font-size: 90% }
.r-ann-2020 td { width: 12%; text-align: right }
.r-ann td      { width: 15%; text-align: right }
.r-ann td:first-child { width: 55%; text-align: left; font-weight: bold }
.r-ann-2020 td:first-child { width: 40%; text-align: left; font-weight: bold }
.r-ann-2020 td.subh, .r-ann td.subh { text-align: center; font-weight: bold }

.r-anc td:first-child { width: 30% }
.r-anc td { width: 3.5em }
.r-anc td.comp { width: 2.5em; font-size: 75% }

.timer { position: absolute; top: 0 ; left: 0; background-color: #fff; margin: 0; opacity: 0.1 }
.timer:before { content: '\23F1';}
.timer:hover { opacity: 1 }
.timer li {display:none; white-space: nowrap; margin: 0; padding:3px}
.timer:hover li { display: inline-block; font-size: 70%; list-style: none; margin:0;padding:0 1em 0 0;  }
.timer:hover span { display: inline-block; background-color: #eee; width: 5em; text-align: right; padding: 2px }
.timer span:first-child { display: inline-block; background-color: #f8f8f8 }
@media print {
  .timer { display: none }
  .brk, .imgbrk { break-after: page }
}

.tot td { font-weight: bold }

.r-eth { font-size: 70%; width: 90%; margin: 0 auto;   }
.r-eth td { text-align: right; width: 3%;}
.r-eth td:first-child { text-align: center; width: 3%; }
.r-eth td.l { text-align: left; width: auto; }
.r-eth td.c { text-align: center; width: 6%; }
@media print {
.r-eth { font-size: 60%; width: 100% }
}

.c-n5 td { background-color: #f99 }
.c-n4 td { background-color: #fbb }
.c-n3 td { background-color: #fdd }
.c-n2 td { background-color: #fdb }
.c-n1 td { background-color: #fed }
.c-p1 td { background-color: #ffd }
.c-p2 td { background-color: #ffb }
.c-p3 td { background-color: #dfd }
.c-p4 td { background-color: #bfb }
.c-p5 td { background-color: #9f9 }

#wrap .header td { text-align: center }
#wrap table .blockheader { font-size: 1.2em; padding: 1em 0 0.25em }

.changes { width: 90%; margin: 0 auto }
.changes td:nth-of-type(4) { text-align: right ; padding-right: 1em }

span.i,
span.select { border: 1px solid #666; display: block; width: 100%; padding: 2px 1em }
span.t-5 { min-height: 5em }
.changes td:last-child { text-align: center }

@media print {
  .r-fullsum { font-size: 60% }
  .vw { font-size: 82% }
/*  .printhide { display: none }*/
  h3 { margin-top: 0.5em }
}

#filter .btt { border-color: #999; color: #999 }
#filter .btt:hover { color: #fff }
#filter .checked { border-color: #000; color: #000 }
#filter .checked:hover { color: #fff }

a.disabled { cursor: text; color: #999  }
a.disabled:hover { text-decoration: none; }

.error { background-color: #fee }
.error td.no-color { background-color: #fff }

table.yl_report { clear: both; width: 100%; font-size: 90% }

.yl_report td { text-align: right }
.yl_report tr:last-child { font-weight: bold }
.yl_report tr:hover td { background-color: #eee }
.yl_report td { width:3.2% }
.yl_report td:first-child { width: 9% }
.yl_report td:nth-child(2) { width: auto }
.yl_report tr:first-child td, .yl_report tr:last-child td { border-top: 1px solid #999 }
.yl_report td:first-child, .yl_report td:nth-child(2) { text-align: left; font-weight: bold }
.yl_report tr:first-child th:first-child,
.yl_report tr:first-child th:nth-child(2),
.yl_report tr:first-child th:nth-child(4),
.yl_report th:nth-child(3),
.yl_report th:nth-child(6),
.yl_report th:nth-child(9),
.yl_report td:nth-child(2),
.yl_report td:nth-child(5),
.yl_report td:nth-child(8),
.yl_report td:nth-child(11) { border-right: 1px solid #999 }

#ad-err { color: #900; font-weight: bold; text-align: right }

input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

#other span span { width: 60%; float: right }
#other input { width: 60% }
input.html-validate         { background-color: #cfc }
input.html-validate:invalid { background-color: #fdb }
span#postcode-validation-error       { display: block; padding: 0.5em; margin: 0.5em 2px; background-color: #fdb; font-weight: bold }
span#postcode-validation-error:empty { display: none }
.postcode { width: 6em }

#map { width: 100%; height: 400px; position: relative }

.radio-button-array input { border: 0; width: auto }
.radio-button-array label { display: block; }
.privacy { font-size: 80%; clear: both; margin: 0.25em 1em; border-radius: 5px; padding: 5px; background-color: #eee }
.privacy h4 { padding: 0 5px }

.ethhead th:nth-child(2n), .ethbody td:nth-child(2), .ethbody td:nth-child(8), .ethbody td:nth-child(9), .ethbody td:nth-child(10),
.ethbody td:nth-child(n+15) { background-color: #eee }
.ethbody td:nth-child(n+20) { background-color: #fff }
.ethhead th,.ethbody td { width: 2.2em }
.ethhead th:first-child, .ethbody td:first-child { width: auto; font-weight: bold; font-size: 90%; text-align: right }
.ethbody td input { width: 1.6em }

/***********************************************************************
************************************************************************
****                                                                ****
****   CSS FOR 2020 NEW FORM LAYOUT                                 ****
****                                                                ****
************************************************************************
***********************************************************************/

/*======================================================================
  Gender details table....
======================================================================*/

.new                         { width:100%; margin: 0; border-collapse: collapse; }
.new td                      { text-align: center; width: 10% }
.new th:first-child,
  .new td:first-child     { width:20%; text-align: left }
.new td:first-child       { padding-left: 1em }
.new th.pad               { width:40% }
.new th                      { font-size: 90% }
.new td.full              { width: 100%; padding: 0.25em 0.5em; height: auto; border-top: 1px solid #999 }
.new td.head              { width: 40%; text-align: left; vertical-align: top }
.new td                      { vertical-align: top; padding: 0.5em 0.2em }
/* Grey box on RHS for non-compass people */
.new .full:nth-of-type(n+2),
  .new th:nth-of-type(n+6),
  .new td:nth-of-type(n+6),
  .new th.grey               { background-color: #eee }
.new th:empty,
  .new td:empty              { background-color: #fff }
/* Input elements... */
.new input { width: 3em }

/* Stuff for the.add questions */

/* General table layout .... */
.debug .add td { border:1px solid red } /* add class debug above table to show borders! */

.add                         { width:100%; margin: 0; border-collapse: collapse; }
.add .padder th            { height: 1px; overflow: hidden; padding: 0; font-size: 1px; width: 10%; }
/*table.add th:first-of-type     { width: 30% }*/

.add td                   { width: 10%; height: 2em; padding-top: 0.5em; text-align: right; vertical-align: top }
.add td:first-of-type,
  .add td.full               { text-align: left}  /* revert "question" to left align */
/* Headers / column headers */
/* Make section heads bold - with a line above (effectively below block!) */
.add td.head                 { font-weight: bold; border-top: 1px solid black; font-size: 1rem;
                                    height: 2em; vertical-align: bottom; padding-top: 0.5em}
.add tbody tr:first-of-type .head     { border-top: 0 } /* except for the first one */
/* Gender header for waiting lists */
.add td.genhead              { text-align: center; font-weight: bold; border-top: 0; font-size: 90% }
/* Some general styline stuff.. */
.add td.left                 { text-align: left; padding-left: 2em }  /* used for the right hand of two columns caption */
.add td.center               { text-align: center }                   /* used to align the waiting list columns */

/* Logic - move slightly closer to parent question and indent the LHS by 2em */
.logic td                       { padding-top: 2px }
.logic td:nth-of-type(1)        { padding-left: 2em }

/* Read only form of input elements */
.add td span.readonly        { display: inline-block; width: 100%; box-sizing: border-box; border:1px solid #999; margin: -3px 0 0 auto; padding: 2px 0.25em; min-height:1.2em }
.add td span.readonly.with-prefix { width: 66%; margin-left: 0.5em }
.new td span.readonly        { display: inline-block; width: 3em; box-sizing: border-box; border:1px solid #999; margin: 0 auto; padding: 2px 0.25em; min-height:1.2em; text-align: right }
.add td div.multi-buttons span.readonly { width: auto; margin: 0.25em 0.5em }

/* Wri.form of input elements */
.add input                   { width: 3em }
.add input.wide-number       { width: 7em }
.add input.wide-text         { width: 20em }
.add input.extra-wide-text   { width: 80% }
input[type=number]                { -moz-appearance:textfield; } /* Remove "scrollers" from firefox! */
.add em                      { font-size: 80% }

/* Firstly the pill buttons */
.select-buttons                             { white-space: nowrap }
.select-buttons input,                                              /* Hide input elements */
  .select-buttons label:first-of-type       { display: none }       /* Hide label for "empty" radio button */
.select-buttons span                        { border: 1px solid #595959; text-align: center; padding: 2px 0.5em; display: inline-block ; cursor: pointer}
.yes-no-buttons span                        { width: 1.7em; padding: 2px 3px } /* Yes no buttons have even widths */
.select-buttons input:checked+span          { background-color: #595959; color: #fff } /* When radio button is checked change button style */
.select-buttons label:nth-of-type(2) span   { border-top-left-radius: 0.75em; border-bottom-left-radius: 0.75em;   } /* First real child has rounded left end */
.select-buttons label:last-child     span   { border-top-right-radius: 0.75em; border-bottom-right-radius: 0.75em; } /* Last child has rounded right end */
.select-buttons label:nth-of-type(n+3) span { border-left: 0 }                                                       /* Remove left border to remove double edge */
form p.c .select-buttons input { display: none }
form p.c .select-buttons { margin-left:3em }

.array_buttons { width: 90% }
.multi-buttons,
  .array-buttons                            { display: -ms-grid; display: grid }
.multi-buttons label,
  .array-buttons label                      { display: block }
.buttons-1 label { display: inline }
.multi-buttons span,
  .array-buttons span                       { border: 1px solid #595959; border-radius: 0.75em; text-align: center; padding: 1px 0.5em; display: block ; cursor: pointer; margin: 0.25em 0.5em; }
.multi-buttons input:checked+span,
  .array-buttons input:checked+span         { background-color: #595959; color: #fff }

/* Buttons 1-4 are for 1,2,3 or 4 columns respectively */
.buttons-1                                  { grid-template-columns: 1fr; -ms-grid-columns: 1fr; }
.buttons-1 span                             { text-align: left }
.buttons-2                                  { grid-template-columns: 1fr 1fr; -ms-grid-columns: 1fr 1fr }
.buttons-3                                  { grid-template-columns: 1fr 1fr 1fr; -ms-grid-columns: 1fr 1fr 1fr }
.buttons-4                                  { grid-template-columns: 1fr 1fr 1fr 1fr; -ms-grid-columns: 1fr 1fr 1fr 1fr; }
.buttons-4.array-buttons label:nth-of-type(2), .buttons-4.multi-buttons label:nth-of-type(1) { -ms-grid-row: 1; -ms-grid-column: 1 }
.buttons-4.array-buttons label:nth-of-type(3), .buttons-4.multi-buttons label:nth-of-type(2) { -ms-grid-row: 1; -ms-grid-column: 2 }
.buttons-4.array-buttons label:nth-of-type(4), .buttons-4.multi-buttons label:nth-of-type(3) { -ms-grid-row: 1; -ms-grid-column: 3 }
.buttons-4.array-buttons label:nth-of-type(5), .buttons-4.multi-buttons label:nth-of-type(4) { -ms-grid-row: 1; -ms-grid-column: 4 }
.buttons-4.array-buttons label:nth-of-type(6), .buttons-4.multi-buttons label:nth-of-type(5) { -ms-grid-row: 2; -ms-grid-column: 1 }
.buttons-4.array-buttons label:nth-of-type(7), .buttons-4.multi-buttons label:nth-of-type(6) { -ms-grid-row: 2; -ms-grid-column: 2 }
.buttons-4.array-buttons label:nth-of-type(8), .buttons-4.multi-buttons label:nth-of-type(7) { -ms-grid-row: 2; -ms-grid-column: 3 }
.buttons-4.array-buttons label:nth-of-type(9), .buttons-4.multi-buttons label:nth-of-type(8) { -ms-grid-row: 2; -ms-grid-column: 4 }

.buttons-2.array-buttons label:nth-of-type(2), .buttons-2.multi-buttons label:nth-of-type(1) { -ms-grid-row: 1; -ms-grid-column: 1 }
.buttons-2.array-buttons label:nth-of-type(3), .buttons-2.multi-buttons label:nth-of-type(2) { -ms-grid-row: 1; -ms-grid-column: 2 }
.buttons-2.array-buttons label:nth-of-type(4), .buttons-2.multi-buttons label:nth-of-type(3) { -ms-grid-row: 2; -ms-grid-column: 1 }
.buttons-2.array-buttons label:nth-of-type(5), .buttons-2.multi-buttons label:nth-of-type(4) { -ms-grid-row: 2; -ms-grid-column: 2 }
.buttons-2.array-buttons label:nth-of-type(6), .buttons-2.multi-buttons label:nth-of-type(5) { -ms-grid-row: 3; -ms-grid-column: 1 }
.buttons-2.array-buttons label:nth-of-type(7), .buttons-2.multi-buttons label:nth-of-type(6) { -ms-grid-row: 3; -ms-grid-column: 2 }
.buttons-2.array-buttons label:nth-of-type(8), .buttons-2.multi-buttons label:nth-of-type(7) { -ms-grid-row: 4; -ms-grid-column: 1 }
.buttons-2.array-buttons label:nth-of-type(9), .buttons-2.multi-buttons label:nth-of-type(8) { -ms-grid-row: 4; -ms-grid-column: 2 }
@media only screen and (max-width: 840px) {
  .buttons-2 span {text-align: left }
  .buttons-2 { grid-template-columns: 1fr; -ms-grid-columns: 1fr }
  .buttons-2 label { display: inline }
  .buttons-4 { grid-template-columns: 1fr 1fr; -ms-grid-columns: 1fr 1fr }
  .buttons-4.array-buttons label:nth-of-type(2), .buttons-4.multi-buttons label:nth-of-type(1) { -ms-grid-row: 1; -ms-grid-column: 1 }
  .buttons-4.array-buttons label:nth-of-type(3), .buttons-4.multi-buttons label:nth-of-type(2) { -ms-grid-row: 1; -ms-grid-column: 2 }
  .buttons-4.array-buttons label:nth-of-type(4), .buttons-4.multi-buttons label:nth-of-type(3) { -ms-grid-row: 2; -ms-grid-column: 1 }
  .buttons-4.array-buttons label:nth-of-type(5), .buttons-4.multi-buttons label:nth-of-type(4) { -ms-grid-row: 2; -ms-grid-column: 2 }
  .buttons-4.array-buttons label:nth-of-type(6), .buttons-4.multi-buttons label:nth-of-type(5) { -ms-grid-row: 3; -ms-grid-column: 1 }
  .buttons-4.array-buttons label:nth-of-type(7), .buttons-4.multi-buttons label:nth-of-type(6) { -ms-grid-row: 3; -ms-grid-column: 2 }
  .buttons-4.array-buttons label:nth-of-type(8), .buttons-4.multi-buttons label:nth-of-type(7) { -ms-grid-row: 4; -ms-grid-column: 1 }
  .buttons-4.array-buttons label:nth-of-type(9), .buttons-4.multi-buttons label:nth-of-type(8) { -ms-grid-row: 4; -ms-grid-column: 2 }
  .array-buttons label:nth-of-type(1)       { display: none }
}

.multi-buttons input,
  .array-buttons input,
  .array-buttons label:nth-of-type(1)       { display: none }

/* Additional hint box (?)  */
.hint       { text-align: center; margin-left: 0.25em; top: -0.5em; position: relative; background-color: #7413dc; color: #fff; font-size: 90%;
              border-radius: 0.7em; padding: 2px; width: 0.8em; line-height: 0.8em; height:0.8em; display: inline-block; font-weight: bold }
.hint:after { content: '?' }

.pill-box { background-color: #eee }

.input-warning:after { content: '*';     color: #f90; width: 1.5rem; text-align: right; display: inline-block }
.input-error:after   { content: '\2717'; color: #c00; font-weight: bold; width: 1.5rem; text-align: right; font-size: 80%; display: inline-block }
.input-ok:after      { content: '';      color: #090; width: 1.5rem; text-align: right; display: inline-block }

.computed-box:after  { content: '';      color: #090; width: 1rem; text-align: right; display: inline-block }
#wrap .computed-box { font-size: 83%; }
#wrap .computed { width: 7em }

.add td.input-ok, .add td.input-error, .add td.input-warning { white-space: nowrap }
.add .input-warning span.readonly, .add .input-error span.readonly , .add .input-ok span.readonly { width: 60% }
.add td.input-warning[colspan] span.readonly,
.add td.input-error[colspan] span.readonly,
.add td.input-ok[colspan] span.readonly { width: 80%; text-align: left }
.add td.input-warning[colspan] span.readonly.number,
.add td.input-error[colspan] span.readonly.number,
.add td.input-ok[colspan] span.readonly.number { text-align: right }
.add td.input-error:after, .add td.input-warning:after, .add td.input-ok:after { width: 1rem; }
.diserror.input-ok    { display: none }
.diserror.input-error { background-color: #fcc; color: #900; padding: 0.5em 1em; height: auto; }
.new .total-from-sections td:nth-of-type(n+2),
.new .totals td:nth-of-type(n+2) { text-align: right }

.readonly .multi-buttons { border-radius: 0 }
.form-end { line-height: 2em }
.totals td { font-weight: bold }
.fade { color: #595959; font-weight: normal }
.new a { font-weight: bold }
.content p { line-height: 1.4em }

sup { vertical-align: top }


.smaller { font-size: 60% }
.unlock  { margin-left: 3em; background-color: #fdb; color: #630; font-weight: bold; padding: 0.5em; border-radius: 1em }

.add textarea { width: 90%; min-height: 6em }
textarea#member_postcodes { min-height: 20em }
textarea[data-key="member_postcodes"] { text-align: left }

#dev footer, body#dev { background-color: #fee }
#dev #wrap { background-color: #fff }
#dev .header_bar, #dev .header_bar a, #dev h3, #dev h2, #dev h1, #dev strong, #dev th, #dev .head, #dev .totals, #dev .total, #dev .header { color: #900 }
#dev .header_bar a { border-color: #900 }

#report footer, body#report { background-color: #efe }
#report #wrap { background-color: #fff }
#report .header_bar, #report .header_bar a, #report h3, #report h2, #report h1, #report strong, #report th, #report .head, #report .totals, #report .total, #report .header { color: #060 }
#report .header_bar a { border-color: #060 }

#devreport footer, body#devreport { background-color: #ffe }
#devreport #wrap { background-color: #fff }
#devreport .header_bar, #devreport .header_bar a, #devreport h3, #devreport h2, #devreport h1, #devreport strong, #devreport th, #devreport .head, #devreport .totals, #devreport .total, #devreport .header { color: #660 }
#devreport .header_bar a { border-color: #660 }

#submit-message { margin: 0.5rem; font-weight: bold; font-size: 1.2rem; }
#submit-message p { margin: 0; padding: 0.5rem; display: none; }
#submit-message p.yellow { display: block; background-color: #ffffcc }
#submit-message p.orange { display: block; background-color: #ffe8cc }
#submit-message p.red    { display: block; background-color: #ffcccc }
#submit-message p.yellow .abs:before { content: '5' }
#submit-message p.orange .abs:before { content: '8' }
#submit-message p.red    .abs:before { content: '10' }
#submit-message p.yellow .perc:before { content: '25' }
#submit-message p.orange .perc:before { content: '50' }
#submit-message p.red    .perc:before { content: '75' }

.timer-x { list-style: none; display: block; padding: 0; font-size: 0.8rem }
.timer-x li { display: inline-block; text-align: right; margin-right: 1rem; padding: 0 0.25rem; border-right: 1px solid black }
.timer-x span { display: block }

