/** 
 * @file style.css
 * @brief Handles styling of the main hotwire code.
 * Part of Hotwire http://hotwire.sourceforge.net/ .
 * @author Frank Lee
 */

/* General page setup */

body {
 font-family: Verdana, Helvetica, sans-serif;
 /*font-size: 63%;*/
}

a:link,a:visited {
 color: black;
 text-decoration: none;
}

/* Formatting for the hw_banners */

div.hw_banners { 
 display: block;
 clear: both;
 margin-left: 10px;
 margin-top: 10px;
}

div.hw_banners div {
 display: inline;
}

div.hw_banners div.bannerleft {
 float: left;

 border-radius: 6px;
 padding: 3px;
 margin-top: 4px;
}

div.hw_banners div.bannerright {
 float: right;
 border-radius: 6px;
 padding: 3px;
 margin-top: 4px;
}

div.hw_banners div.bannerright a {
 color: blue;
 text-decoration: underline;
}

div.hw_banners div.bannertitle {
 display: block;
 width:50%;
 margin:12px auto 0 auto;
text-align:center;
}

div.bannertitle a {
 font-size: large;
 letter-spacing: 5px;
 background: #e5e5ff;
 display: inline;
 border-radius: 6px;
 padding: 3px;
 margin-top: 4px;
 border: 1px solid gray;
}

/* End formatting for hw_banners */

/* menu */
div#hw_menu {
 background-color: #dcdcdc;
 display: inline-block;
 border: 1px solid gray;
 border-radius: 10px; /* Perhaps rounded corners? */
 width: 99%;
}

div#hw_menu div {
 vertical-align:middle;
}

/* menu - page title */
div#hw_menu div#hw_pagetitle {
 font-weight: bold;
/* font-size: 120%;*/
 padding-left: 1em;
 padding-top: 3px;
 display: inline-block;
}

div#hw_menu div#hw_quicksearch_form {
 display: inline-block;
}

div#hw_menu div#hw_navbuttons {
 display: inline-block;
}

div#hw_menu input.navSearch {
 width: 9em;
}

div#hw_menu nav ul {
 z-index: 2;
}

/* End menu */

/* Main page setup */
div.hw_resulttable {
 border: 1px solid Black;
 padding: 3px;
 border-radius: 6px;
 width: 99%;
}

table.hw_resulttable tr td div {
 max-height: 30px;
 overflow: hidden;
 text-overflow: ellipsis;
 padding-left: 4px;
 padding-right: 4px;

}

div.results {
 display: block;
 font-weight: bold;
 font-size: small;
 padding: 3px;
 border-radius: 6px;
 text-align: center;
 clear: both;
 width: 99%;
}

/* Display of sort and search data */
div#hw_sortandsearch {
 font-weight: bold; 
/* font-size: 80%;*/
 text-align: center;
 clear: both;
 border-radius: 4px;
 margin: 2px;
 margin-bottom: 0px;
 padding: 3px;
 background: lightblue;
}

div#hw_sortandsearch input[type=text] {
 display: none;
}

div#hw_sortandsearch.changed {
 background: pink;
}
/* Initially, submit button is invisible */
div.hw_sortandsearchsubmit {
 display: none;
}
div#hw_sortandsearch.changed div.hw_sortandsearchsubmit {
 display: block;
}

div#hw_search {

}

div#hw_sortandsearch p {
 display: inline;
}

div.hw_clause {
 display: inline;
 cursor: col-resize;
 border: 1px solid red;
/* background: red; */
}

div#hw_clause_0 {
 cursor: text;
}

div#hw_sort {
 display: inline;
}

div#hw_sort.invisible {
 display: none;
}

div.invisible {
 display: none;
}


div#hw_sort div {
 display: inline;
 cursor: col-resize;
}

div#hw_sort div#hw_sort_0 {
 cursor: text;
}

/* Table headers */
table#hw_resulttable th {
 /* border: 1px solid Black; */
}

