:root {
  --primary-color: grey;
  --primary-text-color: #000;
  --secondary-text-color: #fff;
  --radius: 5px;
  --logo-width: 250px;
  --logo-height: 35px;
  --bg-color: #cccccc;
  --manuscrit-category-bg-color: #cccccc;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
ul,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: 30px;
  line-height: 30px;
}
h2 {
  font-size: 24px;
  line-height: 30px;
}
header,
h3 {
  font-size: 20px;
  font-weight: 500;
}

.container {
  padding-right: 0.58824rem;
  padding-left: 0.58824rem;
}

.tablet,
.desktop {
  display: none !important;
}

main {
  flex-grow: 1;
  margin-bottom: 10px;
}

.title {
  font-size: 25px;
  margin-bottom: 5px;
  line-height: 1.5rem;
}

.textarea-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.border-left {
  margin-left: 5px;
  padding-left: 5px;
  border-left: 2px solid var(--primary-color);
}

textarea {
  resize: vertical;
}

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

.i {
  font-style: italic;
  color: darkslategray;
}

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

.fs-medium {
  font-size: 18px;
}

.bold {
  font-weight: bold;
}

.mb-m {
  margin-bottom: 10px;
}

.mb-l {
  margin-bottom: 20px;
}

.mt-m {
  margin-top: 10px;
}

.mt-l {
  margin-top: 20px;
}

.img-icon {
  height: auto;
  width: 30px;
}

.groupname {
  font-weight: bold;
  text-decoration: underline;
  margin: 20px 0 10px;
}

.obfuscate {
  unicode-bidi: bidi-override;
  direction: rtl;
}

/****************/
/**** FONTS ****/
/**************/

.button,
footer {
  font-family: Arial, Helvetica, sans-serif;
}

/*.homepage article {
  font-family: "Times New Roman", Times, serif;
}*/

/****************/
/**** HEADER ****/
/****************/
header {
  min-height: 60px;
  display: flex;
}

.brand {
  margin-top: 5px;
  width: 100%;
  align-content: flex-start;
  margin-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
}

header nav {
  display: flex;
  align-self: flex-end;
}

header nav .button {
  margin-left: 5px;
  display: flex;
  justify-content: center;
}

.logo {
  width: var(--logo-width);
  height: var(--logo-height);
}

.page-nav {
  font-size: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-nav a {
  text-decoration: none;
}

/****************/
/**** FOOTER ****/
/****************/

footer {
  margin-top: auto;
  background-color: var(--primary-color);
  padding: 10px 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
}

footer .container a {
  color: var(--secondary-text-color);
  margin: 2px 0;
}

/***************/
/* COMPONENTS */
/***************/

/* Buttons */
button {
  border: none;
  font-size: inherit;
  cursor: pointer;
  background: none;
}
.button {
  text-decoration: none;
  border-radius: var(--radius);
  background-color: var(--primary-color);
  padding: 5px 10px;
  color: var(--secondary-text-color);
}

a.button {
  display: inline-block;
  box-sizing: border-box;
  line-height: 1.15;
}

.button:hover {
  opacity: 0.9;
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--secondary-text-color),
    0 0 0 4px var(--primary-color);
}

::-moz-focus-inner {
  border: none;
}

.button.danger {
  background-color: #ffdfdd;
  color: black;
}

/* Divider */
.divider {
  margin: 0;
  padding: 2px 0;
  background-color: var(--primary-color);
}

.vdivider {
  margin: 0;
  padding: 0 2px;
  background-color: var(--primary-color);
}

/* first letter style */

.fl-square-bg::first-letter {
  color: var(--secondary-text-color);
  background-color: var(--primary-color);
  padding: 2px 0 2px 4px;
}

/**********************/
/*******BOX***********/
/********************/
.box {
  border-radius: var(--radius);
  border: 1px var(--primary-color) solid;
}

/*********************/
/******FORMS*********/
/*******************/

.radio-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.radio-group-control {
  margin-left: 10px;
}

.radio-group-control label.pure-radio {
  display: inline-block;
  margin: 0;
}

input[disabled],
select[disabled],
textarea[disabled] {
  cursor: not-allowed;
  background-color: #b1fcfc !important;
  color: #0e0d0d !important;
}

.form-padding {
  padding: 20px 20px;
}

.form-padding-b {
  padding: 30px 40px;
}

.ubb-inlined {
  display: flex;
  flex-direction: column;
}

.ubb-inlined-1 input,
.ubb-inlined-1-3 input,
.ubb-inlined-1-4 input {
  width: 100%;
}

