@import '../../_shared/styles/variables';

@import '../../vendors/jquery-treeview/jquery.treeview'; // to inline import css file, don't put extension
@import '../../../../node_modules/blueimp-file-upload/css/jquery.fileupload-ui';
// to inline import css file, don't put extension
@import '../../vendors/jquery-contextmenu/styles/jquery.contextmenu';
@import '../../_shared/styles/main';

// override jquery ui theme colors:
$uiTextContentColor: #333333;
$uiTextTitleColor: #333333;
$uiLinkColor: #333333;
$uiLinkFocusColor: #333333;
$uiLinkActiveColor: #333333;
$uiLinkBorderFocusColor: #c77405; //#333333;
@import '../../_shared/styles/jquery-ui/ui-lightness';

/******* GLOBAL CSS for ADMIN *************************************************/
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #333333;
  font-family: $defaultFontFamily;
  font-size: $mediumFontSize;
  overflow-y: auto;
}
.clear {
  clear: both;
}
h1 {
  font-weight: bold;
  font-size: 24px;
  text-align: left;
  margin: 10px 0;
}
h2 {
  font-weight: bold;
  font-size: 18px;
  text-align: left;
  margin: 7px 0;
}
h3 {
  font-weight: bold;
  font-size: 14px;
  text-align: left;
  margin: 4px 0;
}
h4 {
  font-weight: bold;
  font-size: 12px;
  text-align: left;
  margin: 2px 0;
}
a {
  color: #333333;
  text-decoration: underline;
  cursor: pointer;
}
a:hover {
  color: #0088cc;
  text-decoration: underline;
  cursor: pointer;
}
blockquote {
  margin: 20px 15px;
  padding: 10px;
  border: 1px dotted #000000;
  background-color: #f2f2f2;
}
img {
  vertical-align: middle;
}
input,
textarea,
.uneditable-input {
  margin: 0;
  padding: 4px;
}
select {
  margin: 0;
  padding: 5px 4px;
  *padding: 4px;
}
.help-block,
.help-inline {
  color: #666666;
}
li.selected,
div.selected {
  background-color: #aaa8a5;
  color: #ffffff;
}
li.selected a,
div.selected a {
  background-color: #aaa8a5;
  color: #ffffff;
}
.treeview ul {
  background-color: transparent;
}
#right-ajax.loading {
  background-image: url('#{$iconsPath}loaderFFF.gif');
  background-repeat: no-repeat;
  background-position: center center;
}
div.finder div.content div.title {
  margin-top: -2px;
  position: relative;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
}

//setting
.dumpfield {
  margin-top:10px;
  width: 400px;
}

/******* MAIN MENU ************************************************************/


$mainMenuBackgroundColor: #ffe000;
$mainMenuLinkColor: #333333;
$mainMenuLinkHoverColor: #000000;
$mainMenuLinkActiveColor: #000000;
$mainMenuLinkBackgroundHoverColor: transparent;

@import '../../_shared/styles/main-menu';

#mainContent {
  margin-top: $mainMenuHeight;
}

/******* LEFT SIDE ************************************************************/
#left {
  background-color: #f2f0e9;
  overflow: auto;
}
#FNDR {
  overflow: auto;
}
#FNDR li.selected {
  background-color: #aaa8a5;
  color: #ffffff;
}
#FNDR a {
  text-decoration: none;
  img {
    width: 16px;
  }
}
#FNDR a:hover {
  text-decoration: none;
}
#FNDR a span {
  text-decoration: underline;
}
#FNDR a span:hover {
  text-decoration: underline;
}
/******* USERS ****************************************************************/
.admin_head_opts {
  margin: 5px 0 10px 0;
}
.admin_head_opts span {
  margin: 0 10px;
}
.admin_head_opts a {
  margin: 0 5px;
}
#users_page_form p {
  margin: 5px 5px 10px;
}
#users_page_form .input-mini {
  width: 30px;
}
#users_check_uncheck div {
  padding: 5px 10px;
  background-color: #cccccc;
  color: #000000;
  cursor: pointer;
}
#users_check_uncheck div.hovered {
  padding: 5px 10px;
  background-color: #4d4d4d;
  color: #ffffff;
}

/******* EDIT USERS ***********************************************************/
div.no_switch {
  width: 12px;
  height: 12px;
  margin: 0 auto;
  background-image: url('#{$iconsPath}ccoch5.gif');
  background-repeat: no-repeat;
  background-position: center center;
}