table.hw_resulttable tr.even {
 background: #f4f4f4;
}

table.hw_resulttable tr.odd {
 background: #ffffff;
}

/* Resizing */
div.hw_headerresize {
 position:absolute;
 height:100%;
 width:5px;
 margin-right:-5px;
 left:100%;
 top:0px;
 cursor:ew-resize;
 /* z-index:10;*/ 
}

tr.tableHeader th {
 background: lightgray;
 border-radius: 5px;
}

div.hw_header {
 /* position:relative; */
 height:100%;
 width:100%;
}

div.hw_header a {
 display: block;
}

table.hw_resulttable th {
 border: 1px solid white;
}
table.hw_resulttable td {
 padding-top: 0.4ex;
 padding-bottom: 0.4ex;
 padding-left: 3px;
 border: 1px solid lightgray;
}

table.hw_resulttable {
 margin-top: 3px;
 width: 100%;
 margin-right: 40px;
 /* not sure whether collapse is a good plan or not */
 border-collapse:collapse;
}

table.hw_resulttable tr.active a {
 width: 100%;
 display:block;
}

table.hw_resulttable tr.active:hover {
 background: #e5e5ff;
}

table.hw_resulttable tr.active div.phoneemail {
 float: right;
 position: relative;
 top: -2ex;
}

table.hw_resulttable tr.active div.phoneemail a {
 display: inline;
}


img.hw_emailer, img.hw_phoner {
 /*z-index: +1;*/
 float: right;
}

table.hw_resulttable thead {
 margin-right: 40px;
}

 /* 'cos it's 2018 now and we can just: */
table.hw_resulttable th {
 position: sticky;
 /* z-index: 1;*/
 top: 0px;
}


/* Always clear both sides of a clearwidth */
div.clearwidth {
 display: block;
 clear: both;
 break-inside: avoid-column;
}

/* Formatting the search and sort lists */

div#hw_search, div#hw_sort {
 margin-bottom: 5px;
} 

ul#hw_search_id, ul#hw_sort_id {
 display: inline;
 list-style: none;
 padding-left: 0px; 
} 

ul#hw_search_id li:first-child, ul#hw_sort_id li:first-child {
 display:inline; 
}

ul#hw_search_id li:first-child:before, ul#hw_sort_id li:first-child:before {
 display:inline; 
 content: "";
}

ul#hw_search_id li:before {
 content: "and ";
 font-weight: normal;
}

ul#hw_search_id li, ul#hw_sort_id li {
 display:inline;
 padding-left: 0.5em;
 padding-right: 0.5em;
 margin-right: 0.3em;
 opacity:0.4;
 background-color: white;
 border-radius: 5px;
 cursor: pointer;
}
 
div#hw_search input, div#hw_sort input, div#hw_hidden input {
 display: none; 
}

ul#hw_sort_id li:before {
 content: " then by ";
 font-weight: normal;
}

ul#hw_sort_id li.hw_submit:before {
 display:inline; 
 content: "";
 background-color: red;
}
div.hw_login {
  text-align: center;
}

.msg { 
 background: yellow; 
 color: black; 
 padding: 2em; 
 font-size: larger;
}

div.hw_login_msg {
 padding-bottom: 10px;
 margin: 10px;
}

div.hw_login_boxes {
 text-align: right;
}

div.hw_login_boxes div {
 display: block;
 clear: both;
}

div.hw_login form {
 border-radius: 5px;
 background-color: #e5e5ff;
 display: inline-block;
 padding: 5px;
 border: 1px solid black;
}

div.hw_login input {
 /*width: 5em;
 float: right;
 margin-right: 30%;
 margin-left: 0.6em;*/
}

div.hw_login label {
 font-size: 120%;
 padding-right: 10px;
}

div.hw_login span {
 float: left;
 font-size: 160%;
    margin: auto;
    border
 margin-top: 2ex;
 text-align: left;
}

div.hw_login span.input {
 text-align: right;
 }

