/* Variables */

:root {
	--font-size-small: 12px;
	--font-size-medium: 14px;
	--font-size-large: 16px;
	--text-color: #666;
	--disabled-color: #666;
	--link-color: black;
	--input-color: black;
	--input-padding: 15px;
	--background-color: white;
	--border: 1px solid #DDD;
	--border-dotted: 1px dotted #DDD;
}

body.admin {
	--text-color: #666;
	--link-color: #DDD;
	--input-color: #DDD;
	--input-padding: 8px;
	--background-color: #050505;
	--border: 1px solid #666;
	--border-dotted: 1px dotted #666;
}

/* Reset */

* {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

/* Base */

html {}

body {
	font-family: helvetica, sans-serif;
	margin: 0;
	color: var(--text-color);
	line-height: 1.1;
	background-color: var(--background-color);
	font-size: var(--font-size-large);
	font-weight: bold;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
	body {
	}
}

main {
	display: block;
	padding-top: 80px;
	padding-bottom: 50px;
}

h1, h2, h3, h4, h5, h6, p,
.h1, .h2, .h3, .h4, .h5, .h6, .p  {
	font-weight: inherit;
	margin: 0 0 1em 0;
	font-size: var(--font-size-medium);
	color: var(--text-color);
}

small,
.small {
	font-size: var(--font-size-small);
	line-height: 1.4;
	color: var(--text-color);
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:focus {
	outline: 1px dotted #888;
}


a.button,
button.button {
	display: block;
	font-size: var(--font-size-large); 
	text-align: center;
	padding: 15px;
	border: var(--border);
	outline: none;
	user-select: none;
}

button[disabled] {
	color: var(--disabled-color);
}

body.admin a.button,
body.admin button.button {
	padding: 8px;
	border-width: 1px;
	border-color: var(--text-color);
}

button.clean {
	padding: 0;
	color: var(--link-color);
	display: inline;
	background-color: transparent;
	appearance: none;
	border-radius: 0;
	border: 0;
	text-align: left;
	width: auto;
	height: auto;
	outline: none;
	user-select: none;
}

ul {
	list-style: none;
	padding-left: 0;
	margin: 0 0 1em 0;
}

/* Tag */

p.tags {
	line-height: 1.5;
}

.tag {
	border-radius: 3px; 
	padding: 0 4px; 
	color: white;	
	background-color: #888;
	white-space: nowrap;
}

.tag:focus {
	outline: 1px dotted #888;
}

.tag-disabled {
	border-radius: 3px; 
	padding: 0 4px;
	border: 1px solid #888;
	color: var(--text-color);
	white-space: nowrap;
}

/* Helpers */

.downcase {
	text-transform: lowercase;
}

.upcase {
	text-transform: uppercase;
}

.strike {
	position: relative;
}

.strike:after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
	height: 1px;
	background-color: black;
}

body.admin .strike:after {
	background-color: white;
}

.text-black {
	color: var(--link-color);
}

.text-gray {
	color: var(--text-color);
}

/* Form */

form {
}

button,
input,
textarea,
select {
	display: block;
	color: var(--input-color);
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
	background-color: transparent;
	margin: 0;
	border: 0;
	padding: var(--input-padding);
	width: 100%;
	border-top: var(--border);
	outline: none;
}

div.form-checkbox {
	position: relative;
	border-top: var(--border);
	padding: var(--input-padding);
}

div.form-checkbox input[type=checkbox] {
	position: absolute;
	right: 7.5px;
	top: 8px;
	display: block;
	width: 1em;
	height: 0.7em;
	padding: 0;
	border: none;
	outline: none;
	cursor: pointer;
}

div.form-checkbox input[type=checkbox]:before {
	display: inline-block;
	content: "";
	width: 0.7em;
	height: 0.7em;
	color: white;
	border: 1px solid white;
	border-radius: 50%;
}

div.form-checkbox input[type=checkbox]:checked:before {
	background-color: white;
}

div.form-checkbox label {
	display: block;
	user-select: none;
	cursor: pointer;
}

button {}
input	{}

textarea {
	padding: calc(var(--input-padding)) var(--input-padding);
	border-top: var(--border);
	resize: none;
	height: 50px;
}

button,
input[type=submit] {
	cursor: pointer;
}

select {}

div.form-selects {
	padding: 15px;
	border-top: var(--border);
}

body.admin div.form-selects {
	padding: var(--input-padding);
}

div.form-selects select,
body.admin div.form-selects select {
	padding: 0;
	display: inline-block;
	width: auto;
	border-top: 0;
}

fieldset {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	transition: opacity .2s;
	border: var(--border);
	border-top: 0;
	-webkit-appearance: none;
}

div.form-label-field {
	border-top: var(--border);
}

div.form-label-field label {
	display: block;
	float: left;
	padding: var(--input-padding);
	width: 150px;
}

div.form-label-field input {
	display: block;
	border-top: none;
	text-align: right;
	width: calc(100% - 150px);
}

fieldset:disabled {
	opacity: 0.5;
}

::-webkit-input-placeholder {
	color: #AAA;
}
:-moz-placeholder {
	color: #AAA;
	opacity: 1;
}
::-moz-placeholder {
	color: #AAA;
	opacity: 1;
}
:-ms-input-placeholder {
	color: #AAA;
}
::-ms-input-placeholder {
	color: #AAA;
}

ul.radio-buttons {
	padding: calc(var(--input-padding) / 2);
	list-style: none;
	margin-bottom: 0;
	border-top: var(--border);
}

ul.radio-buttons li {
	display: inline-block;
}

ul.radio-buttons input[type=radio] {
	display: none;
}

ul.radio-buttons label {
	display: block;
	cursor: pointer;
	background-color: transparent;
	color: #AAA;
	padding: 7.5px;
	user-select: none;
}

ul.radio-buttons input[type=radio]:checked + label {
	color: black;
}

body.admin ul.radio-buttons input[type=radio]:checked + label {
	color: white;
}

ul.checkboxes {
	padding: calc(var(--input-padding) / 2);
	list-style: none;
	margin-bottom: 0;
	border-top: var(--border);
}

ul.checkboxes li {
	display: inline-block;
}

ul.checkboxes input[type=checkbox] {
	display: none;
}

ul.checkboxes label {
	display: block;
	cursor: pointer;
	background-color: transparent;
	color: #AAA;
	padding: 7.5px;
	user-select: none;
}

ul.checkboxes input[type=checkbox]:checked + label {
	color: black;
}

body.admin ul.checkboxes input[type=checkbox]:checked + label {
	color: white;
}

.form-image {
	border-bottom: 0;
	padding: var(--input-padding);
}

input + .form-image {
	border-top: var(--border-dotted);
}

.form-image img {
	display: block;
	width: calc(50% - 7.5px);
	height: auto;
}

.form-image-selectable-images {
	position: relative;
	display: none;
	height: 150px;
}

.form-image-selectable-images.active { display: block; }

.form-image-selectable-images ul {
	position: absolute;
	width: 100%;
	height: 100%;
	white-space: nowrap;
	padding: 7.5px;
	border-top: var(--border-dotted);
	overflow: scroll;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 0;
}

.form-image-selectable-images li {
	position: relative;
	display: none;
	height: 100%;
}

.form-image-selectable-images li.active { display: inline-block; }

.form-image-selectable-images img {
	height: calc(100% - var(--input-padding));
	width: auto;
	margin: calc(var(--input-padding));
	cursor: pointer;
	vertical-align: middle;
	object-fit: contain;
	max-width: 200px;
}

.form-image-selectable-images img.active {
	display: inline-block;
}

.form-image-selectable-images-size {
	position: absolute; 
	bottom: 0px; 
	right: var(--input-padding);
	font-size: var(--font-size-small);
	mix-blend-mode: difference;
}

div.form-errors {
	border-top: var(--border);
	border-bottom: 0;
	padding: calc(var(--input-padding) / 2);
}

div.form-errors p {
	margin: calc(var(--input-padding) / 2);
}

div.form-errors ul {
	list-style: disc;
	padding-left: 25px;
	margin-bottom: 0;
}

/* Tabs */

nav.tabs {
	border: var(--border);
}

@media (max-width: 768px) {
	nav.tabs {
		/*margin-top: 20px;*/
	}
}

nav.tabs ul {
	display: inline-block;
	padding: 7.5px;
	margin-bottom: 0;
}

nav.tabs li {
	padding: 7.5px;
	display: inline-block;
}

nav.tabs li a {
	color: #AAA;
	text-transform: capitalize;
}

nav.tabs li a.active {
	color: black;
}

/* Grid */

.container {
	box-sizing: border-box;
	position: relative;
	margin-left: auto;
	margin-right: auto;
	padding-right: 30px;
	padding-left: 30px;
}

.row {
	box-sizing: border-box;
	margin-right: -15px;
	margin-left: -15px;
}

.row:after {
	clear: both;
}

.row:after, 
.row:before {
	box-sizing: border-box;
	content: " ";
	display: table;
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
	box-sizing: border-box;
	float: left;
	position: relative;
	min-height: 1px;
	padding-right: 15px;
	padding-left: 15px;
}

.col-1 { width: 8.333%; }
.col-2 { width: 16.6667%; }
.col-3 { width: 25%; }
.col-4 { width: 33.333%; }
.col-5 { width: 41.6667%; }
.col-6 { width: 50%; }
.col-7 { width: 58.333%; }
.col-8 { width: 66.666%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333%; }
.col-11 { width: 91.6667%; }
.col-12 { width: 100%; }

.off-1 { margin-left: 8.333%; }
.off-2 { margin-left: 16.6667%; }
.off-3 { margin-left: 25%; }
.off-4 { margin-left: 33.333%; }
.off-5 { margin-left: 41.6667%; }
.off-6 { margin-left: 50%; }
.off-7 { margin-left: 58.333%; }
.off-8 { margin-left: 66.666%; }
.off-9 { margin-left: 75%; }
.off-10 { margin-left: 83.333%; }
.off-11 { margin-left: 91.6667%; }

@media (max-width: 768px) {
	.off-1, .off-2, .off-3, .off-4, .off-5, .off-6, .off-7, .off-8, .off-9, .off-10, .off-11 {
		margin-left: 0;
	}
	
	.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
		width: 100%;
	}
}

