.author {
  padding: 0;

  .biography {
    float: left;
    width: 80%;
  }

  .admin_links {
    float: right;
    width: 20%;
  }
}

.pubblications {
  padding-top: 30px;

  .book {

    .head {
      width: 85%;
      float: right;

      h1 {
        font-size: 15px;
      }
    }
  }
}
.banner {
  position: fixed;
  bottom: 1em;
  right: 1em;
  left: 1em;
  width: auto;
  margin: 0;
  padding: 5px;
  text-align: center;
  border: 2px solid var(--color-banner-border);
  background-color: var(--color-banner-bg);

  button {
    min-width: 100px;
  }
}
.biography {
  width: 80%;
  float: left;
}

.description {
  width: 70%;
  float: left;
}

.details {
  width: 30%;
  float: right;
  margin-top: 25px;
  font-size: 85%;
  color: var(--color-text-light);
  text-align: center;

  .price {
    color: var(--color-text);
    font-size: 1.4em;
    font-weight: bold;
  }
}

/* Usare .cover-thumb--small e .cover-thumb--medium eliminando la gerarchia di elementi? (v. sotto) */
.photo .cover-thumb,
.details .cover-thumb {
  width: 120px;
  height: 170px;
}

.pubblications {
  padding-top: 30px;
}

.subtitle {
  color: var(--color-text-light);
  font-weight: normal;
}

.unpublished {
  color: var(--color-text-warning);
}

ul.cathegories {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  float: left;

  li {
    font-size: 11px;
    display: inline;
    margin-right: 0px;
    padding: 2px 4px;
    white-space: nowrap;
    color: var(--color-tag-fg);
    background-color: var(--color-tag-bg);
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;

    &:hover {
      color: var(--color-tag-bg);
      background-color: var(--color-tag-fg);
    }

    a {
      text-decoration: none;

      &:hover {
        color: inherit;
        background-color: inherit;
      }
    }
  }
}

/* INDEX */

.book {
  margin-top: 25px;

  .photo {
    width: 15%;
    float: left;
    font-size: 85%;
    color: var(--color-text-light);
    text-align: left;

    /* Usare .cover-thumb--small e .cover-thumb--medium eliminando la gerarchia di elementi? (v. sopra) */
    .cover-thumb {
      width: 80px;
      height: 120px;
    }

    /* FIXME Inutilizzato? Eliminare? */
    a {
      text-decoration: none;

      &:hover {
        color: inherit;
        background-color: var(--color-link-hover);
      }
    }
  }

  .head {
    width: 85%;
    float: right;

    h1 {
      font-size: 18px;
      margin-top: 0;

      a {
        text-decoration: none;

        &:hover {
          color: inherit;
          background-color: var(--color-link-hover);
        }
      }
    }

    h2 {
      margin: 0;
      font-size: 1em;
      font-weight: normal;
    }
  }
}
/* TODO Unificare (v. authors.css) */
.cathegory {
  padding: 0;

  .cathegory_name {
    float: left;
    width: 80%;
  }

  .admin_links {
    float: right;
    width: 20%;
  }
}

/* TODO Unificare (v. books.css) */
.publication_type {
  color: var(--color-text-light);
  font-size: 85%;
  font-weight: normal;
}
.photo *[data-action] {
  cursor: pointer;
}

.dialog--sample {
  height: calc(100% - 2em);
  max-width: calc(100% - 1em);
  max-height: calc(100% - 1em);
  padding: 0;
  text-align: center;
  border-width: 1px;

  form[method="dialog"] {
    position: absolute;
    top: 5px;
    right: 5px;
  }
}

dialog::backdrop {
  background-color: var(--color-black-50);
}

.sample-img {
  width: auto;
  height: 99%;
}
.author_form,
.cathegory_form,
.book_form,
.score_form,
.order_form,
.user_form,
.sign_in_form,
.forgot_password_form,
.change_password_form,
.resend_password_confirmation_form,
.hire_form {
  margin: 25px 0;
  padding: 20px;
  background-color: var(--color-form-bg);
  border: 4px solid var(--color-form-border);
  border-radius: 5px;
}

form.button_to {
  display: inline-block;
}

