@import "mixins";

$bootstrap_primary_blue: #428bca;
$bootstrap_primary_blue_hover: #3071a9;

@mixin opposite-radius($value: 3px) {
  border-radius: $value 0 $value 0;
  -webkit-border-radius: $value 0 $value 0;
  -moz-border-radius: $value 0 $value 0;
}
@mixin full-radius($value: 4px) {
  border-radius: $value;
  -webkit-border-radius: $value;
  -moz-border-radius: $value;
}
@mixin top-radius($value: 4px) {
  border-radius: $value $value 0 0;
  -webkit-border-radius: $value $value 0 0;
  -moz-border-radius: $value $value 0 0;
}
@mixin bottom-radius($value: 4px) {
  border-radius: 0 0 $value $value;
  -webkit-border-radius: 0 0 $value $value;
  -moz-border-radius: 0 0 $value $value;
}
@mixin all-but-left-radius($value: 4px) {
  border-radius: 0 $value $value $value;
  -webkit-border-radius: 0 $value $value $value;
  -moz-border-radius: 0 $value $value $value;
}
@mixin none-radius() {
  border-radius: 0;
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
}

.form-control{
  //padding: 2px!important;
  height: auto!important;
}

/* end: override styles of bootstrap */


.nav-tabs {
  border-bottom: 1px solid grey;
  //  margin-bottom: 1.5rem;

  .records_count {
    margin-left: .75rem;
  }
}

.nav-tabs .nav-item .nav-link{
  width: 15rem;
  margin: 0 0.25rem;
  border: 1px solid $main_dark_grey_border;
  border-top-left-radius: 0.35rem;
  border-top-right-radius: 0.35rem;
  background-color: $main_dark_grey;
  color: #fff;
}

.nav-tabs .nav-item.active .nav-link, .nav-tabs .nav-item:hover .nav-link, .nav-tabs .nav-item:focus .nav-link {
  color: #fff;
  background-color: $pixpalace_red;
  border: 1px solid $main_dark_grey_border;
  border-bottom: none;
}

.tab-content.admin_tabs {
}

.tab-pane{
  background-color: #fff;
  padding: 2rem 1rem 1rem 1rem;
}

table {
  margin: 1rem 0;
  width: auto!important;
  border: 1px solid $main_light_grey_bg;
  td,th {
    border: 1px solid $main_light_grey_bg;
  }
}

.panel-title {
  font-size:1em;
  padding:3px;
}

.input-xs {
  height: 22px;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  width: auto;
  display: inline;
  @include full-radius(3px);
}

.pw_panel-header {
  float: left;
  padding: 4px 4px 2px 4px;
  width: 100%;
  @include top-radius;
  .glyphicon {
    vertical-align: top;
    margin-top: 2px;
  }
}

.pw_panel-header-label {
  margin-right: 10px;
  cursor:pointer;
  float: left;
  border-top-left-radius: 4px;

  span{
    margin-top: 3px;
  }
}

.pw_panel-header-content {
  float: right;
  z-index:1;
}

#main-content {
  background-color: #fff;
  width: 100%;
  height: calc(100vh - 60px) ;
  overflow: auto;
  margin: 60px 0 0 0;
}

.group_cell{
  float: left;
  width: 300px;
  padding-right: 25px;
}
.group_cell_opts{
  float: right;
}
.destroy_group_provider{
  display: none;
}

// added
.panel-header {
  color: #333;
  background-color: #f5f5f5;
  border-color: #ddd;
  padding: 10px 15px 1px 15px;
  @include top-radius;
}

/*
buttons
*/
.pw_buttonset{
  display:block;
}
.pw_buttonset label{
  cursor: pointer;
  width: 14em;
  margin: .1em 0;
  padding: 0;
}

#admin_index {
  padding: 0 5px 0 5px;
  #in_group {
    overflow: auto;
    .group_cell {
      width: 340px;
    }
  }

  .glyphicon-eye-open {
    color: $bootstrap_primary_blue;
  }

  .glyphicon-pencil, .glyphicon-trash {
    color: $pixpalace_red;
  }

  .glyphicon-plus {
    margin-right: .5rem;
    color: $pixpalace_red;
  }

  .glyphicon-info-sign {
    font-size: 1.3rem;
    float: none;
  }

  .glyphicon-ok{
    float: none;
  }
}

.show_hide_help {
  font-size: 2rem;
  margin: .3rem 2rem;
  &:hover {
    color: $pixpalace_red;
  }
}

#titles_list {
  #title_table {
    .show-title, .modify-title {
      width: 25px;
    }
  }
}

.edit_title_provider_group_name {
  input, select {
    color: #000000;
  }
}
// end added

