/** Custom plugin styles **/
#settings_text_formatting option[value=textile] {
  display: none !important;
}

body.controller-settings #tab-mail_handler,
body.controller-settings #tab-repositories,
body.controller-my #pref_toolbar_language_options,
#project_enabled_module_names_repository {
  display: none !important;
}

tr.permission-view_changesets,
tr.permission-browse_repository,
tr.permission-commit_access,
tr.permission-manage_related_issues,
tr.permission-manage_repository {
  display: none !important;
}

div.tabs #tab-repositories {
  display: none !important;
}

#module_repository {
  display: none !important;
}

/* Hide the containers of the elements hidden above, replacing the former
   jQuery .parent()/.prev() calls in custom.js so no empty rows/labels remain. */
body.controller-settings li:has(> #tab-mail_handler),
body.controller-settings li:has(> #tab-repositories),
body.controller-my p:has(> #pref_toolbar_language_options),
label:has(> #project_enabled_module_names_repository),
#tab-content-projects label:has(> input[value="repository"]),
tr:has(+ tr.permission-view_changesets) {
  display: none !important;
}


@media only screen and (max-width: 900px) {
  a.float-new {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
    background-color: #05A418;
    color: #ffffff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
  }

  a.float-new:hover {
    text-decoration: none;
  }

  /* Tabler "plus" icon rendered by the custom-branding controller. */
  a.float-new svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
  }
}

@media only screen and (min-width: 900px) {
  a.float-new {
    display: none;
  }
}


#header, #custom_color_preview  {
  background: #FFFFFF;
}

#top-menu {
  background: #393d3d;
}

#custom_color_preview {
  width: 100%;
}

#header {
  padding-left: 20px;
  padding-right: 20px;

  h1 {
    min-height: 3.7ex;
    padding-left: 48px;
    background: none;
    background-image: url("/assets/plugin_assets/redmine_custom/logo-877d1603.svg");
    background-size: 36px;
    background-repeat: no-repeat;
    background-position: 0 6px;
    color: white;
  }
}

@media screen and (max-width: 899px) {
  #header{
    padding-right: 0px;
  }
}

/* Prevent padding to be overriden by the bleuclair theme */
@media screen and (max-width: 899px) {
  .flyout-menu__search input[type='text'] {
    padding-left: 25px !important;
  }
}

#content {
  padding: 20px;

  div.issue {
    background: unset;
    padding: 0px;
    border: none;
  }

  div.box {
    background: unset;
    border: 1px solid #e5e5e5;
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .tabs {
    margin-bottom: 0px;
  }

  .tab-content {
    padding: 1.2em;
  }
}

@media screen and (max-width: 899px) {
  #main.nosidebar #content, div#content {
    padding: 15px;

    fieldset {
      padding-left: 0px;
      padding-right: 0px;
    }

    div.box, .mypage-box {
      background-color: unset;
      border: 0px;
      padding: 5px 2px 2px 2px;
    }

    fieldset.box{
      background-color: unset;
      border: none;
      padding-top: 5px;

      legend {
        font-weight: bold;
        text-decoration: underline;
      }
    }
  }
}

@media screen and (max-width: 899px) {
  #content>.contextual>a, #content>.contextual .drdn, p.buttons a {
    padding: 5px 5px 5px 5px;
  }
}

#custom_logo_preview {
  width: 64px;
  height: 64px;
  background-image: url("/assets/plugin_assets/redmine_custom/logo-877d1603.svg");
  background-size: 36px;
  background-repeat: no-repeat;
  background-position: 12px 15px;
}

/* workaround to always show the notes field */
#update {
  display: block !important;

  .box {
    padding: 0px !important;
  }

  .edit_issue fieldset {
    background: unset;
    border: none;
  }
}

#update > h3 {
  display: none;
}

#update div.box fieldset {
  display: none;
}

#update div.box fieldset {
  legend {
    font-weight: bold;
  }
}

#update div.box fieldset#add_notes {
  display: block;
}

/* Don't hide the description field in edit mode */
label[for="issue_description"] + a {
  display: none !important;
}

#issue_description_and_toolbar {
  display: initial !important;
}
