/* =======================================================
                    snip_warehouse
   =======================================================*/
/* 
	Modules can be moved in and out of the warehouse to recycle DOM elements.
	Each element should handle it's own visibility
*/
/* =========
    MODAL 
 	=========*/
#modal {
	resize: both;
	overflow: auto;
	position: fixed;
	top: 50%;
	left: 50%;
	width: 50%;
	min-width: 320px;
	max-width: 650px;
	z-index: 2000;
	visibility: hidden;
	transform: translateX(-50%) translateY(-50%);
}

#modal.modal_show { visibility: visible; }

.modal_overlay {
	position: fixed;
	width: 100%;
	height: 100%;
	visibility: hidden;
	top: 0;
	left: 0;
	z-index: 1000;
	opacity: 0;
	background: rgba(33,33,33,0.8);
	transition: all 0.3s;
}
.modal_show ~ .modal_overlay { opacity: 1; visibility: visible; }

/* Content styles */
.modal_container {
	color: #333;
	background: #fff;
	position: relative;
	text-align: center;
	transform: scale(0.7);
	opacity: 0;
	transition: all 0.3s;
}

.modal_show .modal_container {
	transform: scale(1);
	opacity: 1;
}

.modal_cancel {
  font-size: 18px;
  margin-right: 10px;
  opacity: 0.8;
  cursor: pointer;
}

.modal_container .modal_header {
	padding: 0.5em;
	font-size: 1.5em;
	font-weight: 300;
	background: #111;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 2;
}
.modal_title {
	flex: 2;
}


p.modal_content { padding: 0.25em 0; }

.modal_controls { padding: 1em}
.modal_container button {
	display: inline-block;
	font-size: 0.8em;
	margin-right: 8px;
}


/* ================================================
                    MOVABLE
   ================================================*/
#movable {
	border: 2px solid #888;
	min-width: 500px;
	min-height: 400px;
	width: 800px;
	height: 500px;
	position: absolute;
	top: 40%;
	left: 40%;
	resize: both;
	overflow-x: auto;
	overflow-y: hidden;
	z-index: 10000;
	background: #fff;
}

.hotspots {
	position: absolute;
	width: 10px;
	height: 10px;
	cursor: pointer;
}

.title_bar {
	width: 100%;
	height: 2em;
	background: #888;
	cursor: move;
	position: relative;
}

.title_bar .x {
	color: #eee;
}


/* ====================================================
                    SNIP.PANELS
   ====================================================*/
.window {
	width: 100%;
	padding: 10px;
	font-size: 0.85em;
	min-height: 400px;
}

.handle_ew {
  grid-area: handle_ew;
  background: #ddd;
  cursor: ew-resize;
}

.handle_ns {
  grid-area: handle_ns;
  background: #ddd;
  cursor: ns-resize;
}

/*
.panels { 
	width: 100%;
	position: relative;
	height: 80%;
	min-height: 300px;
	border: 1px solid #eee;
}

.panel_row {
	position: absolute;
	width: 100%;
	border: 0px solid #ddd;
	overflow: hidden;
}

.panel_col {
	position: absolute;
	height: 100%;
	border: 0px solid #ddd;
	overflow: hidden;
	min-height: 500px;
}

.panel_row:first-child { }

.panel_resize_ew {
	width: 5px;
	background: #ddd;
	cursor: ew-resize;
	position: absolute;
	z-index: 1000;
	height: 100%;
	top: 0;
}

.panel_resize_ns {
	height: 5px;
	background: #ddd;
	cursor: ns-resize;
	position: absolute;
	z-index: 1000;
	width: 100%;
	left: 0;
}
*/



/* ==================================================
                    SNIP.GRID
   ==================================================*/
table.sgrid .editable  {
  -webkit-user-select: none;
  cursor: text;
}

table.sgrid, table.sgrid tr {
	border-collapse: separate;
}

table.sgrid thead, table.sgrid th {
	background: #EDEDED;
	color: #333;
	border-bottom-width: 1px;
}

table.sgrid th:last-child {
	border-right: 1px solid #ddd;
}