.admin_current_user{
  padding: 5px;
  color: #000;
  margin: 5px;
}

.admin_current_user ul{
  margin: 0;
  padding-left: 10px;
  list-style: none;
}

.rollo_admin_user{
  cursor: pointer;
  color: #2460e0;
}

#admin_info_user{
  position: absolute;
  left: 250px;
  top: 55px;
}

.pw_orphans{
  font-style: italic;
  color: #e00000;
}

.admin_title_name{
  font-weight: bold;
}

#admin_tabs_providers, #pw_admin_groups_panel, #admin_tabs-titles_users{
  margin-top: 5px;
}

#admin_tabs_providers .pw_content, #admin_tabs_providers .pw_panel{
  margin-left: 0;
}

/*admin providers*/

.admin_providers_form {
  float: left;
  margin-right: 20px;
}

.admin_providers_form .field{
  margin-bottom: 10px;
  clear: both;

}

.admin_providers_form .field label{
  float: left;
  margin-right: 10px;
  line-height: 1.7em;
}

.group_cell_opts label{
  text-transform: uppercase;
}

#contacts #provider_contact .field, #contacts #provider_contact .sfield{
  float: left;
  margin-left: 10px;
}

.sfield{
  width: 50px;
  text-align: center;
  margin-top: -7px;
}

#admin_users_list{
  height: 100%;

  li{
    float: left;
    margin: 5px 0 0 0;
    width: 200px;
    list-style: none;

    i {
      float:none;
    }

  }
}

.help_table{
  border:1px solid;
  tr,td,th{
    border:1px solid;
    border-collapse: collapse;
  }
}

.pw_display_inline{
  display: inline-block;
  position: relative;
  top: 3px;
}

.pw_group_providers{
  color: #2460e0;
  font-weight: bold;
}

.pw_white{
  background-color: #fff;
}


/* server_show */

.server label {
  font-weight: bold;
}

/* provider_form */

#admin_providers_edit {
  .admin_providers_form {
    width: 100%;
    .form-group.long-field {
      padding-bottom: 67px;
    }
    .form-group.address {
      padding-bottom: 60px;
    }
    .form-group {
      position: relative;
      margin: 12px;
      label {
        vertical-align: top;
        font-weight: bold;
      }
      strong {
        color: #660000;
      }
      img {
        position: inherit;
        left: 138px;
      }
      input, #provider_description, #provider_provider_conditions, #provider_address, #copyright_fields {
        width: auto;
        position: absolute;
        top: 0;
        left: 190px;
        border: 1px solid #adadad;
        border-radius: 4px;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
      }
      textarea {
        width: auto;
        height: 94px;
      }
      .form-group.file.optional {
        position: initial;
        input {
          padding: 3px;
        }
      }
      .form-group.boolean.optional.provider_remove_logo {
        position: absolute;
        margin: 0;
        top: 0;
        left: 330px;
        input {
          top: 8px;
          left: 115px;
        }
      }
      #provider_description, #provider_provider_conditions, #provider_address {
        border-color: #ccc;
        border-radius: 4px;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
      }
      #provider_days_keep_per_picture {
        top: 2px;
        left: 242px;
      }
      .cgv {
        text-transform: uppercase;
      }
    }
  }

  #copyright {
    margin-left:1rem;
    width: 65rem;
    strong {
      color: #660000;
    }
    .copyright_group {
      height: 24rem;
    }
    select {
      margin-right: 18px;
      width: 190px;
    }
    select, input {
      border-color: #ccc;
      border-radius: 4px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
    }
  }

  #contacts {
    margin-left: 12px;
    border-top: 1px solid #858585;

    #provider_contact {
      padding-right: 12px;
      #contact {
        border-bottom: dashed 1px #727171;
        margin-bottom: 25px;
        .form-group {
          position: relative;
          padding-left: 12px;
          label {
            font-weight: bold;
          }
          input {
            border: 1px solid #adadad;
            border-radius: 4px;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
          }
          span {
            margin-right: 30px;
          }
        }
        .checked-options {
          div.form-group {
            display: inline-block;
            margin-right: 40px;
          }
        }
      }
    }
  }
}

/* provider_show */

.modal-dialog {
  width: 50%;
  #admin_providers_show {
    img, input {
      margin-left: 20px;
    }
    .label-show {
      font-weight: bold;
    }
    .principals_infos {
      width: 100%;
    }
    #copyright {
      float: none;
      width: 100%;
    }
    #provider_contact {
      .form-group {
        border-top: solid 1px #afafaf;
        padding-top: 8px;
        .first-infos, .second-infos, .principal-contact, .checked-options {
          .label-info {
            margin: 0 5px 0 0;
          }
          .contact-info {
            margin: 0 20px 0 0;
          }
        }
        .checked-options {
          input {
            margin: 0 3px 0 3px;
          }
        }
      }
    }
  }
}

