/* Color reference

Dark (sidebar): 2D303B
#5485A5
Green (ok): 7db144
Orange (cancel): faa728
Red (alert): e53c37

*/


/* starters */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700');

html, body { 
  display: block; 
}

html {
  background-color: white;
}

body {
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	margin: 0;
	color: black;
	height: 100%;
}


* {
	box-sizing: border-box;
}

img {
  max-width: 100%;
}

ul { 
  list-style: none;
}

ul.conditions {
  margin-left:20px;
  list-style-type: disc;
}

ul.export_options li {
  text-align: center;
  margin-bottom: 3px;
}

/* Typography */

h1,h2,h3,h4,h5,h6 {
  color: #5485A5;
  font-weight: 700;
  margin-top:0;
  margin-bottom: 0.5em;
}

a, a:visited {
	text-decoration: none;
  color: #40b4e5;
  font-weight: 800;
}

a:hover {
  color: #001f4e;
}

p {
  margin-top: 4px;
  margin-bottom: 4px;
}


/* Layout */
body {
  display:-webkit-flex;
  display: flex;
  
  flex-wrap: wrap;
  
}
header {
  height: 3em;
  width:100%;
  background-color: #262626;
  color: white;
  padding: 0.8em 2em;
  display:-webkit-flex;
  display: flex;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

/* hidden until mobile */
#sidebar .hamburger {
  display:none;
}



.sidebar-logo {
  display: block;
  margin:0 auto;
  -webkit-filter: drop-shadow(3px 3px 3px #222222);
  filter: drop-shadow(3px 3px 3px #222222);
}

#wrapper {
  width:calc( 100% - 10em ); /* must match sidebar */
}

#sidebar {
  display:block;
  flex: 1 0 auto;
  width: 10em;       /* must match wrapper calc */
  min-height:100vh;
  
  background-image:
    linear-gradient(to right, rgb(38,38,38), rgb(38,38,38)),
    linear-gradient(to right, rgb(255,255,255), rgb(255,255,255)),
    linear-gradient(to right, #2D303B, #2D303B);
  background-position: center top, center top, center bottom;
  background-repeat: no-repeat;
  background-size: 100% 3em, 100% 3.1em, 100% 100%;
  padding: 1em 0.2em;
}


#main-content {
  display:block;
  background-color: #eee;
  flex: 1 0 auto;
  width:100%;
  min-height:99%;
  
  padding: 1em;
}

footer {
  width:100%;
  background-color: #262626;
  color: #747475;
  padding: 1em;
}

/* Header */





/* Footer */

.built-by {
  font-size: 12px;
}
.built-by a {
  color: #ababac;
}

/* Sidebar Navigation */
#nav {
  list-style: none;
  padding:0;
  margin: 30px 0.5em;
}

#nav li {
  margin-bottom:0.4em;
  text-align:center;
  min-height: 1.5em;
}

#nav li a {
  color:white;
  font-weight:bold;
  display:block;
  padding: 0.2em;
  height:100%;
  width:100%;
  line-height:1.2em;
}

#nav li a:hover {
  color: #40b4e5;
}

#nav li.active a {
  color: #40b4e5;
}




/* Tabs */
.tabs {
  width: calc( 100% - 5px );
  height: 32px;
  margin-top: 1.5em;
  border-bottom: 0.5px solid #5485A5;
}
.widget-tab {
  margin-top: 0;
}

.tabs li {
  list-style:none;
  display:inline;
}

.tabs a {
  margin-right: 5px;
  padding:5px 15px;
  height: 32px;
  display:inline-block;
  text-decoration:none;

  color: white;
  background-color: #5485A5;
  
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  
  border-top: 0.5px solid #5485A5;
  border-left: 0.5px solid #5485A5;
  border-right: 0.5px solid #5485A5;
  border-bottom: none;
}

.tabs a:hover {
  color: #40b4e5;
}