div.switch_quota,
div.switch_masks,
div.switch_time,
div.switch_right {
  width: 12px;
  height: 12px;
  margin: 0 auto;
}
div.switch_quota.mixed,
div.switch_masks.mixed,
div.switch_time.mixed,
div.switch_right.mixed {
  background-image: url('#{$iconsPath}ccoch2.gif');
  background-repeat: no-repeat;
  background-position: center center;
}
div.switch_quota.checked,
div.switch_masks.checked,
div.switch_time.checked,
div.switch_right.checked {
  background-image: url('#{$iconsPath}ccoch1.gif');
  background-repeat: no-repeat;
  background-position: center center;
}
div.switch_quota.unchecked,
div.switch_masks.unchecked,
div.switch_time.unchecked,
div.switch_right.unchecked {
  background-image: url('#{$iconsPath}ccoch0.gif');
  background-repeat: no-repeat;
  background-position: center center;
}
.ui-datepicker {
  z-index: 1500;
}

.dialog_container {
  #template_add_dialog, #user_add_dialog, #dialog-form {
    &.ui-dialog-content {
      margin-bottom: 0;
      margin-top: 8px;
    }
    form {
      margin-bottom: 10px;
    }
    label {
      font-family: Roboto;
      font-size: 14px;
      font-weight: normal;
      font-style: normal;
      font-stretch: normal;
      line-height: normal;
      letter-spacing: normal;
      color: #1d1d1d;
    }
    input[type=text] {
      width: 94%;
      background-color: #ffffff;
      border: solid 1px #979797;
    }
  }
}

.dialog_container {
  #dialog-form {
    .selectdiv {
      position: relative;
    }
    select::-ms-expand {
      display: none;
    }
    .selectdiv:after {
      content: "";
      /* background-color: #000; */
      background-image: url(/assets/common/images/icons/arrow.png);
      background-position: center;
      background-size: cover;
      right: 18px;
      top: 9px;
      position: absolute;
      width: 8px;
      height: 12px;
      pointer-events: none;
    }
    .selectdiv select {
      -webkit-appearance: none;
      -moz-appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      display: block;
      width: 98%;
      height: 30px;
      margin: 5px 0px;
      padding: 0px 8px;
      line-height: 1.75;
      -ms-word-break: normal;
      word-break: normal;
      border: solid 1px #979797;
      background-image: linear-gradient(16deg, transparent 50%, transparent 50%),
      linear-gradient(135deg, transparent, transparent), linear-gradient(to right, #979797, #979797);
      background-position: calc(100% - 3px) calc(1em + 2px), calc(100% - 4px) calc(1em + 2px), 100% 0;
      background-size: 5px 5px, 5px 5px, 30px 2.5em;
      background-repeat: no-repeat;
      margin-bottom: 20px;
    }
    input[type=text] {
      margin-bottom: 20px;
    }
  }
}

.dialog_container {
  .ui-dialog-title {
    font-family: Roboto;
    font-size: 18px;
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #4a4a4a;
  }
  .ui-dialog-titlebar-close {
    border: none;
    margin-right: 4px;
    text-indent: -9999999px;
  }
  .ui-icon.ui-icon-closethick {
    background-image: url("/assets/common/images/icons/cross-white.png");
    background-position: center;
    background-size: cover;
  }
  .ui-dialog-buttonpane {
    border-top: solid 1px #979797;
  }
  .ui-dialog-buttonpane .ui-button {
    border-radius: 15px;
    background-color: #ffffff;
    border: solid 1px #4a4a4a;
    font-family: Roboto;
    font-size: 14px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #1d1d1d;
    height: 30px;
    min-width: 135px;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: 10px;
    margin-right: 10px;
  }
  .ui-dialog-buttonpane .ui-button:nth-child(2) {
    background-color: #4a4a4a;
    color: #FFFFFF;
  }
  .ui-button-icon-only {
    text-indent: -9999px;
    background: transparent;
  }
  .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: none;
    text-align: center;
  }
}

/******* BOARD ****************************************************************/
.board_section {
  margin: 0 0 30px;
}
.board_section div[class="section"] {
  height: auto;
}
.board_section div[class="section"] h2 {
  line-height: 24px;
}
.board_section div[class="section"] ul.setup {
  border: 1px solid #cccccc;
  list-style-type: none;
}
.board_section div[class="section"] ul.setup li {
  padding: 2px 5px 2px 30px;
  background-repeat: no-repeat;
  background-position: 5px center;
}
.board_section div[class="section"] ul.setup li.good-enough {
  background-image: url('#{$iconsPath}ok.png');
}
.board_section div[class="section"] ul.setup li.non-blocker {
  background-image: url('#{$iconsPath}alert.png');
}
.board_section div[class="section"] ul.setup li.blocker {
  background-image: url('#{$iconsPath}delete.png');
  background-size: 16px;
}
.board_section div[class="section"] ul.setup li:hover {
  background-color: #f2f0e9;
}
/******* PUBLICATIONS *********************************************************/
#pub_icon {
  width: 42px;
  height: 42px;
  float: left;
}
#pub_icon .thumb_wrapper {
  width: 32px;
  height: 32px;
  margin: 5px auto;
}
#pub_icon .thumb_wrapper img {
  width: 32px;
  height: 32px;
}
#pub_fileupload {
  height: 42px;
  line-height: 42px;
  margin-left: 47px;
}
/******* GLOBAL VALUES FORM ***************************************************/
#GV_form .error,
#GV_form .NEW {
  color: #ff0000;
  font-weight: bold;
}
#GV_form .section {
  padding-bottom: 10px;
}