div.hw_login input.btn {
 float: right;
 display: block;
 clear: both;
 margin-top: 10px;
}

div.hw_login_error {
    margin: auto;
    margin-top: 10px;
    border: 1px solid black;
    border-radius: 5px;
    background-color: pink;
    padding: 5px;
    width: 50%
}

li.clickable {
 cursor:pointer;
}

li.clickable.disabled {
 color: gray;
}

span.clause_argument, span.clause_operator, span.hw_sort_field {
 padding-right: 0.25em;
}

div.sortedfields {
 padding-bottom: 4px;
}

span.clause_value:before, span.clause_value:after {
 content:'"';
}

button#hw_update_sortandsearch {
  float: left;
 position: relative;
 top: -1.5ex;
 margin-left: 1em;
 display: block;
}

/* Dialog box formatting */

ul.hw_dialogoptionlist li span{
 cursor: pointer;
}


/* dbrecord formatting */
div.actionbuttontop {
 display: none;
 background:#888888;
 border-radius: 7px 7px 7px 7px;
 float: right;
 margin: 10px;
 padding: 4px;
 text-align: right;
 width: 90%;
 clear: both;
 -webkit-column-span:all;
 -moz-column-span: all;
 column-span:all;
}

form#deleteform {
 display: inline;
}

div.tableTitle {
 background: #888888;
 margin-top: 3px;
 font-weight: bold;
 margin-bottom: 3px;
 border-radius: 6px;
 width: 100%;
 text-align: center;
}

div.tableActions {
 text-align: right;
 padding: 4px;
 margin: 10px;
 margin-bottom: 10px;
 background: #888888;
 width: 50%;
 float: right;
 border-radius: 7px;
 display: none;
}

div.tableActions button {
 float: left;
 margin-top: 5px;
 margin-left: 4px;
}

div.tableFooter {
 text-align: right;
 padding: 4px;
 margin: 10px;
 margin-bottom: 10px;
 background: #888888;
 width: 50%;
 float: right;
 border-radius: 7px;
}

div.postFooter {
 clear: both;
 height: 0.5ex;
}

div.record {
 display: inline-block;
 width: 100%;
}

div.recordkey , div.searchkey {
 float: left;
 width:20%;
 text-align: right;
}

div.recordkey p , div.searchkey p {
 /*font-size: 130%;*/
 margin-top: 0px;
 margin-bottom: 2px;
 padding-right: 0.3em;
}

div.json {
 display: none;
}
/*
// Whatever functionality this UI highlights doesn't work.
div.clearwidth:not(._hwsubviewc):not(._hwsubviewb) div.recordkey {
 cursor: url(search.png), ew-resize;
}
*/

div.recordvalue, div.searchvalue {
 padding-bottom: 3px;
 float: right;
 width: 80%;
}
div.recordvalue textarea , div.searchvalue textarea {
 height: 12ex;
 width: 90%;
}
textarea[readonly="true"] {
  background-color: lightgray;
}
div.wideitemdata div.recordvalue {
 width: 90%;
}
div.wideitemdata div.recordkey {
 width: 10%;
}
div._hwsubviewb a.button {
 -webkit-appearance: button;
 -moz-appearance: button;
 appearance: button;
 padding: 5px;
 /*font-size: 120%;*/
 display: inline-block;
}
div.resultstable, div.searchtable {
 background: #e5e5ff;
 border-radius: 10px;
}

div.resultstablechanged {
 display:block;
 background: #FFB2B2;
 border-radius: 10px;
}

/* Set two columns on tableResults rather than itemdata */
div.itemdata {
 column-count: 2;
 -moz-column-count: 2;
 -webkit-column-count: 2;
}

div.searchtable div.itemdata {
 column-count:inherit;
 -moz-column-count: inherit;
 -webkit-column-count: inherit;
}

/* Add a border to these divs to keep things lined up. */

div.resultstable div.clearwidth, div.searchtable div.clearwidth {
 border: 1px solid #e5e5ff;
}
div.resultstablechanged div.clearwidth {
 border: 1px solid #FFB2B2;
}