.tabs a.active,
.tabs a.active:hover {
  color: #5485A5;
  background-color: white;
  border-bottom: 0.5px solid white;
}


.tab_div {
  background-color: white;
  padding: 1em;
  
  border: 0.5px solid #5485A5;
  border-top: none;
  
  border-top-right-radius: 6px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.active_tick {
  color: #7db144;
}

.member-data {
  width: 100%;
}

/* ULs eg Services Provided need to be inline-block */
.member-data ul {
  display: inline-block;
}

/* align any div-wrapped textarea content */
.member-data div.text {
  display: inline-block;
  max-width: calc( 100% - 230px );
}

.member-data span {

  display: inline-block;
  width: calc( 100% - 220px - 10px ); /* to match label width */
}

.status {
  display:block;
  width: 20px;
  height: 20px;

  
  color: white;
  font-size: 18px;
  line-height: 18px;
  text-align: center;
}
.status.financial {
  background-color: #7db144;
  font-weight: bold;
  border-radius: 10px;
}
.status.resigned {
  background-color: #e53c37;
  border-radius: 3px;
}
.status.non_financial {
  background-color: #faa728;
  border-radius: 10px;
}
.status.pending {
  background-color: #faa728;
  font-weight: bold;
} 




/* Member send-email stuff */

.send-emails {
  padding: 1em;
  background-color: white;
  border: 0.5px solid #5485A5;
  border-radius:5px;
  margin: 0.5em 0;
}

.send-emails button {
  display: block;
  margin-bottom: 0.3em;
}

.send-emails button.send-spinner {
  background-image: url('/images/spinner.svg');
  background-size: 22px;
  background-position: 95% center;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.send-emails span {
  font-size: 1em;
  font-style: italic;
}

/*
// not currently used
.email-messages {
  border-radius:5px;
  background-color: #6cb51c;
  padding: 0.5em 1em;
  color: white;
  display: inline-block;
  font-weight: 600;
}
.error-messages {
  border-radius:5px;
  background-color: red;
  padding:  0.5em 1em;
  color: white;
  display: inline-block;
  font-weight: 600;
}
*/

/* Mail Log Pane */
.email_pane {
  margin:auto;
  max-width: 640px;
}



/* Forms */

form {
  display: inline;
}

.form-element {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

label {
  display: inline-block;
  width: 220px;
  margin-bottom: 8px;
  padding-right: 10px;

  color: #5485A5;
  font-weight: 600;
  text-align: right;
  
  vertical-align:top;


}

input[type=text],
input[type=email], 
input[type=url], 
select {
  width: 280px;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 2px;
}

.form-element input[type=text],
.form-element input[type=email], 
.form-element input[type=url], 
.form-element select {
  vertical-align:top;
}

textarea {
  border: 1px solid #333;
  border-radius: 3px;
  padding: 2px;
  height: 70px;
}

select[multiple] {
  height: 400px;
  margin-top: 1em;
}



input[type='radio'] {
	/* Double-sized Radio buttons */
	-ms-transform: scale(1.2); /* IE */
	-moz-transform: scale(1.2); /* FF */
	-webkit-transform: scale(1.2); /* Safari and Chrome */
	-o-transform: scale(1.2); /* Opera */
	
	cursor: pointer;
	
  width: 1.5em;
	margin-top: 4px;
	margin-left: 1.5em;
	vertical-align: top;
}

.radio-label {
	font-weight: bold;
}

.radio-label label {
	display: inline;
	width: auto;
	margin: 0;
	cursor: pointer;
}

.radio-label input[type="radio"]:checked ~ * { 
    color: #40b4e5;
}

/* For the radio buttons, we use the Note as the label */
.radio-label span.form-note {
	margin-left: 0;
	
	width: calc( 100% - 14em );
	min-width: calc( 100% - 14em );

	vertical-align: top;
	
	font-weight: normal;
	font-style: normal;
}





input[type=submit],
button 
{
  margin-top: 0.8em;
  padding: 7px 22px;
  
  background-color: #40b4e5;
    
  border: 0px solid #333;
  border-radius: 3px;
    
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  
  cursor: pointer;
}







button.delete-object {
  background-color: #e53c37;
}

button.upper-right {
  margin: 0;
  float: right;  
}


input[type=submit]:hover,
button:hover {
  color: black;
}

button.cancel  {
  background-color: #faa728;
}

button.edit {
  margin: 0;
  padding: 4px 22px;
}


/* on the some pages we have a div with multiple buttons floating at upper right 
TO DO: Make these flexed??
*/
div.upper-right {
  display: inline-block;
  float: right;
}
div.upper-right button {
  margin:0;
  width: 80px;
  margin-bottom: 10px;
}





/* Style for Member, Business and Label search */

input.search {
  width:200px; 
  height: 30px;
  padding: 5px;
  margin-bottom: 1em;
  margin-right: 10px;
}



.result_count {
  margin-left: 5px;
  display: inline;
}


/* Color inactive emails red */
.email-active-N {
  color: #e53c37; /* red */
}






span.form-error {
  font-style: italic;
  font-size: 0.8em;
  color:red;
}
span.form-note {
	display: inline-block;
  margin-left: 220px;
	margin-top: 0px;
	font-size: 0.7em;
	line-height: 1.5em;
	font-style: italic;
	max-width: 400px;
	min-width: 500px;
}

.no_notes thead, .no_tasks thead {
  display: none;
}

.note_item_link {
  display: none;
}

.show_note_item .note_item_link {
  display: block;
}

.show_note_item {
    margin-bottom: 2em;
}

textarea#note_text {
  width: 300px;
  height: 100px;
}

#note_reminder {
  display: none;
}

#note_reminder.show {
  display: inline-block;
  margin-top: 4px;
  vertical-align: top;
}