#GV_form .controls {
  margin-left: 260px;
}

#GV_form .control-label {
  width: 240px;
}

#GV_form .section h1 {
  font-weight: bold;
  font-size: 16px;
  text-align: left;
  margin: 10px 0;
  line-height: 22px;
}

#tab-registrations .dl-horizontal dd {
  word-break: break-all;
  margin-left: 140px;
}

#tab-registrations .dl-horizontal dt {
  width: 130px;
}

#tab_demandes .table .btn-group {
  display: block;
}

#admin_setup_registry .control-label {
  min-width: 260px;
}
#admin_setup_registry .form-horizontal .controls, #admin_setup_registry .form-horizontal .help-message {
  margin-left: 300px;
}
.alert .close{
  text-decoration: none;
}

#users_page .user_modifier {
  margin-top: 5px;
  margin-left: 10px;
}

#users_page .user_deleter {
  margin-top: 5px;
}

.alert .close {
  text-decoration: none;
}

.subdefs [id^="box"] {
  display: none;
}

.subdefs .subviews-submit {
  position: fixed;
  top: 75px;
  right: 40px;
  z-index: 1;
}

h2.subdefName {
  display: inline-block;
  margin-right: 1.5rem;
}

.reload, .loader, .status {
  display: inline-block;
}

.langTab {
  display: inline-block;
  vertical-align: top;
}

.langTab h3 {
  font-weight: 700;
  font-size: 13px;
  margin: 4px 0;
  line-height: 11px;
  text-align: center;
}

.toggle {
  display: block;
  margin: 15px 0;
  color: #08c;
  cursor: pointer;
}

.subdefTab input, .langTab input {
  margin: 0;
}

label[for="elasticsearch_settings_highlight"] {
  display: inline-block;
  margin-left: 0.5rem;
  margin-bottom: 1rem;
}

input[id="elasticsearch_settings_highlight"] {
  float: left;
}

#downbutton {
  margin: 1rem 0;
}

#upbutton {
  width: 100%;
  text-align: left;
}

#upbutton i {
  position: relative;
  left: -5px;
}

#downbutton i {
  position: relative;
  left: -5px;
}

.form-horizontal .controls + div {
  margin-left: 180px;
  font-style: italic;
}

/******* SETUP *******************************************************************/
#custom-link-table {
  width: 100%;
  thead {
    th {
      text-align: left;
      font-weight: bold;
    }
  }
  td {
    height: 30px;
    width: 19%;
    input {
      width: 100%;
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
      height: 30px;
    }
    select {
      width: 100%;
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
      height: 30px;
    }
    .simplecolorpicker {
      width: 21px;
      height: 21px;
      background-repeat: no-repeat;
      background-size: contain !important;
      background-position: center center;
      border: none;
      margin-right: 3px;
    }
    button {
      height: 30px;
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
    }
  }
  td:nth-of-type(5) {
    width: 14%;
  }
  td:nth-of-type(6) {
    width: 3%;
  }
  td:nth-of-type(7) {
    width: 3%;
  }
  td:last-child {
    width: 8%;
  }
}

span.simplecolorpicker.picker {
  min-width: 0px;
  width: 22px;
  margin-top: -360px;
  border-radius: 0px;
  margin-left: 4px;
  padding: 0;
  span {
    width: 20px;
    margin: 0px;
  }
}

#add-row {
  margin-top: 10px;
  margin-bottom: 20px;
  float: right;
}

.link_check_box:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url(/assets/common/images/icons/Bouton-Bold.png) #fff;
  background-repeat: no-repeat;
  background-size: 75%;
  background-position: center center;
}

.link_check_box:checked:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url(/assets/common/images/icons/Bouton-bold-active.png) #fff;
  background-repeat: no-repeat;
  background-size: 75%;
  background-position: center center;
}

/******* SEARCH ENGINE SETTINGS ***************************************************/
.search-engine-tabs {
  background: 0;
  border: 0;
  .top-bar-shadow {
    margin-top: 1px;
    background: #aaa8a5; /* For browsers that do not support gradients */
    background: -webkit-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Firefox 3.6 to 15 */
    background: linear-gradient(to bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* Standard syntax */
    height: 4px;
  }
  .ui-tabs-active {
    background: #9EA09D !important;
    a {
      color: #FFFFFF !important;
    }
  }
  .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
    border: 0;
    background: #EFF0F0;
    a {
      color: #9EA09D;
    }
  }
}