/* Header */

header.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	
	background: -moz-linear-gradient(top,  rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
	background: -webkit-linear-gradient(top,  rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
	background: linear-gradient(to bottom,  rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80ffffff', endColorstr='#00ffffff',GradientType=0 );
	background: linear-gradient(to bottom,  rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);

	overflow: hidden;
	height: 50px;
}

header.site-header nav {
	padding: 0 22.5px;
	height: 70px;
	display: flex;
	justify-content: space-between;
	overflow: scroll;
	white-space: nowrap;
}

body.admin header.site-header {
	background: var(--background-color);
}

.site-header-nav-expand-items { display: none; }
.site-header-nav-expand-items.active { display: inline-block; }

.site-header nav a,
.site-header nav button {
	display: inline-block;
	text-decoration: none;
	margin: 18px 7.5px 15px 7.5px;
	user-select: none;
	vertical-align: top;
	pointer-events: auto;
}

.site-header nav button.site-header-nav-expand-items-toggle {
	margin-right: 11px;
}

.site-header-nav-expand-items.active + .site-header-nav-expand-items-toggle {
	display: none;
}

/* Flash */

.flash-message {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 18px 30px 4px 30px;
	background-color: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	transition: color .3s;
}

.flash-message p {
	text-align: center;
}

/* Thing List Large */

.thing-list-large {
	display: flex;
	flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  min-height: calc(100vh - 90px);
  padding: 0 15px;
}

/* Thing Item Large */

.thing-item-large {
	position: relative;
	align-self: center;
	flex-basis: calc(20% - 30px);
	margin: 0 15px 50px 15px;
}

@media (max-width: 768px) {
	.thing-item-large {
		flex-basis: calc(50% - 30px);
	}
}

a.thing-item-large-image {
	display: block;
	position: relative;
	background-color: #EEE;
}

a.thing-item-large-image img {
	position: absolute;
	display: block;
	width: 100%;
	height: auto;
}

small.thing-item-meta {
	display: block;
	padding-top: 6px;
}

/* Thing Item Small */

.thing-item-small {
	display: block;
	position: relative;
	align-self: center;
	flex-basis: calc(10% - 30px);
	margin: 0 15px 50px 15px;
	cursor: pointer;
}

@media (max-width: 768px) {
	.thing-item-small {
		flex-basis: calc(25% - 30px);
	}
}

.thing-item-small-image {
	position: relative;
	background-color: #EEE;
}

.thing-item-small-image img {
	position: absolute;
	display: block;
	width: 100%;
	height: auto;
}

.thing-item-small-click-count {
	color: var(--text-color);
	mix-blend-mode: difference;
	position: absolute;
	top: 5px;
	left: 5px;
}

/* Thing New */

.thing-new {
}

/* Thing Edit */

.thing-edit {
}

/* Thing Form */


/* Thing Show */

.thing-show {
}

.thing-show-image {
	position: relative;
	background-color: #EEE;
	margin-bottom: 19px;
}

.thing-show-image img {
	position: absolute;
	display: block;
	width: 100%;
	height: auto;
}

.thing-show-tags { display: none; }
.thing-show-tags.active { display: block; }
.thing-show-add-tags { display: none; }
.thing-show-add-tags.active { display: block; }

.thing-show-new-tags {
	display: inline-block;
}

/* User Show */

.user-show {
}

.user-show-thing-items {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-content: flex-start;
	align-items: flex-start;
	padding: 0 15px;
}

.user-show-thing-items.loading {}

div.user-show-header {
	margin-bottom: 40px;
}

h1.user-show-nickname {
}

a.user-show-settings-button {
}

/* Login */

form.login {
	margin-top: 5px;
}

/* Settings */

div.invites ul {
	margin: 0;
}

div.invites ul li {
	display: inline-block;
	margin: 0 1em 1em 0;
	font-size: var(--font-size-medium);
}

/* Explore */

div.explore-top-thing-items {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-content: flex-start;
	align-items: flex-start;
	padding: 0 15px;
}

ul.explore-users,
ul.explore-stores,
ul.explore-tags {
	font-size: var(--font-size-medium);
	margin-bottom: 45px;
	-ms-column-count: 5;
	-ms-column-width: 20%;
	-ms-column-gap: 30px;
	-moz-column-count: 5;
	-moz-column-width: 20%;
	-moz-column-gap: 30px;
	-webkit-column-count: 5;
	-webkit-column-width: 20%;
	-webkit-column-gap: 30px;
	column-count: 5;
	column-width: 20%;
	column-gap: 30px;
}

@media (max-width: 768px) {
	ul.explore-users,
	ul.explore-stores,
	ul.explore-tags {
		-ms-column-count: 2;
		-ms-column-width: 50%;
		-moz-column-count: 2;
		-moz-column-width: 50%;
		-webkit-column-count: 2;
		-webkit-column-width: 50%;
		column-count: 2;
		column-width: 50%;
	}
}

ul.explore-users li,
ul.explore-stores li,
ul.explore-tags li {
	margin-bottom: 5px;
}

ul.explore-stores li a {
	word-break: break-all;
}

ul.explore-stores li a:visited {
	color: #666;
}

/* Infinite scroll */
div[data-infinite-scroll]:after {
	content: "";
	width: 100%;
	text-align: center;
	padding: 5vh 0 45vh;
	font-size: var(--font-size-medium);
	color: #666;
}

div[data-infinite-scroll].loading:after {
	content: "Loading";
	animation: pulsate 1s infinite alternate ease-in-out;
}

div[data-infinite-scroll].done:after {
	content: "You have reached the end";
}

@keyframes pulsate {
	0% { color: #222; }
	100% { color: #AAA; }
}

/* Turbolinks */

.turbolinks-progress-bar {
	height: 2px;
	background-color: #DDD;
}

/* Pagination */

.pagination {
	text-align: center;
	margin-bottom: 2em;
	font-size: var(--font-size-medium);
}

.pagination a,
.pagination span.previous_page,
.pagination em.current,
.pagination span.gap {
	font-style: normal;
	display: inline-block;
	cursor: default;
	text-align: center;
}

.pagination a {
	cursor: pointer;
}

.pagination a.previous_page,
.pagination span.previous_page {
	float: left;
}

.pagination a.next_page,
.pagination span.next_page {
	float: right;
}

/* Admin */

body.admin div.flash-message {
	background-color: rgba(0, 0, 0, 0.7);
}

div.admin-list ul {
	font-size: var(--font-size-medium);
	margin-bottom: 45px;
	-ms-column-count: 2;
	-ms-column-width: 20%;
	-ms-column-gap: 30px;
	-moz-column-count: 2;
	-moz-column-width: 20%;
	-moz-column-gap: 30px;
	-webkit-column-count: 2;
	-webkit-column-width: 20%;
	-webkit-column-gap: 30px;
	column-count: 2;
	column-width: 20%;
	column-gap: 30px;
}

div.admin-list li {
	margin-bottom: 5px;
}

/* Messags */

.messages-list {
	height: 300px; 
	overflow-x: scroll; 
	-webkit-overflow-scrolling: touch;
	border: 1px solid #666; 
	border-bottom: 0;
}

/* Fun */

/*@keyframes rotation {
	0% { transform: rotate(0); }
	100% { transform: rotate(360deg); }
}

img {
	animation: rotation 10s infinite linear;
}*/

img.endless-mirror {
	position: absolute;
	top: 5vh;
	width: 90vw;
	height: auto;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
}
