/*** VARIABLES ***/
:root {
	--lightgrey: rgb(220, 220, 220);
}

/*** GENERAL ***/

html {
	overflow-x: hidden;
	font-size: 16px;
}

@media screen and (max-width: 650px) {
	html {
		font-size: 14px;
	}
}

body {
	display: flex;
	flex-direction: column;
	align-items: center;
}

main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	width: 100%;
}

h1 {
	font-size: 2rem;
	margin: 2rem 0;
	text-align: center;
}

h2 {
	font-size: 1.6rem;
	margin: 5px 0;
}

h3 {
	font-size: 1.4rem;
}

h4 {
	font-size: 1.3rem;
}

h5 {
	font-size: 1.2rem;
}

h6 {
	font-size: 1rem;
}

ul li,
ol li {
	margin-left: 30px;
	margin-bottom: 5px;
}

ul li {
	list-style-type: disc;
}

ol li {
	list-style-type: decimal;
}

b {
	font-weight: bold;
}

i {
	font-style: italic;
}

a,
u {
	text-decoration: underline;
}

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

.button {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border-radius: 5px;
	border: thin solid black;
	background-color: white;
	padding: 5px 10px;
	width: max-content;
	min-width: 120px;
}

@media (hover: hover) {
	.button:hover {
		background-color: var(--lightgrey);
	}
}

.overflow_x_hidden {
	overflow-x: hidden;
}

.link {
	cursor: pointer;
	text-decoration: underline;
	text-align: center;
	display: flex;
	justify-content: center;
	width: 100%;
}

.hidden {
	visibility: hidden;
	width: 0;
	height: 0;
}

/*** ADMIN ***/

/* ADMIN : index */

#add_user {
	font-size: 4rem;
	align-self: flex-end;
	text-decoration: none;
}

.user_table_wrapper {
	overflow-x: scroll;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 15px;
	max-width: 650px;
}

@media screen and (max-width: 650px) {
	.user_table_wrapper {
		justify-content: unset;
	}

	.user_table_wrapper table {
		margin: 0 15px;
	}
}

.user_table_wrapper table {
	text-align: center;
}

.user_table_wrapper table th {
	font-weight: bold;
}

.user_table_wrapper table td,
.user_table_wrapper table tr,
.user_table_wrapper table th {
	padding: 10px 5px;
}

@media (hover: hover) {
	.user_table_wrapper table tbody tr:hover {
		cursor: pointer;
		background-color: var(--lightgrey);
	}
}

/* ADMIN : add_user/edit_user */

.user_form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.user_form label {
	display: flex;
	justify-content: space-between;
	gap: 15px;
}

.user_form p {
	display: flex;
	justify-content: space-between;
}

.user_form .button {
	align-self: center;
}

/*** BLOG_EDITOR ***/

/* BLOG_EDITOR : index */

.blog_administration {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.blog_administration_content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 650px;
	width: 100%;
	gap: 15px;
	overflow-x: hidden;
}

#add_article {
	font-size: 4rem;
	align-self: flex-end;
	text-decoration: none;
}

.article_item {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 5px;
	margin: 5px 0;
	padding: 15px;

	border-radius: 10px;
	cursor: pointer;
}

#article_options {
	position: absolute;
	top: 0;
	right: -250px;
	display: none;
	align-items: center;
	justify-content: flex-end;
	width: 220px;
	gap: 15px;
	align-self: flex-end;
	background-color: rgba(190, 189, 189, 0.494);
	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;
	animation: article_options 0.1s forwards linear;
}

@keyframes article_options {
	0% {
		right: -250px;
	}
	100% {
		right: 0;
	}
}

#article_options_delete {
	margin: 0 5px 0 15px;
}

#article_options svg {
	cursor: pointer;
}

@media (hover: hover) {
	.article_item:hover {
		background-color: var(--lightgrey);
	}
}

.article_item_header {
	display: flex;
	justify-content: space-between;
	gap: 15px;
}

.article_item_header div {
	display: flex;
	gap: 5px;
}

.article_item_data {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 15px;
}

