#tab-contentquery table td,
#tab-contentquery table th {
  text-align: left !important;
  height: 3rem;
}

#main_preferences {
  form {
    width: 100%;
  }

  fieldset {
    margin: 8px;
    border: none;
  }

  legend {
    margin: 0;
    padding: 5px 0 0 0;
    display: block;
    float: left;
    width: 300px;
  }

  .value {
    margin: 0;
    padding: 0;
    float: left;
    width: 15em;

    select,
    input[type="text"] {
      font-size: inherit !important;
      margin: 0 1rem 0 0;
    }

    select {
      width: 14rem;
    }

    input[type="text"] {
      width: 13.25rem;
      color: var(--color-toolkit-input-text-font);
      border: none;
      background: none repeat scroll 0 0 var(--color-toolkit-select-background);
      padding: 0.2rem 0.4rem;
      height: 2rem;
      .rounded-corners-tiny;

      &:hover,
      &:focus {
        background-color: var(--color-toolkit-select-background-hover);
      }
    }

    select:focus,
    input:focus {
      outline: none;
      box-shadow: 0 0 1px 1px var(--color-btn-background);
    }
  }

  .description {
    margin: 0;
    padding: 5px 0 0 0;
    float: left;
    width: 50%;
    color: var(--color-settings-engine-description-font);
    font-size: 90%;
  }

  table {
    border-collapse: collapse;
  }

  table td {
    text-align: center;
  }

  table.cookies {
    width: 100%;

    th,
    td {
      text-align: left;
      font-family: monospace;
      font-size: 1rem;
      padding: 0.5em;
      vertical-align: top;
    }

    td:first-child {
      word-break: keep-all;
      width: 14rem;
      padding-right: 1rem;
    }

    td:last-child {
      word-break: break-all;
    }

    & > tbody > tr:nth-child(even) > th,
    & > tbody > tr:nth-child(even) > td {
      background-color: var(--color-settings-tr-hover);
    }
  }

  .category {
    margin-right: 0.5rem;

    label {
      border: 2px solid transparent;
      padding: 0.2rem 0.4rem;
      .rounded-corners-tiny;
    }
  }

  .category input[type="checkbox"]:checked + label {
    border: 2px solid var(--color-categories-item-border-selected);
  }

  .name,
  .shortcut {
    text-align: left;
  }

  .preferences_back {
    background: none repeat scroll 0 0 var(--color-btn-background);
    color: var(--color-btn-font);
    border: 0 none;
    .rounded-corners;

    cursor: pointer;
    display: inline-block;
    margin: 2px 4px;
    padding: 0.7em;

    a {
      color: var(--color-settings-return-font);
    }

    a::first-letter {
      text-transform: uppercase;
    }
  }

  div.selectable_url {
    pre {
      width: 100%;
    }
  }

  th.name {
    .engine-tooltip {
      margin-top: 1.8rem;
      left: calc((100% - 85em) / 2 + 10em);
      max-width: 40rem;

      .engine-description {
        margin-top: 0.5rem;
      }
    }
  }
}

@media screen and (max-width: @tablet) {
  .preferences_back {
    clear: both;
  }

  .engine-tooltip {
    left: 10em !important;
  }
}