.ubb-inlined-1,
.ubb-inlined-1-3,
.ubb-inlined-1-4 {
  flex-grow: 1;
}

.ubb-form-control-group,
.ubb-inlined-space {
  margin-bottom: 0.5em;
}

.ubb-form-control-group-b {
  margin-bottom: 2em;
}

.form-footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.form-footer > *:not(:first-child) {
  margin-left: 40px;
}

.ubb-inlined-label {
  display: inline !important;
}

.alert {
  padding: 10px;
  border-radius: var(--radius);
  opacity: 0.9;
  margin: 5px 0 5px;
}

.error {
  background-color: #faebeb;
  color: #d8000c;
}

.success {
  background-color: #4caf50;
  color: white;
}

.warning {
  background-color: #ff9966;
  color: white;
}

.info {
  background-color: #d1ecf1;
}

/* sf = single field */
.sf-error {
  position: relative;
  margin-top: 10px;
  min-width: 20px;
  background-color: #cc3300;
  color: white;
  padding: 10px;
}

.sf-error::before {
  content: "";
  width: 0;
  height: 0;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #cc3300;
  border-left: 10px solid transparent;
  position: absolute;
  top: -10px;
}

input[type="date"] {
  background-color: inherit;
}

.help-text {
  padding-left: 12px !important;
}

.visuallyhidden {
  clip: rect(0 0 0 0);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px !important;
  margin: -1px !important;
  border: 0;
}

/* toast */
#snackbar {
  max-width: 500px;
  min-width: 250px;
  transform: translateX(-50%);
  text-align: center;
  border-radius: 2px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  top: 50px;
  animation: fadein 0.5s;
}

#snackbar > * {
  padding: 15px;
}

/** labels **/
.category-label {
  border-radius: 20px;
  background-color: var(--bg-color);
  padding: 5px 10px;
}

.labels,
.gap {
  --gap: 12px;
  display: inline-flex;
  flex-wrap: wrap;
  margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
}

.labels > *,
.gap > * {
  margin: var(--gap) 0 0 var(--gap);
}

.labels .ROOT {
  order: 1;
}

.labels .INNER {
  order: 2;
}

.labels .LEAF {
  order: 3;
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 40px;
    opacity: 0.9;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination span {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
}

.pagination span a {
  color: black;
  text-decoration: none;
}

.pagination span.current {
  background-color: var(--primary-color);
  color: var(--secondary-text-color);
}

.logout-button svg {
  width: 30px;
  height: 30px;
  fill: var(--primary-color);
}

.logout-button svg:hover {
  fill: black;
  transform: scale(1.2);
  transition: transform ease-in 0.2s;
}

.logout-button {
  padding-left: 10px;
  display: flex;
  justify-content: center;
}

/** toggle **/
.hide {
  display: none;
}

.show {
  display: block;
}

/** tabs **/
.tabs {
  display: flex;
}

.tabs .tab {
  padding: 5px;
  cursor: pointer;
}

.tabs .tab.active {
  border-radius: 2px 2px 0 0;
  background-color: var(--bg-color);
}

.tabs .tab:not(:first-child) {
  margin-left: 10px;
}

/** TABLE **/
table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

tr:hover {
  background-color: #f5f5f5;
}

th a {
  color: inherit;
  text-decoration: none;
}

.table-responsive {
  overflow-x: auto;
}

/** SEARCHBOX **/
.searchbox form {
  display: flex;
  align-items: center;
  border: 1px solid var(--bg-color);
  max-width: 500px;
  border-radius: 10px;
  height: 35px;
}

.searchbox .center {
  margin: 0 auto;
}

.searchbox form:hover {
  box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28);
  border-color: rgba(223, 225, 229, 0);
}

.searchbox input {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0 16px;
  display: flex;
  flex: 100%;
  outline: none;
  height: 34px;
}

.searchbox button {
  background-color: white;
  margin-right: 16px;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--primary-color);
}

.searchbox svg {
  width: 20px;
  height: 20px;
}

/******************/
/****CATEGORIES***/
/*****************/

.main-category {
  font-weight: bold;
}

.man-categories ul,
.categories ul {
  list-style: none;
  padding-left: 0;
}

.categories {
  margin-top: 10px;
  margin-left: 10px;
  display: grid;
  column-gap: 10px;
  grid-template-rows: 2fr;
}

.categories-no-col-3 {
  grid-template-columns: 1fr 1fr;
}

.categories-no-col-2 {
  grid-template-columns: 1fr;
}