.article_item_data_div {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.article_item_data h2 {
	margin-bottom: 5px;
	font-size: 1.2rem;
}

.cover_image_thumbnail {
	width: 60px;
	height: 60px;
	min-width: 60px;
	min-height: 60px;
	border-radius: 5px;
	background-repeat: no-repeat;
	background-size: cover;
	align-self: flex-start;
}

.article_item_details_container {
	display: flex;
	flex-flow: wrap;
	gap: 15px;
}

.article_item_details {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* BLOG_EDITOR : article_editor */

#html_article_editor {
	overscroll-behavior: none; /* Important to avoid pull-to-refresh on touch devices */
}

.blog_editor {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.blog_constructor {
	display: flex;
	flex-direction: column;
	max-width: 650px;
	width: 100%;
	gap: 15px;
	background-color: white;
	padding: 40px;
}

@media screen and (max-width: 650px) {
	.blog_constructor {
		padding: 5px;
	}
}

.blog_upper_toolbar {
	width: 100%;
	min-height: 40px;
	display: flex;
	flex-flow: row wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 15px;
	margin-right: 15px;
}

.blog_upper_toolbar button {
	cursor: pointer;
}

.blog_upper_toolbar #help {
	cursor: pointer;
}

.relative {
	position: relative;
}

.blog_constructor #cover_image_container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	cursor: pointer;
}

.blog_constructor #cover_image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.blog_constructor #cover_image_input {
	display: none;
}

#cover_image_rotation_button {
	cursor: pointer;
	position: absolute;
	display: none;
	width: 40px;
	height: 40px;
	top: 15px;
	right: 15px;
	background-color: white;
	border-radius: 5px;
	z-index: 6;
}

#cover_image_preview_container {
	position: absolute;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 15px;
	height: 100%;
	width: 100%;
	background-color: var(--lightgrey);
	border-radius: 5px;
	z-index: 5;
}

#cover_image_preview_container img {
	width: 50%;
	height: 50%;
	object-fit: contain;
	border-radius: 5px;
}

#cover_image_preview_container div {
	display: flex;
	flex-direction: row;
	gap: 15px;
	position: absolute;
	bottom: 0;
	margin-bottom: 15px;
}

.blog_constructor #cover_image_caption {
	display: none;
	border: none;
	border-bottom: thin solid var(--lightgrey);
	margin-top: -15px;
}

.blog_constructor #title_h1 {
	font-size: 2rem;
	border: none;
}

#save_options_wrapper {
	position: absolute;
	top: 0;
	z-index: 10;
	width: 100%;
	height: 100%;
	background-color: var(--lightgrey);
	display: none;
	align-items: center;
	justify-content: center;
}

#save_options {
	display: flex;
	flex-direction: column;
	gap: 15px;
	background-color: white;
	padding: 15px;
	border-radius: 5px;
	width: 280px;
}

#save_options label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

#save_options button {
	cursor: pointer;
	align-self: center;
}

#save_options_label_homepage {
	visibility: hidden;
	flex-direction: column;
}

#save_options .switch_box {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: 30px;
	background: linear-gradient(white 48%, var(--lightgrey) 48%, var(--lightgrey) 52%, white 52%);
	border-radius: 3em;
	position: relative;
	cursor: pointer;
	outline: none;
	-webkit-transition: all 0.1s ease-in-out;
	transition: all 0.1s ease-in-out;
	user-select: none;
	-webkit-user-select: none;
}

@media (hover: hover) {
	#save_options .switch_box:hover::after {
		background: var(--lightgrey);
	}
}

#save_options .switch_box::after {
	position: absolute;
	content: "";
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: black;
	-webkit-box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.3);
	box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.3);
	top: 0;
	bottom: 0;
	left: 2px;
	margin: auto;
	-webkit-transition: all 0.1s ease-in-out;
	transition: all 0.1s ease-in-out;
}

#save_options .switch_box:checked::after {
	left: calc(100% - 27px);
}

.editorjs_image_rotation_preview {
	position: absolute;
	bottom: 0;
	top: 0;
	right: 0;
	left: 0;
	margin: auto;
	display: flex;
	gap: 15px;
	justify-content: center;
	align-items: center;
	width: 150px;
	height: 75px;
	background-color: white;
	border-radius: 5px;
}

