/******************************************************************************
 * snip.css
 * @type: css
 * @notes: 
 * @trigger: snip_css
 * @scope: 
 * @prepend: 
 * @append: 
 * @compression: 1
 * @modified: 2015-09-10 17:52:54
 * @created: 2015-08-27 09:49:09
 ******************************************************************************/

/**
 * Forked off of bijou.css (https://github.com/andhart/bijou)
 * Inspired by:
 * - purecss (https://github.com/yahoo/pure)
 * - mincss (https://github.com/owenversteeg/min)
 * 
 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body, input, button, select, option, textarea { font-family: "Open Sans", sans-serif; font-size: 16px; }
body, textarea,input { background:0; border-radius:0; }
a { text-decoration: none;  color: #5f90b0 }
a:hover { color: #406882 }
select { border-radius: 0; margin: 0; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; margin-bottom: .5rem; }
h1 { font-size: 2em }
h2 { font-size: 1.75em }
h3 { font-size: 1.5em }
h4 { font-size: 1.25em }
h5 { font-size: 1.15em }
h6 { font-size: 1em }

main { }
.flex { display: flex; align-items: center; }
.flex_right { margin-left: auto; }
.mauto { margin: 0 auto; }
.mb { margin-bottom: 1rem; }
.ml { margin-left: 1rem; }
.mt { margin-top: 1rem; }
.mr { margin-right: 1rem; }
.ms { margin: 0.5em 0; }
.vat { vertical-align: top; }
.hidden { display: none !important; }
p, .p { margin: 10px 0;}

select {
  -webkit-appearance: none;
  appearance: none;
  background-color: white;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 20"><path d="M8,9,10,12,12,9" fill="none" stroke-width="1px" stroke="black"/></svg>');
  background-position : right center;
  background-repeat: no-repeat;
  padding-right: 1.5em;
}
    
/* ============================================
                    NAV
   ============================================*/