/* subviews span whole page */
div.dbDisp_hwsubview, div.dbDisp_hwsubviewc {
 -webkit-column-span:all;
 -moz-column-span: all;
 column-span:all;
}

div.recordvalue input[type="text"] {
 width: 90%;
}

/* Prevent very-wide dropdowns over flowing */
select {
 max-width: 95%;
 width: 91%;
}

div.textboxalike {
 background: white;
 border: 1px solid #a9a9a9;
 font-size: 160%;
 font-family: monospace;
 width: 90%;
 min-height: 3ex;
 cursor: default;
}



div.recordvalue input.date {
 min-width: 5.3em;
 width: 30%;
}

div.hw_blobdisp img {
 width: 150px;
 height: 200px;
}

div.bytea div.recordvalue img {
 width: 150px;
 min-width: 5.3em;
 max-width: 320px;
}

div._hw_page_split {
  font-size: 150%;
  background: gray;
  padding: 10px;
  width: 80%;
  margin-left: 7px;
  border-radius: 7px 7px 7px 7px;
  clear: both;
  text-align: center;
  margin-bottom: 20px;
}

div.hw_meta_view_separator {
  text-align: center;
  font-weight: bold;
  font-size: 130%;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
  background-color: lightgray;
}

span.Xhw_meta_view_separator {
  text-align: center;
  font-weight: bold;
  font-size: 130%;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
  background-color: lightgray;
}

span.hw_meta_view_separator span.ui-icon {
 display: inline-block;
}

/* Menu following https://codepen.io/philhoyt/pen/ujHzd */
#primary_nav_wrap
{
	display: inline-block;
	vertical-align: middle;
}

/*
#primary_nav_wrap ul
{
	list-style:none;
	position:relative;
	float:left;
	margin:0;
	padding:0
}

#primary_nav_wrap ul a
{
	display:block;
	color:#333;
	text-decoration:none;
	font-weight:700;
	line-height:32px;
	padding:0 15px;
	font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}

#primary_nav_wrap ul li
{
	position:relative;
	float:left;
	margin:0;
	padding:0
}

#primary_nav_wrap ul li.current-menu-item
{
	background:#ddd
}

#primary_nav_wrap ul li:hover
{
	background:#f6f6f6
}

#primary_nav_wrap ul ul
{
	display:none;
	position:absolute;
	top:100%;
	left:0;
	background:#fff;
	padding:0
}

#primary_nav_wrap ul ul li
{
	float:none;
	width:200px
}

#primary_nav_wrap ul ul a
{
	line-height:120%;
	padding:10px 15px
}

#primary_nav_wrap ul ul ul
{
	top:0;
	left:100%
}

#primary_nav_wrap ul li:hover > ul
{
	display:block
}

#primary_nav_wrap li > a:after { content: '\00a0\00a0\25b6'; }
#primary_nav_wrap li > a:only-child:after { content: ''; } 
*/
/* Put a vertical ellipsis at the end of vertical menus */
/* #primary_nav_wrap > ul > li > a:after { content: '⋮';} */

/* For the documentation. Gosh, people need documentation to use webpages these days... */

div.explanation {
 font-size: 140%;
 margin: 20px;
 display: block;
 width: 75%;
}

div.exemplar {
 display: block;
 padding: 20px;
 border: 1px solid black;
}

div.introduction {
 font-size: 150%;
 display: block;
}

/* For the friendly hints */
div.dbList_hints {
 /*background-color: #3cff0044;*/
  background-color: #0033ff4d;
 border-radius: 4px;
 padding: 3px;
 margin: 2px;
 text-align: center;
}
div.dbList_hints span.hint_intro,
div.dbRecord_hints span.hint_intro {
 font-weight: bold;
}

div.dbRecord_hints {
 float: left;
 text-align: center;
 width: calc(100% - 16px);
 padding-top: 3px;
 padding-bottom: 3px;
 padding-left: 4px;
 margin-left: 4px;
 padding-right: 4px;
 border-radius: 4px;
/* background-color: #3cff0044;*/
 background-color: #0033ff4d;
 
}