/* BLOG_EDITOR : article_editor EitorJS specific */

.ce-toolbar__actions {
	background-color: white;
	border-radius: 7px;
}

.ce-block__content {
	border-bottom: thin solid var(--lightgrey);
}

#editorjs ul li {
	list-style-type: disc;
}

#editorjs ol li {
	list-style-type: decimal;
}

#editorjs h2 {
	font-size: 1.6rem;
}

#editorjs h3 {
	font-size: 1.4rem;
}

#editorjs h4 {
	font-size: 1.3rem;
}

#editorjs h5 {
	font-size: 1.2rem;
}

#editorjs h6 {
	font-size: 1rem;
}

.ce-block__content div {
	background-color: white;
}

.ce-block__content img {
	max-width: 100%;
}

.cdxcarousel-block {
	width: 200px !important;
}

.cdxcarousel-block .column__setting__wrapper {
	display: none;
}

.cdxcarousel-leftBtn,
.cdxcarousel-rightBtn,
.cdxcarousel-removeBtn,
.cdxcarousel-rotateBtn {
	padding: 0 !important;
}

.cdxcarousel-leftBtn {
	right: unset;
	left: 10px;
}

.cdxcarousel-rightBtn {
	right: unset;
	left: 50px;
}

.cdxcarousel-leftBtn svg,
.cdxcarousel-rightBtn svg {
	width: 24px;
}

.cdxcarousel-removeBtn svg,
.cdxcarousel-rotateBtn svg {
	border: none;
}

.embed-tool__caption {
	display: none;
}

/* BLOG_EDITOR : Loader */

.loader {
	display: none;
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.9);
	z-index: 10;
}

.loader div {
	display: block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: auto;
	width: 64px;
	height: 64px;
	border: 8px solid black;
	border-radius: 50%;
	animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
	border-color: black transparent transparent transparent;
}

.loader div:nth-child(1) {
	animation-delay: -0.45s;
}

.loader div:nth-child(2) {
	animation-delay: -0.3s;
}

.loader div:nth-child(3) {
	animation-delay: -0.15s;
}

@keyframes loader {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/*** CONNECTION ***/

.connection_main {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
	border-radius: 5px;
	background-color: white;
	width: unset;
}

.connection_main .button {
	margin: 15px 0;
}

.connection_main ::placeholder {
	text-align: center;
}

#reset_password_form {
	display: none;
}

.connection_form_wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100vw;
	height: 100vh;
	margin: 0;
}

.connection_form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.connection_form label {
	display: flex;
	flex-flow: wrap;
	justify-content: space-between;
	gap: 15px;
}

/*** BLOG ***/

/* BLOG : index */

#articles {
	display: flex;
	flex-direction: column;
	padding: 15px;
	gap: 30px;
	width: min(650px, 100%);
}

#articles .article_item {
	cursor: pointer;
	display: flex;
	flex-direction: column;
	padding: 15px;
	border-radius: 5px;
	background-color: white;
}

@media (hover: hover) {
	#articles .article_item:hover {
		background-color: var(--lightgrey);
	}
}

.article_content {
	display: flex;
	gap: 15px;
	margin: 15px 0 10px 0;
}

.article_content_preview {
	max-height: 150px;
	overflow: hidden;
	text-align: justify;
}

#articles .cover_image_thumbnail {
	width: clamp(80px, 30vw, 150px);
	height: clamp(80px, 30vw, 150px);
	min-width: clamp(80px, 30vw, 150px);
	min-height: clamp(80px, 30vw, 150px);
	border-radius: 5px;
	background-repeat: no-repeat;
	background-size: cover;
	align-self: flex-start;
}

.article_publication_details {
	font-size: 0.8rem;
}

.read_more {
	cursor: pointer;
	font-size: 0.9rem;
	text-decoration: underline;
	align-self: flex-end;
}

@media screen and (max-width: 1024px) {
	.article_content_preview {
		max-height: 80px;
	}
}

