/************************************************************************************
	This file will always be loaded for html pages. It should contain a minimal set of
	styles to enable the core elements of SeeMS to work correctly.
*************************************************************************************/

/*********** Generic styles. *******************************/

.center { text-align: center; }
.right { text-align: right; }
.italic { font-style: italic; }
.bold { font-weight: bold; }
.immense { font-size: 4em; }
.huge { font-size: 3em; }
.large { font-size: 1.5em; }
.big { font-size: 1.5em; } 


/************ div/fieldset (other?) widths **********************************/

.narrow { width: 20%; }
.quarter-width { width: 25%; }
.third-width { width: 33%; }
.half-width { width: 50%; }
.three-quarter-width { width: 75%; }
.full-width { width: 100%; }

/************ borders and shapes ****************************************/

.space-before { margin-top: 0.5em; }
.dotted { border: 1px dotted; }
.solid { border: 1px solid; }
.rounded { border-radius: 5px; }
.two-columns { column-count: 2; }
.warning {
	padding: 0;
	color: #F70;
}
.behind { z-index: -1; }
.highlight { 
	background: #BEF; 
}

/************ Forms ****************************************/

input[type=text], select, textarea {
  resize: vertical;
}

label {
  padding: 12px 12px 12px 0;
  display: inline-block;
  box-sizing: border-box;
}

input[type=submit] {
  background-color: #777;
  color: white;
  font-size: 1em;
  padding: 6px 12px;
  cursor: pointer;
  float: left;
}

input[type=submit]:hover {
  background-color: #AAA;
}

.label-col {
  float: left;
  width: 25%;
  margin-top: 0.5em;
  box-sizing: border-box;
}

.input-col {
  float: left;
  width: 75%;
  margin-top: 0.5em;
  box-sizing: border-box;
}

.input-full {
  width: 100%;
  margin-top: 0.5em;
}

.input-row::after {  /* Clear floats after the columns */
  content: "";
  display: table;
  clear: both;
  box-sizing: border-box;
}

.form-wrapper { list-style-type: none;}

/*************** Data tables ****************************************/

.table-controls {
	margin-left: 0;
	display: inline-block;
}

.column-actions {
	display: flex;
  	flex-direction: column;
	gap: 0px;
}

.hide { display: none; }

/*************** For CMS ****************************************/

div, section, h1, h2, h3, figure, figcaption, img { 
	/* Stabilise highlighted chunks on mouseover of their edit control. */
	border: solid 1px transparent;
}