table.fields {
  width: 100%;

  th {
    font: inherit; /* font-size: 85%; */
    padding: 8px 10px 2px 0;
    width: 1%;
    white-space: nowrap;
    text-align: left;
    vertical-align: top;
  }

  td {
    width: 99%;
    padding: 2px 0;
  }

  input,
  textarea {
    font: inherit;
  }

  textarea {
    -webkit-appearance: textfield;
  }

  .half_width {
    width: 50%;
  }

  .full_width {
    width: 99%;
  }

  .actions {
    text-align: right;
  }
}
.header_menu {
  ul#nav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--color-nav-menu-bg);

    li {
      float: left;
    }

    li a,
    li button,
    li input[type="submit"],
    .dropdown-button {
      display: inline-block;
      color: var(--color-nav-menu-fg);
      text-align: center;
      padding: 8px 10px;
      text-decoration: none;
    }

    li button,
    li input[type="submit"] {
      font: inherit;
      margin: 0;
      border: none;
      background: inherit;
    }

    .dropdown-button::after {
      /* Serve mettere il triangolo in giù? Usare quello aperto? */
       content: " ▾";
    }

    li a:hover,
    li button:hover,
    li input[type="submit"]:hover,
    .dropdown:hover .dropdown-button {
      color: var(--color-nav-menu-bg);
      background-color: var(--color-nav-menu-selected-bg);
    }

    li.dropdown {
      display: inline-block;
    }

    .dropdown-content {
      display: none;
      position: absolute;
      background-color: var(--color-nav-menu-bg);
      min-width: 160px;
      box-shadow: 0px 8px 16px 0px var(--color-shadow);
      z-index: 1;
    }

    .dropdown-content a,
    .dropdown-content button,
    .dropdown-content input[type="submit"] {
      color: var(--color-nav-menu-fg);
      padding: 12px 16px;
      text-decoration: none;
      display: block;
      text-align: left;
    }

    form.button_to {
      width: 100%;
    }

    .dropdown-content button,
    .dropdown-content input[type="submit"] {
      cursor: pointer;
      width: 100%;
    }

    .dropdown-content a:hover {
      background-color: var(--color-nav-menu-selected-bg);
    }

    .dropdown:hover .dropdown-content {
      display: block;
    }
  }
}
.order {
  .book .head {
    width: auto;
    float: none;
  }

  .vertical-space td {
    padding-top: 25px !important;
    padding-bottom: 25px !important;
  }

  td:first-child {
    padding-left: 0 !important;
  }
}

.step-bar {
  counter-reset: step-counter 0;
  list-style-type: none;
  padding: 10px;
  margin-top: 25px;
  text-align: center;

  li {
    display: inline;
    margin-right: 50px;
    color: var(--color-step);

    &::before {
      counter-increment: step-counter +1;
      content: counter(step-counter) ". ";
    }
  }

  .current-step {
    font-weight: bold;
    color: var(--color-step-current);
  }
}
/* TODO Spostare in table.css? */

.table--border {
  border-collapse: collapse;

  td, th {
    border: 1px solid var(--color-table-border-black);
    padding: 0.5em;
    white-space: nowrap;
  }
}