header {
	background    : #FFF;
	padding       : 5px 8px;
	margin-bottom : 3px;
	border-bottom : 1px #DDD solid;
	box-sizing    : content-box;
}
header h4 { color: #191919; font-weight: 200; padding-right: 20px; margin-bottom: 0;}
header .container { 
	display: flex;
	gap: 20px;
	align-items: center;
}

header.centered .container {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
}

header .container>ul { 
	list-style: none; 
	display: flex;
	margin-left: auto;
	justify-self: end;
}

header .container>ul>li { padding-left: 0.5em; }
header .container>ul>li:after { margin-left: 0.5em; content: "|"; color: #ddd; }
header .container>ul>li:last-child { padding-right: 0; }
header .container>ul>li:last-child:after { content: ""; }

a.header_logo {
	gap          : 10px;
	color        : #000;
	margin-right : 0.5em;
	justify-self: start;
}

a.header_logo .svg_logo {
	width  : 2rem;
}

.header_title {
	font-weight : bold;
	color       : #555;
	font-size    : 1.5em;
	justify-self: start;
	margin-bottom: 0;
}

.centered .header_title {
	justify-self: center;
}

header.fixed { position: fixed; left: 0; right: 0; top: 0 }
/* SUB MENU */
header li ul { 
	display          : none;
	position         : absolute;
	left             : -12px;
	top              : 40px;
	border           : 1px solid #ddd;
	border-top-width : 0;
	background       : #fff;
	padding          : 12px;
	white-space      : nowrap;
}
header li ul li { display: block; margin: 8px 0; }
header li:hover > ul { display: block; }
header .ham { 
	justify-self: end;
	display: none; 
}

.title_links {
  border-left: 1px solid #ccc;
  padding: 5px 10px;
}

/* =================
    VERTICAL MENU 
   =================*/
ul.vertical_menu li { list-style: none; }
ul.vertical_menu li a, ul.vertical_menu li span {
	display       : block;
	padding       : 20px 20px;
	background    : #efefef;
	border-bottom : 1px solid #ddd;
}

ul.vertical_menu .selected       { background: #5f90b0; color: #eee; }
ul.vertical_menu li a:hover      { background: #f9f9f9; color: #5f90b0; }
ul.vertical_menu .selected:hover { background: #72ADD3; color: #eee; }
ul.vertical_menu li a strong     { color: #333; }


/* ================================================
                    BUTTONS
   ================================================*/
body button, body .button {
	border          : 0;
	border-radius   : 4px;
	outline         : 0;
	cursor          : pointer;
	padding         : 0.75rem 1.5rem;
	text-decoration : none;
	background      : #ddd;
	display         : inline-grid;
	grid-gap        : 10px;
	align-items     : center;
	justify-content : center;
	grid-auto-flow  : column;
}

:root {
	--blue   : #5f90b0;
	--green  : #4daf7c;
	--red    : #e6623c;
	--teal   : #419F9B;
	--orange : #F07F33;
}

button.tiny, .button.tiny { padding: 0.25rem 0.5rem; font-size: 0.9em }
button.small, .button.small { padding: 0.5rem 0.75rem; font-size: .95em }
button.large, .button.large { padding: 1rem 2rem; font-size: 1.1em }

button:hover, .button:hover { filter: brightness(0.9) contrast(1.2);}

button.primary, .button.primary { color: #fff; background: var(--blue); }
button.success, .button.success { color: #fff; background: var(--green) }
button.danger, .button.danger,
button.error, .button.error { color: #fff; background: var(--red); }
button.warning, .button.warning { color: #fff; background: var(--orange); }
button.info, .button.info  { color: #fff; background: var(--teal); }

button:disabled, .button.disabled { opacity: .50; cursor: default;}

button.delete_x {
  top             : 5%;
  right           : 5%;
  position        : absolute;
  width           : 24px;
  height          : 24px;
  display         : flex;
  justify-content : center;
  align-items     : center;
  background      : rgb(180, 0, 0, 0.3);
  padding         : 0;
  color           : #fff;
}

button.delete_x:hover { background: rgb(180, 0, 0, 0.5); }
button.delete_x svg line { stroke: #fff; }

/* =============================================
                    SVGs
   =============================================*/
svg.svg_icon {
	width  : 16px;
	height : 16px;
	stroke : #999;
	fill   : #999;
}

button svg.svg_icon, .button svg.svg_icon {
	width  : 0.7rem;
	height : 0.7rem;
}

.primary svg, 
.success svg, 
.danger svg,
.info svg,
.warning svg {
	stroke: #fff; fill: #999;
}

/* ==================================================
                    DROPDOWNS
   ==================================================*/
.caret, .caret.desc, .caret.down {
	display      : inline-block;
	margin       : auto 0;
	position     : absolute;
	top          : 0; bottom: 0; right: 10px;
	width        : 0; height: 0;
	border-top   : 4px solid;
	border-right : 4px solid transparent;
	border-left  : 4px solid transparent;
}
.caret.asc, .caret.up {
	border-top    : 0;
	border-bottom : 4px solid;
}
.caret.right {
	border-top    : 4px solid transparent;
	border-bottom : 4px solid transparent;
	border-right  : 0;
	border-left   : 4px solid;
}
.caret.left {
	border-top    : 4px solid transparent;
	border-bottom : 4px solid transparent;
	border-left   : 0;
	border-right  : 4px solid;
}


/* =============================================
                    FORM
   =============================================*/
/*
 * Form by default are stacked
 * Specify inline to prevent stacking
 */  
form { width: 100%; }
textarea, legend { display:block; margin-bottom: 0.5em; }
textarea, input, select, .input { border:1px solid #ccc; padding:5px; }
input[type=range] { padding: 0; }
textarea:focus, input:focus, .input:focus, select:focus { outline: none; border: 1px solid #000 !important; }
textarea { min-height: 3em; transition: all 0;  }
input, .input { border-radius: 4px; }
input.error, .error input { border: 1px solid red; background: #fff9f9; }
.non_input { display: block; }
input:disabled, textarea:disabled { background: #eee;	border: 0; }

/* ==================
    FORM - INLINE 
   ==================*/
.inline, .inline textarea, .inline input, .inline select, .inline label, .inline .input_block { 
	display: inline-block; 
	vertical-align: middle;
}
.inline textarea { width: 60%; min-height: 100px; }
input[type="checkbox"] { display: inline; width: auto; }
::-webkit-input-placeholder { color: #b9b9b9;}
input:focus::-webkit-input-placeholder, datalist { display: none; }
.form_group { margin-bottom: 1em; }
.inline .non_input { display: inline-block; }

/* ==================
    FORM - ALIGNED 
   ==================*/
.aligned label {
	text-align: right;
	margin: 0 1em 0 0;
	width: 8em;
}
.aligned label.top { vertical-align: top; }
.aligned input, textarea, select, legend { margin-bottom: 0; }
.aligned .alert { width: 400px; display: inline-block; }

/* =============================================
                    BAR
   =============================================*/
.bar {
	min-height      : 16px;
	padding         : 0 9px;
	border          : 1px solid #eee;
	background      : #fefefe;
	height          : 3rem;
	font-size       : 0.8em;
	width           : 100%;
	display         : flex;
	align-items     : center;
	justify-content : flex-start;
}
.bar button, .bar .button, .bar label {	margin: 0px 0.5rem 0 0; }
.bar select, .bar input, .bar label, .bar select { margin: 0px 20px 0 0; }
input:not([type]), .bar input[type=text] { width: 20%; min-width: 10rem; height: 2rem; }
.bar input[type=checkbox] { margin-right: 8px; }
.bar select { padding: 3px 8px;}
.bar select option:first-child { color: red !important; }
select option[default] { color: #aaa; }
label.strong { font-weight: bold; }

button[disabled], button[disabled]:hover {
	color: #ccc;
	background-color: #eee;
	cursor: default;
}

/* =========================================================
                    FORM FIXED FLOAT
   =========================================================*/
.fixed_float { position: relative; margin: 8px 0; }

.fixed_float > input:not([type='checkbox']), .fixed_float > .input {
	border-radius : 8px;
	height        : 50px;
	padding       : 10px;
	font-size     : 1rem;
	padding-left  : 1.25rem;
	line-height   : 1.8rem;
}
.fixed_float > label:not(.fixed) {
  position   : absolute;
  top        : -0.9rem;
  left       : 1rem;
  padding    : 5px 5px 0;
  background : #fff;
  font-size  : 0.9em;
  color      : #aaa;
}
.fixed_float > input::placeholder { color: transparent; }

.fixed_float > label.fixed + label {
	left: 2.20rem;
}

.form_flex {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 1%;
}

.full { width: 99%; } 
.half { width: 49%; }
.form_flex input:not([type='checkbox']), .form_flex .input { width: 100%; }


/* ===============
    fixed label 
   ===============*/
.fixed_label {
	position: relative;
}

.fixed_label input { height: 100%; }

label.fixed {
	position        : absolute;
	background      : #f9f9f9;
	width           : 2rem;
	height          : 96%;
	border          : 0;
	display         : inline-flex;
	align-items     : center;
	justify-content : center;
	margin          : 0;
	top             : 1px;
	z-index         : -1;
	font-size       : 1.1em;
}

label.fixed.left {
	border-right: 1px solid #ccc;
	left: 1px;
}

label.fixed.left ~ input {
	padding-left: 2.5rem;
}

label.fixed.right {
	border-left: 1px solid #ccc;
	right: 1px;
}

label.fixed svg.svg_icon {
	width: 20px;
	height: 20px;
}

/* ===============================================
                    LAYOUT
   ===============================================*/
section.container { display: flex; }
aside { flex-grow: 1; }
article{ flex-grow: 9; margin-left: 20px;	}



/* ===============================================
                    TABLES
   ===============================================*/
table {
	width: 100%;
	border-spacing: 0;
	border-collapse: collapse;
	text-align: left;
	margin-bottom: 40px;
}
thead { background: #333; color: #eee; text-align: left; vertical-align: bottom; }
table th, table td { border-bottom: 2px #d1d1d1 solid; padding: 8px 12px }
table td { border-bottom: 1px #d4d4d4 solid }
table.table-striped tbody tr:nth-child(2n+1) { background-color: #f3f3f3 }
table.table-bordered { border: 1px #CCC solid }
table.table-bordered td, table.table-bordered th { border: 1px #CCC solid }

/* ===============================================
                    ALERTS
   ===============================================*/
#alerts {
	position : fixed;
	margin   : 0 auto;
	left     : 0; right: 0;
	top      : 0;
	width    : 40%;
	z-index  : 1000;
}
.alert { 
	color           : #8a6d3b;
	background      : #fcf8e3; border-left:5px solid #8a6d3b;
	padding         : 1em;
	width           : 100%;
	margin          : 10px auto;
	position        : relative;
	opacity         : 1;
	transition      : opacity 1s;
	display         : flex;
	align-content   : center;
	justify-content : flex-start;
}
.alert_text {
	width: 90%;
}
.inline .alert {
	padding: 4px 1em;
	vertical-align: middle;
	margin-left: 20px;
}
.fadeout { opacity: 0; transition-delay: 2s; }
.alert.success { color: #3c763d; background:#dff0d8; border-left:5px solid #3c763d; }
.alert.error { color: #a94442; background:#f2dede; border-left:5px solid #a94442; }
.alert.error pre { white-space: normal; }

.x { 
	cursor: pointer; 
	color: #aaa; 
	position: absolute;
	right: 3%;
	transform: translateY(-10%);
}
.x:after { 
	content: 'x'; 
	font-family: Arial;
	font-size: 20px; 
}

/* ===================================================
                    pagination
   ===================================================*/
.page_link { padding: 0px 8px; }
.pagination button { padding: 5px 6px; margin: 0px 3px; }
.snip_sort { cursor: pointer; }
.snip_sort:hover { background: #f3f3f3; }


/* ============
    SECTIONS 
   ============*/
section { margin: 0.5rem 0; }
	
section.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.fixed_label {
	min-width: 330px;
}

section.actions input {
	width: 100%;
}

/* =============================================
                    GRID
            borrowed from pico.css
   =============================================*/
 :root {
 	--grid-gap: 0.5em;
 }

.grid {
	display: grid;
  grid-column-gap: var(--grid-gap);
  grid-row-gap: var(--grid-gap);;
	grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
}


/* ======================================================
                    drag and drop
   ======================================================*/
.drag_handle {
  cursor: move;
  height: 20px;
  width: 20px;
  justify-self: flex-end;
}


/* ==========================================================
                    SNIP.AUTOCOMPLETE
   ==========================================================*/
 .snip_autocomplete {
   position: absolute;
   background: #fff;
   border: 1px solid #ccc;
   cursor: pointer;
   display: flex;
   flex-direction: column;
   z-index: 1000;
 }

 .results_up {
 	flex-direction: column-reverse;
 }

 .auto_item {
   padding: 5px 8px;
 }
 .auto_item:hover, .auto_item.selected {
   background: #eee;
 }

 
.svg_logo .svg_icon {
	height: 2.25rem;
	width: 6rem;
}


/* ===================================================
                    RESPONSIVE
   ===================================================*/
@media (min-width:1240px) { .container, main { width: 90%; margin:auto; } }
@media (max-width:1240px) { main{ margin: 0px 10px; } }
@media (max-width:900px) { main { width: 100%; margin: 0px 10px; } }
@media (max-width:600px) { main { margin: 0px 10px; }}
@media (max-width:600px) {
	main { margin: 0; padding: 0px 10px; }

	button.close { display:block; }
	.nav { overflow:hidden; }
	.pagename { margin-top:-11px; }
	
	/* NAVIGATION */
	nav .container > ul { display: none; }
	nav .ham { display : block; }
	.nav:active,.nav:focus { height:auto; }
	.nav div:before {
		background:#000; border-bottom:10px double; border-top:3px solid;
		content:''; float:right; height:4px; position:relative;
		right:3px; top:14px; width:20px;
	}
	.nav a { display:block; width:50%; padding:.5em 0; }

	/* FORMS */
	.aligned label { text-align: left; }
	.inline .non_input { display: block; width: 100%; }
	.inline label { display: block; }
	.inline textarea { width: 80% }
	#alerts { width: 75%; }
}
