/* Resource List */

ol.resources-container-no-title {
  margin-top: 35px;
}

ol.resources-container {
  margin-top: 0px;
}

.resource-level-description {
  font-size: 12px;
  color: #878787;
  font-weight: normal;
  display: block;
  margin-top: 5px;
  width: 98%;
}

.resource-with-description {
  margin-bottom: 9px;
}

.resource-response-jump {
  margin-top: 50px;
  position: absolute;
  margin-left: 10px;
}

.resource-menu {
  list-style: none;
  padding-left: 0px;
  margin-top: -5px;
}

.resource-description {
  border-bottom: 1px solid $color-console-border;

  div {
    padding: 17px;
    background: $color-resource-description-bg;

    h3 {
      font-size: 12px;
      margin: 0 0 11px;
    }

    p {
      font-size: 12px;
    }
  }
}

.resource-menu-item {
  padding-left: 0 !important;
  height: 48px;
  margin-top: 5px;

  button.button-is-active {
    border-radius: 0 !important;
    background: $color-console-response-status !important;
    border-right: 0;
    height: 48px;
    border-top: 1px $color-gray-dark solid !important;
    border-right: 0 !important;
    width: 51px;
  }

  button.button-is-active.resource-menu-btn-2xx {
    border-left: 3px green solid !important;
    border-top: 1px green solid !important;
    border-bottom: 1px green solid !important;
  }

  button.button-is-active.resource-menu-btn-3xx {
    border-left: 3px yellow solid !important;
    border-top: 1px yellow solid !important;
    border-bottom: 1px yellow solid !important;
  }

  button.button-is-active.resource-menu-btn-4xx {
    border-left: 3px coral solid !important;
    border-top: 1px coral solid !important;
    border-bottom: 1px coral solid !important;
  }

  button.button-is-active.resource-menu-btn-5xx {
    border-left: 3px red solid !important;
    border-top: 1px red solid !important;
    border-bottom: 1px red solid !important;
  }

  button:focus {
    outline: none;
  }
}

.resource-menu-button {
  border-radius: 0 !important;
  border: 0 !important;
  height: 48px !important;
  background: $color-flag-bg !important;
  border-top: 1px $color-gray-dark solid !important;
  border-left: 3px $color-gray-dark solid !important;
  border-bottom: 1px $color-gray-dark solid !important;
}

.resource-menu-btn-2xx {
  color: green !important;
}

.resource-menu-btn-3xx {
  color: yellow !important;
}

.resource-menu-btn-4xx {
  color: coral !important;
}

.resource-menu-btn-5xx {
  color: red !important;
}

.resource-list {
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 0;

  list-style: none;
}

.resource-list-root {
  border-top: 1px solid $color-console-border;
}

.resource-list-item.is-active + .resource-list-item {
  border-top: 1px solid $color-console-border;
}

/* Resource Items */

.resource {
  position: relative;

  display: flex;
  flex-wrap: wrap;
  min-height: 50px;
  padding-left: 20px;
  border-bottom: 1px solid $color-console-border;

  // transition: 0.3s ease all;

  @media only screen and (min-width: $large-screen) {
    padding-left: 24px;
  }

  @media only screen and (min-width: $large-screen) {
    min-height: 50px;
    padding-left: 32px;
  }

  &.is-active {
    min-height: 50px;
    margin: 10px 0 0;
    border-color: $color-resource-path-active-border;

    background: $color-resource-path-active-bg;

    @media only screen and (min-width: $medium-screen) {
      border-radius: 5px 5px 0 0;
    }
  }
}

.resource-path-container {
  flex-grow: 1;
  padding: 6px 0;

  @media only screen and (min-width: $medium-screen) {
    padding-top: 11px;
  }

  @media only screen and (min-width: $large-screen) {
    padding-top: 16px;
  }
}

.resource-root .resource-path-container {
  @media only screen and (min-width: $medium-screen) {
    padding-top: 9px;
  }

  @media only screen and (min-width: $large-screen) {
    padding-top: 11px;
  }
}

.resource.is-active .resource-path-container {
  padding-top: 11px;
}

.resource-root.is-active .resource-path-container {
  @media only screen and (min-width: $medium-screen) {
    padding-top: 11px;
  }

  @media only screen and (min-width: $large-screen) {
    padding-top: 11px;
  }
}

.resource-close-btn {
  position: absolute;
  top: 3px;
  right: 4px;

  display: none;
  padding: 0 18px 0 3px;
  border-radius: 5px;
  border: none;

  background: transparent;
  color: $color-resource-close;
  font-size: 10px;
  text-transform: uppercase;
  transition: 0.2s ease color;

  &:before {
    content: "\00d7";

    position: absolute;
    top: -2px;
    right: 3px;
    border: none;

    font-size: 18px;
    font-weight: 900;
    line-height: 1;
  }

  &:hover {
    color: $color-resource-close-bg-hover;
  }
}