/* Titles form */

#titles_list, #users_list {
  width: 100%;
  label {
    margin-right: 20px;
    font-size: 16px;
    font-weight: bold;
  }
  input, textarea {
    border: solid 1px #ccc;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
  }
  .form-group {
    position: relative;
    input, textarea, select {
      position: absolute;
      left: 290px;
    }
    span {
      input {
        position: inherit;
      }
    }
    .city {
      margin-left: 80px;
    }
    .radios {
      margin-left: 85px;
      input {
        margin-right: 10px;
      }
    }
  }
}

/*Titles show*/

.pw_providers, .pw_local_providers, .pw_photographer_providers, .pw_titles {
  .hidden-accessible {
    display: none;
  }
  .provider-state-active {
    background-color: $pixpalace_red;
    text-shadow: 0 1px 0 $pixpalace_red;
    color:#fff;
    background-image: none;
  }
  .active-hover-state {
    border-color: #fff;
  }
  .inactive-hover-state {
    /* if needed */
  }
}

.pw_remote-tabs {
  padding: 5px 0;
  clear: both;
  ul.nav-tabs > li {
    margin: 0 5px 0 0;
    a {
      padding: 0.5em 1em;
      background-color: $bootstrap_primary_blue;
      color: #fff;
      /* font-weight: bold; */
    }
  }
  .nav-tabs > .active > a,
  .nav-tabs > .active > a:hover,
  .nav-tabs > .active > a:focus{
    cursor: auto;
    //color: $pixpalace_red;
    color: #fff;
    background-color: $bootstrap_primary_blue_hover;
    //text-decoration: underline;
  }
  .nav-tabs :hover{
    cursor: auto;
    color: #fff;
    background-color: $bootstrap_primary_blue_hover;
  }
  .tab-content.panel-body{
    //padding: 5px;
    color: #333;
    @include none-radius;
  }
  .tab-pane {
    padding: 8px;
    margin-bottom: 1rem;
    @include all-but-left-radius;
  }
}

.pw_title_panel {
  padding: 5px 0;
  clear: both;
  ul.nav-tabs > li {
    margin: 0 5px 0 0;
    a {
      font-size: 0.9em;
      padding: 0.5em 1em;
      background-color: $bootstrap_primary_blue;
      color: #fff;
      /* font-weight: bold; */
    }
  }
  .nav-tabs > .active > a,
  .nav-tabs > .active > a:hover,
  .nav-tabs > .active > a:focus{
    cursor: auto;
    //color: $pixpalace_red;
    color: #fff;
    background-color: $bootstrap_primary_blue_hover;
    //text-decoration: underline;
  }
  .nav-tabs :hover{
    cursor: auto;
    color: #fff;
    background-color: $bootstrap_primary_blue_hover;
  }
}

.tab-content {
  #provider_sets, .tab-pane > div {
    float: left;
  }

  #provider_group_name_id{
    width: 230px;
    @include full-radius;
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    font-weight: normal;
  }

  #pw_groups_menu {
    margin-left: 10px;

    .button_to {
      margin-right: 5px;
    }
  }

  #cancel_button {
    margin-left: 6px;
    margin-top: 2px;
  }

  .btn_cancel,.btn_submit {
    border: none;
    height: 3rem;
    width: 10rem;
    margin: 1.5rem 1.5rem 1.5rem 0;
    border-radius: 0.3rem;
    font-weight: bold;
    font-size: 1.2rem;
  }

  .btn_cancel{
    background-color: $main_grey_border;
  }

  .btn_submit{
    background-color: $pixpalace_red;
    color: #fff;
  }
}

#edittitlemodal .form-horizontal .control-label, #edittitlemodal .radio,
#editusermodal .form-horizontal .control-label,
#newusermodal .form-horizontal .control-label{
  padding: .2rem .4rem;
  margin-right: .4rem;
  font-weight: bold;
}

/* Comm frames */
.comm_frames_show {
  width: 100%;
  border: 1px solid $main_grey_border;
  border-width: 0 0 1px 0;
  padding: 2rem .5rem;

  img{
    max-width: 690px;
    max-height: 312px;
    outline: 1px dashed $main_light_grey_bg;
    display: block;
  }

  h3 {
    font-size: 1.75rem;
  }

  h5 {
    font-size: 1.25rem;
  }

  h4,h5 {
    margin-right: 2rem;
  }

  form,h5{
    display: inline;
  }

  h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: .5rem;
  }

  input[type=file]{
    display: inline;
  }

}