table.sgrid th, table.sgrid td {
	max-width: 200px;
	width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.sgrid td {
	border-top: 1px solid #f3f3f3;
	border-bottom: 1px solid #f3f3f3;
}	

table.sgrid th:hover, table.sgrid th:hover .grid_resizer {
	background: #F3F3F3;
	cursor: pointer;
}

table.sgrid tr:nth-child(2n) {
	background: #FDFDFD;
}


table.sgrid tr.selected td {
	background: #FEFFEF;
}


table.sgrid tr.file td {
	cursor: default;
}

table.sgrid tr.file:hover td {
	background: #F7F9FF;
}

table.sgrid .checkbox {
	width: 35px;
	text-overflow: initial;
}

.grid_resizer {
	position: absolute;
	top: 0;
	right: 0;
	background: #EDEDED;
	border-right: 3px solid #D1D1D1;
	width: 6px;
	height: 100%;
	cursor: col-resize !important;
}

table .grid_resizer {
	border-width: 1px;
}

[class^="icon-"], [class*=" icon-"] {
	padding-right: 0.5em;
}

.icon-folder, .icon-open-folder { color: #76D1F8; }

/* ========================================================
                    edtibox/infobox
   ========================================================*/

#editbox, #infobox, #snipbox {
	max-width: 50%;
	overflow: hidden;
	position: absolute;
	z-index: 1000;
	top: 0;
	left: 0;
	background: #fff;
	font-size: 1.1em;
	margin: 0;
	border: 1px solid #C8D5FF;
}

#editbox textarea, #editbox input, #editbox .editbox_ce {
	height: 100%;
	width: 100%;
	padding: 5px;
}

#editbox .editbox_ce:empty:before { content:" "; }

#infobox {
	color: #eee;
	border: 1px solid #CCF2FF;
	background: #565656;
	padding: 10px;
	font-size: 0.9em;
}

input.snip_datalist, input.snip_datalist:focus {
	border: 0 !important;
	outline: none;
}

.modified { background: #fee; }

/* ==================================================
                    SNIP.AUTH
   ==================================================*/
#login_box {
	width: 380px; 
	margin: 60px auto; 
	border: 1px solid #eee; 
	padding: 20px 30px;
	text-align: center;
}
#login_box input[type=text], #login_box input[type=password], #login_box button {
	width: 100%;
}	
#login_box legend {
		margin: 20px auto; font-weight: bold; font-size: 1.2em;
}



/* ===================================================
                    progress
   ===================================================*/
.progress {
  display: -ms-flexbox;
  display: flex;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1rem;
  text-align: center;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  position: relative;
  background: #ddd;
}

.progress span {
	position: absolute;
  display: block;
  width: 100%;
}

.progress-bar {
  height: 1rem;
  line-height: 1rem;
  color: #fff;
  background-color: #007bff;
  transition: width 0.6s ease;
}

@-webkit-keyframes progress-bar-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

@keyframes progress-bar-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  -webkit-animation: progress-bar-stripes 1s linear infinite;
  animation: progress-bar-stripes 1s linear infinite;
}