.resource-list-root > .resource-list-item.is-active + .resource-list-item {
  border-top: 0;
}

.resource.is-active + .resource-list {
  border-top: 1px solid $color-console-border;
}

.resource.is-active .resource-path-active {
  color: $color-resource-path-active;
  // transition: 0.3s ease all;
}

.resource-trait {
  display: none !important;
}

.resource.is-active .resource-trait {
  display: inline-block !important;
}

.resource.is-active .resource-close-btn {
  display: block;
}

.resource.is-active .resource-root-toggle {
  display: none;
}

.resource-root-toggle {
  position: absolute;
  top: 2px;
  left: -2px;

  display: block;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;

  background: transparent;
  opacity: 0.25;
  transition: 0.2s ease transform, 0.2s ease opacity;

  &:focus {
    outline: none;
  }

  &.is-active {
    transform: rotate(-90deg);
  }

  &:before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 0;
    height: 0;
    margin-top: -2.5px;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: $color-console-toggle;
  }

  &:hover {
    opacity: 1;
  }

  @media only screen and (min-width: $medium-screen) {
    top: 8px;
  }

  @media only screen and (min-width: $large-screen) {
    top: 13px;
    left: 0;

    &:before {
      margin-top: -3.5px;
      margin-left: -7px;
      border-width: 7px;
    }
  }
}

.resource-section-title {
  display: inline-block;
  margin: 0;
  margin-right: 4px;

  color: #b9b9b9;
  font-size: 10px;

  @media only screen and (min-width: $medium-screen) {
    font-size: 15px;
  }

  @media only screen and (min-width: $large-screen) {
    font-size: 18px;
  }

  @media only screen and (min-width: $medium-screen) {
    margin-right: 15px;
  }

  @media only screen and (min-width: $medium-screen) {
    font-size: 18px;
  }
}

a.resource-path-active {
  cursor: pointer;
}

.resource-heading-hover:hover {
  cursor: pointer;
  background-image: linear-gradient(to top, rgba(255,255,255,0) 1px, #999 2px, rgba(255,255,255,0) 1px);
}

.resource-heading {
  // font-family: 'Source Code Pro';
  display: inline-block;
  margin: 0;
  margin-right: 4px;

  color: #b9b9b9;
  font-size: 10px;

  // .resource:not(.is-active) &:hover {
  //   background-image: linear-gradient(to top, rgba(255,255,255,0) 1px, #999 2px, rgba(255,255,255,0) 1px);
  // }

  @media only screen and (min-width: $medium-screen) {
    margin-right: 15px;
  }

  @media only screen and (min-width: $medium-screen) {
    font-size: 18px;
  }
}

.resource-heading-large {
  // font-family: 'Source Code Pro';
  font-size: 10px;

  @media only screen and (min-width: $medium-screen) {
    font-size: 15px;
  }

  @media only screen and (min-width: $large-screen) {
    font-size: 18px;
  }
}

.flag-list {
  font-size: 0;
}

.flag-list .flag {
  margin-left: 10px;
}

.flag {
  display: inline-block;

  padding: 2px 8px;
  border: 1px solid $color-console-flag-border;
  border-radius: 5px;

  background: $color-console-flag-bg;
  color: $color-console-flag-text;
  font-size: 12px;
}

.resource-heading-flag {
  position: relative;
  top: -1px;

  padding: 0px 3px;
  border-radius: 3px;

  background: $color-console-flag-bg;

  @media only screen and (min-width: $medium-screen) {
    top: -2px;

    padding: 2px 8px;
    border-radius: 5px;
  }
}

.resource-heading-flag-root {
  @media only screen and (min-width: $medium-screen) {
    top: -3px;
  }
}

.flag b {
  color: $color-console-flag-text-b;
}

.resource-path-active {
  color: $color-console-heading-text;
}

.resource-proxy {
  position: absolute;
  right: 5px;
  color: $color-sidebar-subheader-text;
  font-size: 13px;
  margin-bottom: 5px;
  z-index: 1;

  a {
    color: $color-sidebar-subheader-text;
  }

  a:visited {
    color: $color-sidebar-subheader-text;
  }
}

.resource-no-baseuri {
  background-color: red;
  margin-top: -1px;
  font-family: Lato;
  font-size: 13px;
  padding: 3px;
  color: white;
  text-align: center;
  text-rendering: optimizeLegibility;
}