.text--wrap {
  white-space: normal !important;
}
.pagination {
  margin: 40px 0 20px 0;
  font-size: 14px;

  .previous_page,
  .next_page,
  em,
  a {
    padding: 2px;
    border: 1px solid var(--color-pagination-link-border);
    border-radius: 2px;
    text-decoration: none;
  }

  a:hover {
    background-color: var(--color-pagination-link-hover-bg);
  }

  .disabled {
    color: var(--color-pagination-disabled-fg);
  }

  .current {
    background-color: var(--color-pagination-current-bg);
  }
}
:root {
  /* Colori */
  --color-black: #000;
  --color-white: #FFF;

  --color-gray-20: #333;
  --color-gray: #999;
  --color-gray-70: #B3B3B3;
  --color-gray-80: #CCC;
  --color-gray-light: #EEE;
  --color-gray-lighter: #FAFAFA;

  --color-red-darkerer: #A90008;
  --color-red-dark: #C00;
  --color-red: red;
  --color-red-light: #FFDDD9;

  --color-green: green;
  --color-green-light: #B3EBB1;

  --color-yellow: #B39300;
  --color-yellow-light: #FEFFB0;

  --color-brown-darker: #3E2F12;
  --color-brown-dark: #976018; /* brown */
  --color-brown-light: #EBD18B;
  --color-brown-lighter: #CCBEA2;

  --color-ocra: #C90;
  --color-ocra-2: #D79F2F;
  --color-ocra-light: #F0D99D;
  --color-ocra-light-2: #EFDFB6; /* B0B0B0 */
  --color-ocra-lighter: #FFF6E5; /* --color-brown-ultralight */

  /* Usare i numeri alla fine solo per l'opacità */
  --color-black-50: rgba(0, 0, 0, 0.5);
  --color-black-30: rgba(0, 0, 0, 0.3);

  /* banner.css */
  --color-banner-bg: var(--color-gray-light);
  --color-banner-border: var(--color-gray);

  /* book.css */
  --color-text: var(--color-black);
  --color-text-light: var(--color-gray);
  --color-text-warning: var(--color-red-darker);
  --color-link-hover: var(--color-gray-light);

  /* cathegories.css */
  --color-text-light: var(--color-gray);

  /* form.css */
  --color-form-bg: var(--color-gray-lighter);
  --color-form-border: var(--color-ocra-light-2);

  /* menu.css */
  --color-nav-menu-fg: var(--color-brown-lighter);
  --color-nav-menu-bg: var(--color-brown-darker);
  --color-nav-menu-selected-bg: var(--color-ocra-lighter);

  /* orders.css */
  --color-step: var(--color-gray-70);
  --color-step-current: var(--color-black);

  /* pages.css */
  --color-table-border-black: var(--color-black);

  /* pagination.css */
  --color-pagination-disabled-fg: var(--color-gray);
  --color-pagination-current-bg: var(--color-gray-80);
  --color-pagination-link-border: var(--color-gray);
  --color-pagination-link-hover-bg: var(--color-black);

  /* scaffold.css */
  --color-canvas-bg: var(--color-white);
  --color-canvas-fg: var(--color-gray-20);
  --color-pre-bg: var(--color-gray-light);
  --color-link-fg: var(--color-black);
  --color-link-bg: var(--color-white);
  --color-error: var(--color-red);
  --color-error-bg: var(--color-red-light);
  --color-error-box-bg: var(--color-gray-light);
  --color-error-box-header-fg: var(--color-white); /* <-- ? */
  --color-error-box-header-bg: var(--color-red-dark); /* <-- ? Usare un solo rosso (questo) anche per l'errore? */

  /* scores.css */
  --color-instrumentation-fg: var(--color-gray); /* <-- Vedi con subtitle */

  /* screen.css */
  --color-h2-fg: var(--color-ocra); /* --color-sub-headings-fg (vedi h3) or --accent */
  --color-header-bg: var(--color-ocra-2); /* FIXME Unificare con il precedente (--color-h2-fg) */
  --color-header-fg-light: var(--color-ocra-light);
  --color-tag-fg: var(--color-brown-dark);
  --color-tag-bg: var(--color-brown-light);
  --color-flash-notice-fg: var(--color-green);
  --color-flash-notice-bg: var(--color-green-light);
  --color-flash-alert-fg: var(--color-yellow);
  --color-flash-alert-bg: var(--color-yellow-light);
  --color-flash-error-fg: var(--color-red);
  --color-flash-error-bg: var(--color-red-light);
  --color-footer-fg: var(--color-white);
  --color-footer-bg: var(--color-gray-80);
  --color-search-border: var(--color-ocra-2); /* --color-border-accent */
  --color-search-shadow: var(--color-black-30); /* --color-shadow */

  /* signup.css */
  --color-box-bg: var(--color-gray-lighter);
  --color-box-border: var(--color-ocra-light-2);

  /* table.css */
  --color-table-header-fg: var(--color-white);
  --color-table-header-bg: var(--color-ocra-2);
  --color-table-border: var(--color-ocra-light);
  --color-table-border-dark: var(--color-ocra-2);

  /* users.css */
  --color-border: var(--color-gray-80);
}
body {
  background-color: var(--color-canvas-bg);
  color: var(--color-canvas-fg);
  margin: 33px;
}

body, p, ol, ul, td {
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 13px;
  line-height: 18px;
}

pre {
  background-color: var(--color-pre-bg);
  padding: 10px;
  font-size: 11px;
}

a {
  color: var(--color-link-fg);

  &:visited {
    /* color: #666; */
  }

  &:hover {
    color: var(--color-link-bg);
    background-color: var(--color-link-fg);
  }
}

th {
  padding-bottom: 5px;
}

td {
  padding: 0 5px 7px;
}

div.field,
div.actions {
  margin-bottom: 10px;
}