#note_reminder input {
  display: inline-block;
}

#activateReminder,
#addNote {
  margin: 0;
  vertical-align: top;
}




.truncate {
  height: 1.6em;    /* high enough to show first line of p tag */
  overflow: hidden;
  cursor: pointer;
}

.truncate.show {
  height:auto;
  margin-bottom: 1em;
}

.ui-sortable-handle {
  position: relative;
}

.ui-sortable-handle label:after {
  content: '\2807\2807\2807';
  letter-spacing: -6px;
  color: black;
  position: absolute;
  right: 10px;
  top: 5px;
}

.ui-sortable-handle.checkbox-inner {
  cursor: grab;
  touch-action: none;
  background: white;  
  border: solid 0.5px grey;
  border-radius: 4px;
  margin-bottom: 0.5em;
}


.checkbox-outer {
  margin-top: 1em;
}

.checkbox-outer.sortable {
  column-count: 4;
}

.checkbox-inner input {
  /* Double-sized Checkboxes */
  -ms-transform: scale(1.6); /* IE */
  -moz-transform: scale(1.6); /* FF */
  -webkit-transform: scale(1.6); /* Safari and Chrome */
  -o-transform: scale(1.6); /* Opera */
  margin: 11px 0px 0px 15px;
}
.checkbox-inner label {
  display: inline-block;
  width:80%;
  margin: 6px 0px 6px 10px;
  
  font-size: 0.9em;
  text-align: left;
  cursor: pointer;
}

:checked + label {
  color: #40b4e5;
}



.section-checkboxes {
  display: flex;
  
  -webkit-justify-content:space-between;
  justify-content: space-between;
  
  -webkit-flex-flow : row wrap;
  flex-flow: row wrap;
  
}


.section-checkboxes .keeptogether {
  padding-right: 10px;
  min-width: 240px;
}

/* hide Condition trash icon unless we're on the edit form */
.deleteCondition {
  display: none;
}


.deleteNote, 
.clearReminder, 
.addReminder, 
.deleteCondition,
.deleteTask {
  cursor: pointer;
  min-width: 15px;
}