/* BLOG : article */

#article_container {
	display: flex;
	flex-direction: column;
	width: 660px;
	background-color: white;
	padding: 0 30px;
}

@media screen and (max-width: 680px) {
	#article_container {
		width: 100vw;
		padding: 0 5px;
	}
}

#article_title {
	text-align: left;
	margin-bottom: 5px;
}

#article_container .article_publication_details {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 15px;
}

#article_container #cover_image_container,
#article_container .article_image_wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

#article_container #cover_image,
#article_container .article_image_wrapper img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 5px;
}

#article_container #cover_image_caption {
	margin-top: 5px;
}

#article_container .image_caption {
	margin-top: 5px;
	font-style: italic;
	font-size: 0.9rem;
}

#article_container #article_content {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin: 15px 0;
}

#article_container .paragraph {
	text-align: justify;
}

#article_container .delimiter {
	text-align: center;
	font-size: 1.8rem;
	margin: 7.5px 0;
	width: max(50%, 125px);
	border-top: thin solid var(--lightgrey);
	align-self: center;
}

#article_container .attachement {
	width: 100%;
	border-radius: 5px;
	border: thin solid var(--lightgrey);
	display: flex;
	align-items: center;
	overflow: scroll;
}

#article_container .attachement img {
	height: 30px;
	padding: 5px;
}

#article_container .table_wrapper {
	width: 100%;
	overflow-x: scroll;
}

#article_container .table_wrapper table tr:first-of-type {
	font-weight: bold;
	text-align: center;
}

#article_container td {
	padding: 5px;
	border: thin solid var(--lightgrey);
}

#article_container .carousel_container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

#article_container .carousel_container .image_caption {
	min-height: 15px;
	margin-bottom: 5px;
}

#article_container .carousel_main_image_container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

#article_container .carousel_main_image_container .article_image_wrapper {
	width: 100%;
	height: 333px;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

#article_container .carousel_gallery {
	display: flex;
	gap: 15px;
	width: 100%;
	height: clamp(60px, 30vw, 100px);
	overflow: scroll;
}

#article_container .carousel_gallery .article_image_wrapper {
	cursor: pointer;
	width: clamp(60px, 30vw, 100px);
	height: clamp(60px, 30vw, 100px);
	min-width: clamp(60px, 30vw, 100px);
	min-height: clamp(60px, 30vw, 100px);
	border-radius: 5px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

#article_container .embed {
	width: 100%;
	aspect-ratio: 16 / 9;
}

@media screen and (max-width: 680px) {
	#article_container .carousel_main_image_container .article_image_wrapper {
		height: 55vw;
	}
}

/* BLOG : article comments */

#comments_section {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
	margin: 30px 0;
	padding: 15px 0;
	border-top: thin double var(--lightgrey);
}

#comments_container {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
}

#comment_editor {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 100%;
}

#comment_editor_content {
	width: 100%;
	border: thin solid var(--lightgrey);
	border-radius: 5px;
	min-height: 50px;
	padding: 5px;
}

#comment_editor button {
	cursor: pointer;
	padding: 5px 10px;
	border: thin solid var(--lightgrey);
	border-radius: 5px;
	align-self: flex-end;
}

.comment_item {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 100%;
	border: thin solid var(--lightgrey);
	border-radius: 5px;
	padding: 5px;
}

@media screen and (max-width: 680px) {
	.comment_item {
		padding: 1%;
	}
}

.comment_item img {
	cursor: pointer;
	width: 20px;
	align-self: flex-end;
}

.comment_item_content {
	padding-top: 5px;
	padding-left: 5px;
	padding-bottom: 5px;
	white-space: pre-wrap;
}

.comment_item_publication_details {
	display: flex;
	flex-wrap: wrap;
	font-size: 0.8rem;
	gap: 5px;
}

.comment_item * {
	overflow-wrap: break-word;
	text-align: justify;
}

.comment_options_wrapper {
	display: flex;
	gap: 15px;
	justify-content: flex-end;
}

.comment_options_wrapper img {
	cursor: pointer;
	border-radius: 5px;
	background-color: white;
	width: 20px;
}