.categories-no-col-3 .categories-col-2 {
  grid-row: 2;
}

.man-categories > ul,
.categories > ul {
  margin-bottom: 16px;
}

ul.categories-col-1,
.categories-no-col-3 ul.categories-col-3 {
  margin-bottom: 0;
}

.category__name {
  display: inline-block;
  margin-left: 3px;
}

.category__item {
  min-height: 20px;
  display: flex;
}

.category__item label {
  margin: 0 0 0 3px;
}

.category__item input {
  margin-top: 0.2em;
  align-self: flex-start;
}

.exclusive-categories > div:not(:first-child) input {
  margin-left: 10px;
}

.exclusive-categories {
  display: flex;
}

.man-main-categories {
  height: 30px;
}

.man-main-categories > div > input:checked {
  padding-top: 2px;
}

.man-main-categories > div > input:checked + label {
  padding: 2px;
  padding-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.man-categories,
.man-main-categories > div > input:checked + label,
.man-categories-inner {
  background-color: var(--manuscrit-category-bg-color);
}

.man-categories {
  display: grid;
  padding: 10px;
  max-width: 450px;
  border-radius: 10px;
}

.toggle-Fiction .man-categories {
  border-top-left-radius: 0;
}

.hide.man-categories {
  display: none;
}

.show.man-categories {
  display: grid !important;
}

.man-categories-inner {
  padding-bottom: 5px;
  padding-top: 5px;
  max-width: 170px;
  border-radius: 2px 2px 0 0;
}

/******************/
/** STARS RATING */
/****************/

label.star,
.clear-stars {
  position: relative;
  display: inline-block !important;
  width: 30px;
  height: 40px;
}

label.star::before,
label.rated::after {
  content: "\2605";
  font-size: 30px;
  position: absolute;
  color: #777;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
}

label.star:hover::before,
label.rated::after {
  color: gold;
}

label.star:focus-within,
.clear-stars:focus-within {
  box-shadow: 0 0 0 1px var(--secondary-text-color),
    0 0 0 4px var(--primary-color);
}

label.star input,
.clear-stars input {
  width: 100%;
  height: 100%;
  opacity: 0;
}

.clear-stars svg {
  height: 100%;
  width: 20px;
  fill: #777;
}

.stars {
  display: flex;
  align-items: center;
}

.stars[disabled] > div {
  cursor: not-allowed;
  opacity: 0.7;
}

.stars[disabled] .star {
  pointer-events: none;
}

/********************/
/*** ADMIN **********/
/********************/
.admin-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-heading .main {
  width: 90%;
  flex-grow: 1;
}

.admin-heading .side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.admin-heading .side img {
  margin: 5px;
}

/*******************/
/***** MODAL ******/
/*****************/
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.modal-content {
  position: relative;
  background-color: white;
  border: 1px solid #888;
  margin: auto;
  max-width: 800px;
  max-height: 95%;
  padding: 10px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: var(--radius);
  overflow: auto;
}

/* TABLET MODE */
@media screen and (min-width: 600px) {
  :root {
    --logo-width: auto;
    --logo-height: auto;
  }
  .mobile {
    display: none !important;
  }

  .tablet {
    display: block !important;
  }

  .ubb-inlined {
    display: flex;
    align-items: center;
    flex-direction: row;
  }

  .ubb-inlined-1-4 input {
    width: 25%;
  }

  .ubb-inlined-1-3 input {
    width: 33%;
  }

  .ubb-inlined-space {
    margin: auto;
  }

  .ubb-inlined .help-text {
    margin: 0 0 0 1em;
    vertical-align: middle;
  }

  .ubb-inlined label:not(.visuallyhidden) {
    margin: 0 1em 0 0 !important;
    vertical-align: middle;
  }

  .container {
    margin: 5px auto;
    width: 90%;
  }

  .categories {
    grid-template-rows: 1fr;
  }

  .categories-no-col-3 {
    grid-template-columns: 150px 150px 150px;
  }

  .categories-no-col-2 {
    grid-template-columns: 200px 200px;
  }

  .categories-no-col-3 .categories-col-2 {
    grid-row: 1;
    grid-column: 2;
  }

  ul.categories-col-1,
  .categories-no-col-3 ul.categories-col-3 {
    margin-bottom: 16px;
  }
}

/* DESKTOP MODE */
@media screen and (min-width: 1200px) {
  .mobile {
    display: none;
  }

  .tablet {
    display: block;
  }

  .fl-square-bg::first-letter {
    padding: 2px 0 2px 10px;
  }

  .container {
    width: 985px;
  }
}