/* To enable the debugging link */
div.debug-holder {
 display: inline-block;
 cursor: pointer;
}
span.enable-debug {
 display: inline-block;
}
span.disable-debug {
 display: none;
}
div.disable-debug-holder {
 background: orange;
}

/* Hide JSON blocks */
td.jsondata {
 display: none;
}

/* Highlighting the current view */

#primary_nav_wrap a.menuCurrentItem {
 text-decoration-style: double;
 text-decoration-line: underline;
}

div.wideitemdata div._hwsubviewb div.recordkey {
 padding-top: 0.8ex;
}

/* Search stuff */
span.clause_value {
 display: inline-block;
 max-width: 15%;
 overflow: hidden;
 text-overflow: ellipsis;
}

/* Hide debugging stuff */
div.runtime span.json {
 display: none;
}

/* Override multiselect formatting */
.ms-container .ms-selectable li.ms-elem-selectable,
.ms-container .ms-selection li.ms-elem-selection {
 font-size: inherit;
}
/*
select[multiple].select_ajax_multi_invisible {
 display: none;
 min-width: 35%;
}
*/

/* Delete button added by javascript */
button#formdel { 
 float: left;
}

/* message of the day */
div.motd {
 text-align: center;
 border-radius: 5px;
 background-color: lightyellow;
/* display: inline-block; */
 padding: 5px;
 border: 1px solid black;
 margin-bottom: 5px;
 margin-left: 25%;
 margin-right: 25%;
}

/* make links in motd stand out */
div.motd a {
  text-decoration: underline;
}


/* Advanced Search */
div.display {
 font-size: small;
}
div.search select {
 width:80%;
}

/* CSV import debugging */
div.wrap-collapsible input[type='checkbox'] {
  display: none;
}

div.wrap-collapsible .lbl-toggle {
  display: block;
  font-weight: bold;
  font-family: monospace;
  font-size: 1.2rem;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
  color: #583173;
  background: #e5e5ff;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.25s ease-out;
}

div.wrap-collapsible .lbl-toggle:hover {
   color: #330553;
}

div.wrap-collapsible .lbl-toggle::before {
  content: ' ';
  display: inline-block;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid currentColor;
  vertical-align: middle;
  margin-right: .7rem;
  transform: translateY(-2px);
  transition: transform .2s ease-out;
}

div.wrap-collapsible .collapsible-content .content-inner {
  background: rgba(140,87,219,0.2);
  border-bottom: 1px solid rgba(174, 151, 66, .2);
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  padding: .5rem 1rem;
}

div.wrap-collapsible .collapsible-content {
  max-height: 0px;
  overflow: hidden;
  transition: max-height .25s ease-in-out;
}

body.errorreporting div.wrap-collapsible .collapsible-content {
  max-height: inherit;
}

div.wrap-collapsible .toggle:checked + .lbl-toggle + .collapsible-content {
  max-height: 350px;
  overflow: auto;
}

body.errorreporting div.wrap-collapsible .toggle:checked + .lbl-toggle + .collapsible-content {
  max-height: inherit;
}

div.wrap-collapsible .toggle:checked + .lbl-toggle::before {
  transform: rotate(90deg) translateX(-3px);
}

div.wrap-collapsible .toggle:checked + .lbl-toggle {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

div.wrap-collapsible {
  padding-bottom: 20px;
}

/* To format our error messages */
.hw_error_struct span { 
 display: block;
 white-space: pre-wrap;
}
.hw_error_struct .detail:before {
 content: 'Detail: ';
}
.hw_error_struct .hint:before {
 content: 'Hint: ';
}
.hw_error_struct .error:before {
 content: 'Error: ';
}

/* Fix up ui-widget-overlay */
div.ui-widget-overlay {
    background: #aaa !important;
    opacity: .3;
}