form .deleteCondition {
  display: inline-block;
}

/* tasks form */

textarea#description {
  height: 100px;
  width: 300px;
}

select#user_id, button#addTask {
  vertical-align: top;
  margin-top: 0px;
  
}
select#user_id {
  height: 29px;
}


/* Lists */

ul {
  margin: 0;
  padding: 0;
}


/* Tables */

table {
  width: 100%;
  background-color: white;
  border-spacing: 0;
  border-collapse: separate;
  padding: 0.5em 0;
}

thead, tfoot {
  font-weight: 700;
}

thead td {
  border-bottom: 1px solid #5485A5;
  cursor: pointer;
}

tfoot td {
  border-top: 1px solid #5485A5;
}

tbody tr:last-child td {
  padding-bottom: 15px;
}

tr.new_label_section td {
  border-top: 1px solid #5485A5;
}

td {
  font-size: 0.8em;
  vertical-align: text-top;
  padding: 4px 4px;
}

span.report-counter {
  font-weight:normal;
}

/* Audit Trail */
.show-audit-trail {
  cursor: pointer;
}

.audit-single {
  border-bottom: 1px solid #ccc;
  padding: 0.2em 0;
}

.audit-single li {
  list-style: none;
  padding-left: 15px;
}

.audit-single .username {
  font-weight:bold;
}

/*Widgets*/

.widgets-container {
  display: -webkit-flex;
  display: flex;
  
  -webkit-justify-content:space-between;
  justify-content: space-between;
  
  -webkit-flex-flow : row wrap;
  flex-flow: row wrap;
}

.widgets-container h2 {
  width: 100%;
  font-weight: 700;
  background-color: #2D303B;
  color: white;
  margin: 0;
  padding: 0.2em 0.5em;
}

.widget {
  background-color: #fff;
  width: 49%;
  margin-bottom: 2em;
    
  border: 0.5px solid #5485A5;
  border-top: none;
  
  border-top-right-radius: 6px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.widget-reminder {
  width: 100%;
}

.widget-reminder input,.widget-reminder select {
  max-width: 15vw;
  min-width:10vw;
}


.widget-reminder table {
  width: 100%
}


.widget-report {
  display: grid;
  grid-template-columns: auto auto;
  grid-column-gap: 50px;
  grid-row-gap: 10px;
}

.widget-report li {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content:space-between;
  justify-content:space-between;
}
.widget-report a {
  
}

.inner-widget {
  padding: 0.5em 1em;
}

.widget-single {
  border-bottom: 1px solid #ccc;
  padding: 0.2em 0;
}
.login-success {
  color: green;
}
.login-fail {
  color:red;
}

.reminder-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
}
#todo_tab label{
  display: none;
}



.business-link {
  font-weight: bold;
  color: #40b4e5;
  cursor:pointer;
}

.business-link:hover {
  color: #EFAC4E;
}

/* Password-good and confirmation tick */
.tick {
  vertical-align: middle;
  margin-left: 5px;
  display: none;
}

.show-tick {
  margin-left: 5px;
  display: inline;
}




/* TinyMCE */

.form-element > .mce-panel {
  display: inline-block;
}

/* Login page */
.forgot-password {
  display: inline;
}





@media only screen and (max-width: 1200px) {
  /* sortable checkboxes go to 3 columns */
  .checkbox-outer.sortable { column-count: 3; }
}



@media only screen and (max-width: 1000px) {

  /* Dashboard widgets go full-width */
  .widget {
    width: 100%;
  }

}


@media only screen and (max-width: 900px) {

  /* sortable checkboxes go to 2 columns */
  .checkbox-outer.sortable { column-count: 2; }

}