.bg-success { background-color: #28a745 !important; }
a.bg-success:focus, a.bg-success:hover { background-color: #1e7e34 !important; }
.bg-light-success { background-color: #7BC68C !important; }
.bg-info { background-color: #17a2b8 !important; }
a.bg-info:focus, a.bg-info:hover { background-color: #117a8b !important; }
.bg-warning { background-color: #ffc107 !important; }
a.bg-warning:focus, a.bg-warning:hover { background-color: #d39e00 !important; }
.bg-danger { background-color: #dc3545 !important; }
a.bg-danger:focus, a.bg-danger:hover { background-color: #bd2130 !important; }


/* ===================
    Progress circle 
   ===================*/

.progress-ring circle {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  fill : rgb(0,0,0,.05);
  stroke: red;
}

.progress_circle {
  position: relative;
  margin-top: 20px; 
  box-sizing: content-box;
  border: 1px solid #ccc;
}

.progress_circle svg {
  box-sizing: content-box;
}

.progress_circle .percent {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  font-weight: bold;
}




 /* ==============================================
                     SNIP CALENDAR
    ==============================================*/
/* =============================================
    Expects 6 cal_week rows and 7 cal_day
    Automatically resizes using those maths 
   =============================================*/
.snip_cal {
  width: 100%;
  height: 100%;
}

.cal_wrap {
  width: 100%;
  height: 100%;
}
:root {
  --cal_header_height: 32px;
  --cal_controls_height: 52px;
  --cal_input_height: 32px;
}

.cal_controls {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px 0;
  height: var(--cal_controls_height);
}

.cal_week_header {
  height: var(--cal_header_height);
  display: flex;
}

.cal_week {
  min-height: 20px;
  height: calc((100% - var(--cal_header_height) - var(--cal_controls_height)) / 5);
  display: flex;
}

.cal_six .cal_week {
  height: calc((100% - var(--cal_header_height) - var(--cal_controls_height)) / 6);
}

.cal_six.show_input .cal_week {
  height: calc((100% - var(--cal_header_height) - var(--cal_controls_height) - var(--cal_input_height)) / 6);
}
.cal_six.show_input .cal_day_num { padding: 2px; }

.cal_day, .cal_day_header {
  min-width: 25px;
  width: calc(100/7 * 100%);
  border: 1px solid #ddd;
  border-width: 1px 0px 0px 1px;
  position: relative;
}

.cal_day_header:first-child { border-left: 0; }

.cal_day {
  height: 100%;
  display: flex;
  flex-direction: column;
  user-select: none;
  overflow-y: hidden;
}

.cal_day_header {
  display: flex;
  background: #333;
  color: #eee;
  align-items: center;
  font-size: 0.8em;
}

.cal_day_header_wrap {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  width: 100%;
  height: 1.5em;
  padding: 0px 5px;
  justify-content: center;
  align-items: center;
}

.cal_day_num {
  width: 100%;
  padding: 5px;
  text-align: center;
  font-size: 0.9em;
  pointer-events: none;
}

.cal_day_body { width: 100%; }

:root {
	--cal_blue_h: 217;
	--cal_blue_s: 89%;
	--cal_blue_l: 61%;
  --cal_blue : hsl(var(--cal_blue_h), var(--cal_blue_s), var(--cal_blue_l));
  --cal_yellow : #fff;
  --cal_green : #fff;
  --cal_red : #fff;
  --cal_orange : #fff;
  --cal_teal : #fff;
  --cal_purple: #fff;
}

.snip_cal_event {
  font-size: 0.8em;
  font-weight: 500;
  cursor: pointer;
  width: 95%;
  margin: 1px 0;
  padding: 1px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
}

.snip_cal .dragover { background: #EFF6FF; }
.dragging .snip_cal_event { pointer-events: none; }

.all_day {
  background: var(--cal_blue);
  border: 1px solid hsl(var(--cal_blue_h), var(--cal_blue_s), calc(var(--cal_blue_l) - 10%));
  color: #fff;
}

.time { transition: background 0.5s; }
.time:hover { background: #ccc; }

.event_time { font-weight: normal; }
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cal_blue);
  border-radius: 50%;      
}

.cal_day_num span {
	display: inline-block;
	width: 24px;
	height: 24px;
	line-height: 24px;
	text-align: center;
}

.cal_today .cal_day_num span { 
  font-weight: bold;
  background: #5496EC;
  color: #fff;
  border-radius: 40px;
}

.small_cal .cal_day { justify-content: center;}
.small_cal .cal_day_num { }
.small_cal .cal_day_body { display: none; }
.small_cal .cal_day_num span {
	display: inline-block;
	width: 20px;
	height: 20px;
	line-height: 20px;
}

.small_cal .snip_cal_event {
	position: absolute;
	bottom: 3px;
	left: 5px;
	padding: 0;
	margin: 0;
}

.small_cal .event_time, .small_cal .event_title {
  display: none;
}

.small_cal .dot {
	width: 4px;
  height: 4px;
}

.cal_day_names:nth-child(1) { border-left-width: 0px; }
.cal_day:nth-child(7) { border-right-width: 1px; }
.cal_week:nth-child(7) .cal_day {
  border-bottom-width: 1px; 
}

.cal_week:nth-child(8) { display: none; }

.cal_input { display: flex; justify-content: center; align-items: center; margin-top: 5px; }
.cal_input input { width: 100% !important; }
.cal_six .cal_week:nth-child(8) { display: flex; }
.cal_six .cal_week:nth-child(7) .cal_day { border-bottom-width: 0px; }
.cal_six .cal_week:nth-child(8) .cal_day { border-bottom-width: 1px; }
.cal_day:hover { background: #f1f1f1; }

.cal_selected { background: #CCEFFF; }
.cal_selected.cal_day:hover { background: #CEE0E8; }

.not_current_month { color: #ccc; }

.cal_month_wrap, .cal_year_wrap { position: relative; }
.cal_month, .cal_year { z-index: 1; }

.cal_month_select, .cal_year_select {
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.past .snip_cal_event {
  filter: opacity(50%);
}




/
* =============================================
                    TAGS
   =============================================*/
.tags_container { 
	display: flex;
}

.tag { 
	padding: 5px; 
	background: #ddd;
	border-radius: 10px; 
	display: inline-block; 
	position: relative;
	margin: 5px 5px;
}
.tag span { padding: 5px;  }

.tag .remove_tag { 
	border-left: 1px solid #eee; 
	margin-left: 6px; 
	padding: 8px; color: #999;
	vertical-align: top;
}


/* ===============================================
                    SWITCH
   ===============================================*/
.switch {
  width: 30px;
  height: 17px;
}
   
.switch_label {
  display: inline-block;
  height: 100%;
  position: relative;
  width: 100%;
}

.switch_label input {
  display:none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.slider:before {
  background-color: #fff;
        content: "";
  height: 76%;
  bottom: 12%;
  left: 7%;
  position: absolute;
  transition: .4s;
  width: 43%;
}

input:checked + .slider {
  background-color: var(--green);
}

input:checked + .slider:before {
  transform: translateX(95%);
}

.slider.round {
  border-radius: 100px;
}

.slider.round:before {
  border-radius: 50%;
}

/* ==========================================================
                    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, .no_results {
   padding: 5px 8px;
 }
 .auto_item:hover, .auto_item.selected, .no_results:hover, .no_results.selected {
   background: #eee;
 }