.field_with_errors {
  label {
    color: var(--color-error);
  }

  input,
  select,
  textarea {
    background-color: var(--color-error-bg);
  }
}

#error_explanation {
  padding: 7px;
  margin-bottom: 20px;
  background-color: var(--color-error-box-bg); /* <-- ? */

  h2 {
    text-align: left;
    font-weight: bold;
    padding: 5px 5px 5px 15px;
    font-size: 12px;
    margin: -7px -7px 0;
    background-color: var(--color-error-box-header-bg); /* <-- ? #c00 */
    color: var(--color-error-box-header-fg); /* <-- ? */
  }

  ul li {
    font-size: 12px;
    list-style: square;
  }
}
.instrumentation {
  color: var(--color-instrumentation-fg);
  font-weight: normal;
}
body {
  font: 13px Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

h2 {
  font-size: 1.2em;
  color: var(--color-h2-fg);

  a:hover {
    background-color: var(--color-h2-fg);
  }
}

h3 {
  font-size: 1em;
  color: var(--color-h2-fg);
}

.flash {
  margin: 5px 0;
  padding: 5px;
  border: 1px solid;

  &.notice {
    color: var(--color-flash-notice-fg);
    border-color: var(--color-flash-notice-fg);
    background-color: var(--color-flash-notice-bg);
  }

  &.alert {
    color: var(--color-flash-alert-fg);
    border-color: var(--color-flash-alert-fg);;
    background-color: var(--color-flash-alert-bg);;
  }

  &.error {
    color: var(--color-flash-error-fg);
    border-color: var(--color-flash-error-fg);
    background-color: var(--color-flash-error-bg);
  }
}

.text--small {
  font-size: 0.9em;
}

.clear {
  clear: both;
}

#container {
  width: 800px;
  margin: auto;
}

.header {
  padding: 10px 5px;
  background-color: var(--color-header-bg);

  td {
    padding: 0 5px;
  }

  h1 {
    font-size: 30pt;
    font-weight: normal;
  }

  .weak {
    color: var(--color-header-fg-light);
  }
}

/* Spostare in menu.css? */
.header_menu {
  #search {
    width: 180px;
    padding: 3px 5px;
    margin: 5px 10px;
    border: 1px solid var(--color-search-border);
    box-shadow: inset 1px 1px 2px var(--color-search-shadow);
    -webkit-box-shadow: inset 1px 1px 2px var(--color-search-shadow);
    -moz-box-shadow: inset 1px 1px 2px var(--color-search-shadow);
  }
}

.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-fg);
  font-size: 85%;
  padding: 5px;
  margin-top: 100px;
}
/* Vedi form.scss */
.signup_box {
  margin: 25px 0;
  padding: 20px;
  background-color: var(--color-box-bg);
  border: 4px solid var(--color-box-border);
  border-radius: 5px;
}
.sortable-handle {
  cursor: pointer;
}

.sortable-ghost {
  opacity: 0.5;
}
#line_items,
#hire_requests,
#users,
#orders {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;

  th {
    font-size: 10px;
    color: var(--color-table-header-fg);
    background-color: var(--color-table-header-bg);
    padding: 4px 8px;
    text-align: left;
  }

  td {
    padding: 4px 8px;
  }

  tbody tr {
    border-bottom: 1px dotted var(--color-table-border);

    &:last-of-type {
      border-bottom: 1px solid var(--color-table-border-dark);
    }
  }
}

#line_items {
  .selling_option {
    width: 99%;
    white-space: nowrap;
    text-align: right;
  }

  .price,
  .links {
    white-space: nowrap;
    text-align: right;
  }

  .quantity {
    white-space: nowrap;
    text-align: center;

    input {
      font: inherit;
      text-align: inherit;
      width: 4em;
    }
  }

  .total.price {
    font-weight: bold;
  }
}

#hire_requests {
  .date,
  .name {
    white-space: nowrap;
  }
}

#users {
  .mailing_list {
    text-align: center;
  }

  .discount_percentage {
    text-align: right;
  }
}
#users,
.user {
  .admin {
    float: right;
    font-size: 85%;
    padding: 0 4px;
    color: var(--color-tag-fg);
    background-color: var(--color-tag-bg);
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
  }
}

.detail {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;

  td {
    border: none;
    padding: 5px 5px 5px 5px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
  }

  th {
    font-size: 90%;
    text-align: right;
    white-space: nowrap;
    width: 1%;
    vertical-align: top;
    padding: 5px 20px 5px 5px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