.undead { 
	background: repeating-linear-gradient(45deg, #BBB, #BBB 10px, #DDD 10px,#DDD 20px);		/* Dark, light */
	padding: 1em;
 }

.higher { 	
	border: solid 1px red;
	color: red;
}

.margin { 
	padding-top: 1em;
 }

.object-highlight { 
	background: #9D9; 
	border: 2px solid #0F0;
}

.button-highlight { 
	border: 2px solid none;
	display: inline-block;
}

.object-drop { 
	background: #ACC; 
	border: 2px solid #0F0;
}

.file { background: #EEE; }

.sunken {	
	border-color: #777;
	padding: 4px;
	border-top: ridge 2px;
	border-left: ridge 2px;
	border-bottom: groove 2px;
	border-right: groove 2px;
	border-radius: 5px;
}

.collapsed { display: none; }

/******************  CMS widgets ****************************************/

.scroller {
  overflow: auto;
  white-space: nowrap;
  padding: 5px;
  margin-bottom: 1em;
}

.scroller img {
  padding: 1rem;
  width: 14rem; 
  height: auto;
  display: inline-block;
}

.scroller figure {
  padding: 1rem;
  width: 16rem; 
  height: auto;
  display: inline-block;
}

.flex {
	display: flex;
  	padding-left: 0px;
	width: 95%;
	flex-flow: row nowrap;
	justify-content: left;
}

.flex div {
  padding-right: 5px;
  padding-left: 0px;
  margin-left: 0px;
  max-width: 50%;
  display: inline-block;
}

.flex figure {
  padding: 5px;
  max-width: 50%;
  display: inline-block;
}

.number { 
	color: #000;
	background: #EEF;
  	border: 1px solid #000;
  	padding: 1px;
  	margin: 2px;
	border-radius: 20%;
	white-space: nowrap;
}

.number a { text-decoration: none;  }


/************ Core elements ****************************************/

.error { color: red; }

.autosave { 
	border: 1px ridge #AAA;
	background: white;
}

.report { 
	margin-top: 0;
	margin-bottom: 0;
	border-top: 2px ridge;
	border-bottom: 2px ridge;
	padding: 0.5em;
	background-color: #FDD;
}

.alert { 
	margin-top: 0;
	margin-bottom: 0;
	border-top: 2px ridge;
	border-bottom: 2px ridge;
	padding: 0.5em;
	background-color: #FBB;
	border-color: #F00;
	color: #F00;
}

.tick { 
	font-size: 14pt; 
	text-decoration: none;
	color: #0F0;
}

.cross { 
	font-size: 14pt; 
	text-decoration: none;
	color: #F00;
}

.block { /* Helps to stabilise highlighting of content blocks on mouseover of edit control. */
	border: solid 1px transparent;
}

/************ Edit controls ****************************************/

.edit-menu {  
	font-size: 12pt;
	text-decoration: none;
	margin: 0;
    padding: 0;
}

/************ Buttons ****************************************/

.boxed { 
	padding: 3px; 
	margin: 0px; 
	border-width: 0;
	height: 1em;
}

button, .buttons {  
	cursor: pointer;
    min-width: 9em;
    height: 2.5em;
    display: inline-block;
	margin: 0;
	padding: 0.6em;
	text-align: center;
}

button a, .buttons a { 
	text-decoration: none;
}

.small { min-width: 6em; }

.tiny { min-width: 3em; }

.dim { 
	background-color: #777;
	border-color: #000;
 }

 .big-red {  
	cursor: pointer;
    width: 8em;
    height: 8em;
    color: #FFF;
	background: #F00;
	text-decoration: none;
	text-align: center;
	font-size: 5em;
	border-radius: 50%;
	font-weight: bold;
	border: 10px solid #FB7;
}

.label {  
	padding: 0.3em;
	font-weight: bold;
}

/************* File uploads *********************************************************/

.drop-area {  
	border: 2px blue ridge;
	height: 15em;
	width: 15em;
	background: repeating-linear-gradient(45deg, #EEE, #EEE 10px, #FFF 10px, #FFF 20px);
	padding: 0.3em;
	background-repeat: no-repeat;
	background-size: contain;
}

.drop-label {  
	text-align: center;
	width: 100%;
	padding: 0.2em;
	font-weight: 800;
	font-size: 14px;
	height: 5em;
}

.file-delete {  
	border: 2px blue dotted;
	width: 8em;
	padding: 0.3em;
}

/************* Calendars *********************************************************/

.backwards {
	background: #000;
    border-top-left-radius: 0.5em;
    border-bottom-left-radius: 0.5em;
}

.backwards a {
	background: #000;
	color: #FFF;
}

.forwards {
	background: #000;
    border-top-right-radius: 0.5em;
    border-bottom-right-radius: 0.5em;
}

.forwards a {
	background: #000;
	color: #FFF;
}

.selected {
	color: #FFF;
	background: #000;
	border: 1px ridge #000;
}

.selected a {
	color: #FFF;
	background: #000;
}

.unselected {
	color: #000;
	background: #CCC;
	border-bottom: 2px ridge #888;
	border-top: 2px ridge #888;
}

.unselected a {
	color: #000;
	background: #CCC;
	text-decoration: none;
}

/************** Pictures ***********************************************************/

.float-right { /* Must precede the element it should be next to. */
	float: right;
	margin-left: 8px;
}

.float-left { /* Float an element left */
	float: left;
	margin-right: 8px;
}

figure { /* Should this be in site? */
	margin: 0.5em;
	border: 1px dotted;
    display: flex;
  	flex-direction: column;
  	align-items: center;
}

.no-border { border: none; }
 
figure > img {
	object-fit: cover;
}

figure > video  {
	width: 100%;
	height: auto;
}

figcaption { 
	text-align: center;
	width: 100%;
}

.thumb {
	max-width: 80%;
	max-height: 50px;
}

.dimmed {
	opacity: 0.2;
}

.oval {
	border-radius: 50%;
}

.rounded-pic {
	 border-radius: 1em;
}

.picture-scale {
	max-width: 25rem;
	max-height: 10rem;
}

.picture {
	max-width: 80%;
	max-height: 700px;
	vertical-align: middle;
}

.edit-section { /* Push section edit icon into the left margin. */
  	position: relative; 
	left: -1.5em;
}

.edit-aside { /* Push section edit icon into the left margin. */
  	position: relative; 
	left: -2em;
}

.gallery {
	margin-top: 1em;
	text-align: center;
}

.svg-graph {
	padding: 2em;
}

.svg-icon {
	display: inline-block;
	vertical-align: middle;
	margin: 1px;
	height: 16px;
	width: 16px;
}

.svg-icon-mini {
	display: inline-block;
	vertical-align: middle;
	margin: 0px;
	height: 12px;
	width: 16px;
}

.icon {
	display: inline-block;
	margin: 0;
	padding: 0;	
}

.arrow {
  text-decoration: none;
  font-size: 7em;
}

/******* Standardised figure widths (likely to override in site.css) ********************/

.narrow-pic { max-width: 100px; height: auto; }
.third-pic { max-width: 233px; height: auto;  }
.half-pic { max-width: 350px; height: auto;  }
.three-quarter-pic { max-width: 525px; height: auto;  }
.standard-pic { max-width: 700px; height: auto;  }
.full-pic { max-width: 900px; height: auto;  }

/***************** Modals *************************************************************/

.modal-hidden { display: none; }

.modal-background {
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-box {
	margin: 15% auto; /* 15% from the top and centered */
	width: 60%; /* Could be more or less, depending on screen size */
}

.modal-box textarea { 
	margin-left: 2em; /* Reduce accidental closing of modal when editing */
}

.modal-close {
  color: #AAA;
  float: right;
  font-weight: bold;
  text-decoration: none;
}

.modal-close:hover,
.modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.plain-button {
	text-decoration: underline;
	margin: 0;
	display: inline-block;
	color: blue;
	border: none;
	background: transparent;
}

.modal-back {
  color: #AAA;
  font-size: 72px;
  font-weight: bold;
  text-decoration: none;
  vertical-align: middle;
}

/************** Hover boxes **********************************************/

.info_box, .hover-box {
	position: absolute;
	display: none;
	z-index: 999;
	width: 10em;
	font-weight: normal;
	height: auto;
	background: #EEE;
	color: #000;
	border-style: groove;
	border-width: 2px;
	border-color: #00F;
}

.wide {
	width: 40em;
}
.very_wide, .very-wide {
	width: 70em;
}

/**************** Feeds **********************************************************/

article { margin-top: 0.5em; } /* Used for posts */

.collapsible {
	list-style: none;
	text-decoration: none;
}

.collapsible img {
	max-width: 30em;
	height: auto;
}

.pm {
	font-weight: bold;
  	border-width: 1px;
  	border-radius: 2px;
  	color: #FFF;
  	background: #000;
  	padding: 2px;
  	min-width: 2em;
  	text-align: center;
}

.collapse-entry {
  	border-width: 2px;
  	border-color: #000;
  	width: 25em;
  	padding: 2px;
  	min-height: 2em;
}

.collapse-button { /* Used for post headers */
	cursor: pointer;
	background: #CCC;  	
	color: #004; 
	font-size: 1em;
	width: 100%;
	padding: 0.2em;
  	border: 1px #00F dotted;
  	text-align: left;
}

.collapse-button:hover {
	background: #BEF;  	
	color: #000; 
}

.reply-menu {
	display: inline-block;
	font-size: 12pt;
	font-style: italic;
    list-style-type: none;
	text-decoration: none;
	margin-top: 0.25em;
    padding: 0.25em;
    background-color: #BBF;
    border: 2px #22F ridge;
	border-radius: 5px;
}

.reply-menu li {
	display: inline-block;
	margin: 0;
    padding: 0;
    background-color: #BBF;
}

.widish { width: 10em; }
.wide { width: 40em; }
.very_wide { width: 70em; }

.poster {
	font-style: italic;
	margin-left: 1em;
}

.reply {
	background: #EEE;
  	border-width: 1px;
  	border-style: dotted;	
}

.reply p {
	background: #FFF;
	margin-left: 1em;
	margin-right: 1em;
	padding: 0.3em;
  	border-width: 1px;
  	border-style: solid;
}

.replies {
}

.story {
  padding: 5px;
  width: 20%;
  display: inline-block;
}

.story div {
  white-space: normal;
}

/*************** Emailers ************************************************************/

.emailer {
    padding-left: 0.1em;
    padding-right: 0.1em;
    padding-top: 0.2em;
	border-left: 0px;
	border-right: 1px;
	border-top: 1px;
	border-bottom: 0px;
	border-style: ridge;
	border-radius: 5px;
}

.emailer legend {
	border-style: none;
	padding: 0.3em;
}

/**************** Header and footer. ************************************************************/

.hamburger { display: none; } 

/********** Prepare for small screen *********************************************/

.show_aside { display: none; }
.visible { display: block; }

/**********  Small screens *********************************************************/

@media screen and (max-width: 900px) {
	h1 { font-size: 3.5em; }
	h2 { font-size: 2em; }
	.immense { font-size: 3em; }	
	.large { font-size: 2em; }
}

@media screen and (max-width: 767px) {
	.info_box { left: 0em; }
	body { padding: 0; }	
	h1 { font-size: 3em; }
	h2 { font-size: 1.5em; }
	footer { font-size: 12pt; }
	.hamburger { display: block; } 
	.immense { font-size: 2.5em; }	
	.large { font-size: 1.25em; }
}

@media screen and (max-width: 540px) {
	.flex { flex-flow: column; }
	.info_box, .info_box_widish, .info_box_wide { left: 0em; }
	.posted { border-width: 0; font-size: 0.75em; } 
	.reply-wrapper { font-size: 0.75em; } 
	h1 { font-size: 1.75em; }
	h2 { font-size: 1.25em; }
	.immense { font-size: 1.75em; }	
	.large { font-size: 1.5em; }
	img { max-width: 80%; }
	.flex { display: block; }
}

@media (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 480px) {

	.flex { display: block; }
	.flex > div { width: 100%; }
	.flex > figure { max-width: 100%; }
	.info_box, .info_box_widish, .info_box_wide {
		left: 0em;
	}
	.modal-box {
		margin: 10% auto; /* 5% from the top and centered */
		width: 85%; 
	}
	.posted { border-width: 0; font-size: 0.75em; } 
	.reply-wrapper { font-size: 0.75em; } 
	h1 { font-size: 1.75em; }
	h2 { font-size: 1.25em; }
	.hamburger { display: block; } 
	.immense { font-size: 1.75em; }	
	.large { font-size: 1.5em; }
	img { max-width: 80%; }
}