@media only screen and (max-width: 750px) {

  #wrapper {
    min-height: calc( 100vh - 55px );
  }

  header {
    height: 4em;
    position:fixed;
  }
  
  header .user-details {
    line-height: 2.4em;
  }

  #main-content {
    margin-top: 4em;
  }
  
  #sidebar .hamburger {
    display:block;
    margin-top: 10px;
    height: 3em;
    margin: auto;
  }

  /* hide sidebar */
  #sidebar {
    position: fixed;
    z-index: 1;
    width: 12em;
    max-height: 4em;      /* shrunken on mobile */
    min-height: 4em;
    transition-property: max-height;
    transition-duration: 0.4s;
    
    background: #262626;
  }
  
  #sidebar #nav {
    display: none;
  }
  
  #sidebar::-webkit-scrollbar {
    display: none;
  }
  
  #sidebar.expanded {
    max-height: 100vh;
    min-height: 100vh;
    position: fixed;
    overflow-y: scroll;
    background: #2D303B;
  }
  
  #sidebar.expanded #nav {
    display: block;
  }
  
  /* wrapper can go full width */
  #wrapper {
    width: 100%; 
  }
  
  .sidebar-logo {
    display: none;
  }



  input,
  select,
  textarea {
    max-width: 100%;
  }
  
  input[type=submit],
  button {
    margin-left: 0; 
  }
  
  .member-data,
  .form-element {
    margin-bottom: 0.8em;
  }
  
	.form-element input, 
  .form-element select {
		display: block;
	}	
	.form-element label,
  .member-data label {
		display: block;
		text-align: left;
    margin: 0;
		margin-bottom: 3px;
	}

	/* Checkboxes stay inline */
	.checkbox-inner input[type='checkbox'] {
    display: inline-block;
  }
	.checkbox-inner label {
	  display: inline-block;
    margin: 6px 0px 6px 10px;
	}
  
  /* ULs eg Services Provided need to be inline-block */
  .member-data ul {
    display: inline-block;
  }

  /* align any div-wrapped textarea content */
  .member-data div.text {
    display: block;
    max-width: 100%;
  }
  
  span.form-note {
    display: block;
    text-align: left;
    margin: 0;
    min-width: 200px;
  }

  
  
	/* Radio buttons stay inline */
	input[type='radio'] {
		display: inline-block;
		width: 1.3em;
		margin-left: 1em;
	}
	
	.radio-label label {
		display: inline;
		margin: 0;
	}
	
	.radio-label span.form-note {
		display: inline-block;
		width: calc( 100% - 12em );
		min-width: calc( 100% - 12em );
	}

  
  
  
  
  /* Standard Tabs don't fit on a small screen */
  .tabs {
    background-color: white;
    padding: 1em;
    width: 100%;
    height: auto;
    border-bottom: none;
    column-count: 3;
    
    border-top: 0.5px solid #5485A5;
    border-right: 0.5px solid #5485A5;
    border-left: 0.5px solid #5485A5;
    
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
    
  }

  .tabs li {
    list-style:none;
    display:inline;
  }

  .tabs a {
    width: 100%;
    height: 40px;

    margin-right: 0;
    margin-bottom: 8px;

    padding-left: 2px;
    padding-right: 2px;

    text-align: center;
    line-height: 28px;
    
    border-radius: 6px;
    border: 0.5px solid #5485A5;
  }
  
  .tabs a.active,
  .tabs a.active:hover {
    border-bottom: 0.5px solid #5485A5;
  }
  
  .tab_div {
    border-top: none;
    border-top-right-radius: 0px;
  }

	
}

@media only screen and (max-width: 650px) {
  
  /* Standard Tabs don't fit on a small screen*/
  .tabs {
    column-count: 2;    
  }

}

@media only screen and (max-width: 460px) {

  /* sortable checkboxes go to 2 columns */
  .checkbox-outer.sortable { column-count: 1; }

}


/* Print */
@media print {
  #sidebar, header, footer, .upper-right, button, input, .tabs, tab_div  {
    display:none!important;
  }
  #main-content {
    background-color: white;
  }
  #wrapper {
    margin: 0 auto!important;
    width: 100%!important;
  }


}