#reply_to_details {
	cursor: pointer;
	display: flex;
	font-size: 0.8rem;
	gap: 5px;
}

#reply_to_details_username::first-letter {
	color: red;
}

.reply_to_comment_details {
	font-size: 0.8rem;
	text-decoration: underline;
	color: blue;
}

@media (hover: hover) {
	#reply_to_details:hover {
		color: red;
	}
}

/*** CLASSIFIEDS_EDITOR ***/

#html_classified_editor {
	overscroll-behavior: none; /* Important to avoid pull-to-refresh on touch devices */
}

#classified_editor {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 650px;
	width: 100%;
	gap: 15px;
	background-color: white;
	padding: 40px;
}

#classified_editor h1 {
	align-self: center;
}

#classified_editor #title_h1 {
	font-size: 2rem;
	font-weight: bold;
	border: none;
}

#classified_editor .classified_gallery {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	width: 100%;
}

#classified_editor .classified_image_container {
	position: relative;
}

#classified_editor .classified_gallery .classified_image_wrapper {
	cursor: pointer;
	width: 180px;
	height: 180px;
	min-width: 180px;
	min-height: 180px;
	border-radius: 5px;
	background-image: url("../images/icon_add_image.svg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.classified_image_rotation_button {
	cursor: pointer;
	position: absolute;
	display: none;
	width: 40px;
	height: 40px;
	top: 15px;
	right: 15px;
	background-color: white;
	border-radius: 5px;
	z-index: 6;
}

.classified_image_delete_button {
	cursor: pointer;
	position: absolute;
	display: none;
	width: 40px;
	height: 40px;
	top: 15px;
	left: 15px;
	background-color: white;
	border-radius: 5px;
	z-index: 6;
}

.classified_image_input {
	display: none;
}

#classified_content {
	resize: none;
	width: 100%;
	min-height: 150px;
}

#classified_editor .button {
	align-self: flex-end;
}

@media screen and (max-width: 680px) {
	#classified_editor {
		padding: 10px;
	}

	#classified_editor .classified_gallery {
		flex-direction: column;
	}

	#classified_editor .button {
		align-self: center;
	}
}

/*** CLASSIFIEDS ***/

#classifieds {
	display: flex;
	flex-direction: column;
	width: 660px;
	background-color: white;
	padding: 0 30px;
	padding-bottom: 30px;
	gap: 30px;
}

#add_classified {
	font-size: 4rem;
	align-self: flex-end;
	text-decoration: none;
}

.classifieds_publication_details {
	font-size: 0.8rem;
}

.classifieds_item {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 15px;
	padding: 15px;
	border-radius: 5px;
	border: thin solid black;
}

.classifieds_item h2 {
	margin: 0;
}

#classifieds .carousel_container {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 5px;
	gap: 5px;
}

#classifieds .carousel_main_image_container {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
}

#classifieds .carousel_main_image_container .article_image_wrapper {
	width: 100%;
	height: 333px;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

#classifieds .carousel_gallery {
	display: flex;
	gap: 15px;
	width: 100%;
	height: clamp(60px, 30vw, 100px);
	overflow: scroll;
}

#classifieds .carousel_gallery .article_image_wrapper {
	cursor: pointer;
	width: clamp(60px, 30vw, 100px);
	height: clamp(60px, 30vw, 100px);
	min-width: clamp(60px, 30vw, 100px);
	min-height: clamp(60px, 30vw, 100px);
	border-radius: 5px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.classifieds_options_wrapper {
	display: flex;
	gap: 15px;
	justify-content: flex-end;
}

.classifieds_options_wrapper img {
	cursor: pointer;
	border-radius: 5px;
	background-color: white;
	width: 30px;
}

@media screen and (max-width: 680px) {
	#classifieds .carousel_main_image_container .article_image_wrapper {
		height: 55vw;
	}

	#classifieds {
		width: 100vw;
		padding-left: 0;
		padding-right: 0;
	}

	.classifieds_item {
		border-right: none;
		border-left: none;
		border-radius: unset;
	}
}