#elasticsearch_settings_esSettingsDropIndexButton, #elasticsearch_settings_esSettingsCreateIndexButton {
  margin-bottom: 20px;
}

#elasticsearch_settings_save {
  padding: 15px;
  margin-top: 20px;
  &::before {
    content: "\F0A0";
    font-family: "FontAwesome";
    margin-right: 5px;
  }
}

#elasticsearch_settings_esSettingFromIndex {
  margin-top: 20px;
}

#elastic-search, #general-aggregation {
  background: #ffffff;
}

.general-aggregation-layout {
  margin-top: 20px;
  width: 450px;
  button.btn-primary {
    margin-left: 4px;
    margin-top: 20px;
    padding: 15px;
    width: 180px;
    i {
      margin-right: 5px;
    }
  }
}

.aggregation-collection {
  li {
    border: 1px solid #ccc;
    background: #FFF;
    color: #000;
    height: 30px;
    margin: 4px;
    padding: 20px;
    table {
      width: 100%;
      display: inline-table;
      vertical-align: middle;
      height: 100%;
      table-layout: fixed;
    }
  }
  .label-aggregation {
    font-weight: bold;
    font-size: 16px;
    color: #666;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    width: 100%;
    vertical-align: middle;
    margin-bottom: 0px;
  }
  select {
    float: right;
    width: 100%;
  }
}

.personalise-logo-row-container {
  height: 105px;
  td:first-child {
    border-right: 1px solid #3b99fc;
  }
  td {
    padding: 4px 40px 10px 40px;
    min-width: 100px;
    max-width: 200px;
    vertical-align: top;
    input[type="radio"] {
      height: 25px;
      margin: 0;
    }
    label {
      display: inline-block;
      line-height: 25px;
      margin-left: 10px;
    }
    .image-container {
      height: 41px;
      width: 120px;
      border: 1px solid #979797;
      display: block;
    }
    img {
      width: 100%;
      height: 100%;
      object-fit: scale-down;
    }
    a {
      font-family: Roboto;
      font-size: 10px;
      font-weight: normal;
      font-style: normal;
      font-stretch: normal;
      line-height: normal;
      letter-spacing: normal;
      color: #3b99fc;
      text-align: left;
      display: block;
      margin-top: 10px;
    }
    #select-logo-btn {
      border-radius: 5px;
      box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.09);
      background-color: #ffffff;
      border: solid 1px #c3c3c3;
      font-family: Roboto;
      font-size: 11px;
      text-align: left;
      color: #000000;
      margin-top: 10px;
      padding: 3px 20px;
      line-height: 11px;
      margin-left: 0;
    }
    #help-text {
      font-family: Roboto;
      font-size: 12px;
      line-height: 1.33;
      letter-spacing: normal;
      text-align: left;
      color: #000000;
    }
    #error-text {
      font-family: Roboto;
      font-size: 12px;
      font-weight: normal;
      font-style: italic;
      line-height: 1.33;
      letter-spacing: normal;
      text-align: left;
      color: #ff0404;
    }
    input[type="file"] {
      display: none;
    }
  }
}

@media screen and (max-width: 1150px) {
  .langTab {
    display: block;
  }
}

.help-trigger {
  display:inline-block;
  cursor:pointer;
  padding: 0 4px;
  border:none;
  margin-left: -12px;
}

.phraseanet_logo {
  background: url(../../common/images/logo_phraseanet.png) no-repeat center center /contain;
  height: 75px;
  width: 230px;
  display: inline-block;
}

.phraseanet_version {
  font-size: 15px;
  font-family: Roboto;
  font-weight: 500;
  color: #b7b7b7;
  padding-left: 58px;
  a {
    color: #b7b7b7;
    &:hover {
      color: #FFFFFF;
    }
  }
}

.phraseanet_about_top {
  background: #4e4e4e;
  padding: 30px 20px;
}
.phraseanet_about_bottom {
  padding: 25px 20px;
  min-height: 150px;
  background: #c8c8c8;
  a {
    font-family: Roboto;
    line-height: 1.2;
    font-size: 15px!important;
    font-weight: 500;
    color: #000000!important;
    text-decoration: underline;
  }

}
.phraseanet_gpl {
  img {
    position: absolute;
    width: 84px;
  }
  span {
    padding-top: 26px;
    display: inline-block;
    padding-left: 100px;
    padding-bottom: 20px;
    text-decoration: underline;
  }
  a {
    text-decoration: underline;
  }

}
.ui-icon, .ui-widget-content .ui-icon {
  background-image: url(/assets/vendors/jquery-ui/images/ui-lightness/ui-icons_222222_256x240.png)!important;
}
.ui-dialog-titlebar-close {
  text-indent: -9999999px;
}
@import './databases';
@import './fields';
@import './tables';
