/* Login page is standalone, all related CSS is here */

*,
:after,
:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: RedHatText, Helvetica, Arial, sans-serif;
  background-color: #333;
  color: #fff;
  line-height: 1.5;
}

.btn,
label {
  font-weight: 600;
}

.btn,
img {
  vertical-align: middle;
}

#login-wait-validating div,
.col-xs-12 {
  float: left;
}

#option-group,
.btn,
.cross,
button {
  cursor: pointer;
}

#option-group svg,
.cross {
  opacity: .7;
}

a {
  color: inherit;
  text-decoration: none;
}

.btn:focus,
a:focus {
  outline: -webkit-focus-ring-color auto 5px;
  outline: dotted thin;
  outline-offset: -2px;
}

a:active,
a:hover {
  outline: 0;
}

a:focus,
a:hover {
  color: #fff;
  text-decoration: underline;
}

img {
  border: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

button {
  -webkit-appearance: button;
  overflow: visible;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

p {
  margin: 0 0 10px;
}

.container {
  margin-right: auto;
  margin-left: auto;
}

#option-group {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
#server-group {
  margin-top: -1rem;
  margin-bottom: 2rem;
}

.container:after,
.container:before,
.form-group:after,
.form-group:before,
.row:after,
.row:before {
  content: " ";
  display: table;
}

.container:after,
.row:after {
  clear: both;
}

.col-lg-5,
.col-lg-7,
.col-md-10,
.col-md-2,
.col-md-6,
.col-sm-1,
.col-sm-10,
.col-sm-12,
.col-sm-2,
.col-sm-3,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-xs-12 {
  position: relative;
  min-height: 1px;
  padding-left: 20px;
  padding-right: 20px;
}

.col-xs-12 {
  width: 100%;
}

label {
  display: inline-block;
}

#option-group,
.control-label {
  font-size: 0.875rem;
}

[role=form] .control-label,
form .control-label {
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.form-control {
  color: #151515;
}

.form-control[type=password],
.form-control[type=text] {
  display: block;
  width: 100%;
  padding: 0.25rem 0.5rem;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ededed;
  border-bottom-color: #72767b;
  border-radius: 1px;
  transition: border-color .15s ease-in-out;
  color: #151515;
}

.form-control[type=password]:hover,
.form-control[type=text]:hover,
.form-control[type=password]:focus,
.form-control[type=text]:focus {
  border-bottom-color: #06c;
}

.form-control[type=password]:focus,
.form-control[type=text]:focus {
  padding-bottom: calc(0.25rem - 1px);
  border-bottom-width: 2px;
}

.form-control:focus {
  outline: 0;
}

.form-control:-moz-placeholder {
  color: #999;
  font-style: italic;
}

.form-control::-moz-placeholder {
  color: #999;
  font-style: italic;
  opacity: 1;
}

.form-control:-ms-input-placeholder {
  color: #999;
  font-style: italic;
}

.form-control::-webkit-input-placeholder {
  color: #999;
  font-style: italic;
}

.checkbox-row {
  margin: 1rem 0 0;
  display: flex;
  align-items: baseline;
}

.checkbox-row > input[type=checkbox] {
  width: 16px;
  height: 16px;
  align-self: start;
  margin-top: calc((1.5rem - 16px) / 2);
  margin-right: 0.5rem;
}

label.checkbox {
  font: inherit;
}



.help-block {
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #737373;
}

.btn,
.caret {
  display: inline-block;
}

#login-button[disabled] .spinner {
  display: inline-flex;
}

.btn,
.control-label {
  margin-bottom: 0;
}

.control-label {
  margin-top: 0;
  padding-top: 3px;
}

.form-group:after {
  clear: both;
  margin-bottom: 15px;
}

.btn {
  text-align: center;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 1px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.btn:focus,
.btn:hover {
  color: #4d5258;
  text-decoration: none;
}

.btn:active {
  outline: 0;
  background-image: none;
}

@-ms-viewport {
  width: device-width;
}

.btn {
  padding: 0.25rem 0.5rem;
  border-radius: 1px;
  font-size: inherit;
}

.btn-primary {
  background-color: #06c;
  border-color: #06c;
  color: #fff;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:hover {
  background-color: #004080;
  border-color: #004080;
  color: #fff;
}

.btn-primary:active {
  background-image: none;
}

@font-face {
  font-family: RedHatText;
  font-style: normal;
  font-weight: 400;
  src: url(cockpit/static/fonts/RedHatText-Regular.woff2) format('woff2');
}

@font-face {
  font-family: RedHatText;
  font-style: normal;
  font-weight: 700;
  src: url(cockpit/static/fonts/RedHatText-Medium.woff2) format('woff2');
}

.login-pf {
  height: 100%;
}

.login-pf #brand {
  position: relative;
  top: -70px;
}

.login-pf #brand img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.login-pf #badge {
  display: block;
  margin: 20px auto 70px;
  position: relative;
  text-align: center;
}

.login-pf .container {
  background-color: rgba(255, 255, 255, .055);
  clear: right;
  padding-bottom: 40px;
  padding-top: 20px;
  width: auto;
}

.login-pf .container .details p:first-child {
  border-top: 1px solid #474747;
  padding-top: 25px;
  margin-top: 25px;
}

.login-pf .container .details p {
  margin-bottom: 2px;
}

.login-pf .container .control-label {
  font-weight: 400;
}

.login-pf .container .help-block {
  color: #fff;
}

.login-pf .container .form-group:last-child,
.login-pf .container .form-group:last-child .help-block:last-child {
  margin-bottom: 0;
}

.spinner {
  -webkit-animation: .6s linear infinite rotation;
  animation: .6s linear infinite rotation;
  border-bottom: 4px solid rgba(0, 0, 0, .25);
  border-left: 4px solid rgba(0, 0, 0, .25);
  border-right: 4px solid rgba(0, 0, 0, .25);
  border-radius: 100%;
  border-top: 4px solid rgba(0, 0, 0, .75);
  height: 1.5rem;
  width: 1.5rem;
  position: relative;
  margin: 0.25rem 1rem;
}

.alert {
  padding: 7px 11px;
  margin-bottom: 20px;
  border: 2px solid transparent;
  border-radius: 1px;
}

.alert-danger {
  background: #c00;
  border-color: #c00;
  color: #fff;
  font-weight: 700;
}

#server-group:before {
  clear: both;
  margin-top: 5px;
}

.login-fatal {
  font-size: 130%;
}

.unsupported-browser ul {
  color: #aaa;
  display: inline-block;
  margin: 0 auto;
  text-align: left;
}

.unsupported-browser a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.cross,
.inline .container .help-block {
  color: #000;
}

.login-browser-recommendations {
  margin-top: 6rem;
}

.caret,
.server-box {
  position: relative;
}

.conversation-prompt {
  white-space: normal;
  word-wrap: break-word;
}

.control-label {
  white-space: nowrap;
}

.spinner {
  border-color: rgba(255, 255, 255, .75) rgba(255, 255, 255, .25) rgba(255, 255, 255, .25);
}

#login-button .spinner,
#login-button[disabled] #login-button-text,
.hide-before:before {
  display: none;
}

/* Hide inline login screen by default */
.inline #badge,
.inline #brand,
.inline #login-details {
  display: none;
}

.inline body {
  background: 0 0!important;
  color: #000;
}

.caret {
  top: 4px;
}

.caret-down {
  -moz-transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  -moz-transform-origin: 8px 8px;
  -webkit-transform-origin: 8px 8px;
  transform-origin: 8px 8px;
}

.cross {
  align-items: center;
  bottom: 0;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  position: absolute;
  /* 20px = padding of col-* */
  right: 20px;
  top: 0;
  width: 2rem;
}

#option-group:hover svg,
.cross:hover {
  opacity: 1;
}

#option-group div {
  margin-left: -3px;
  margin-top: 3px;
  margin-bottom: 10px;
}

#login-button {
  padding: 7px;
}

#login-button[disabled] {
  padding: 0;
  background-color: #333;
  background-image: none;
  border-color: #555;
}

/*** Media breakpoints ***/

/** Bootstrap breakpoints **/

@media (min-width: 1024) {
  .container { width: 760px; }

  .col-sm-1,
  .col-sm-10,
  .col-sm-12,
  .col-sm-2,
  .col-sm-3,
  .col-sm-5,
  .col-sm-6,
  .col-sm-7 {
    float: left;
  }

  .col-sm-12 {
    width: 100%;
  }

  .col-sm-10 {
    width: 83.33333333333334%;
  }

  .col-sm-7 {
    width: 58.333333333333336%;
  }

  .col-sm-6 {
    width: 50%;
  }

  .col-sm-5 {
    width: 41.66666666666667%;
  }

  .col-sm-3 {
    width: 25%;
  }

  .col-sm-2 {
    width: 16.666666666666664%;
  }

  .col-sm-1 {
    width: 8.333333333333332%;
  }

  .col-sm-offset-2 {
    margin-left: 16.666666666666664%;
  }
}

@media (min-width: 1024px) {
  .container {
    width: 980px;
  }

  .col-md-10,
  .col-md-2,
  .col-md-6 {
    float: left;
  }

  .col-md-10 {
    width: 83.33333333333334%;
  }

  .col-md-6 {
    width: 50%;
  }

  .col-md-2 {
    width: 16.666666666666664%;
  }

}

@media (min-width: 1200px) {
  .container {
    width: 1180px;
  }

  .col-lg-5,
  .col-lg-7 {
    float: left;
  }

  .col-lg-7 {
    width: 58.333333333333336%;
  }

  .col-lg-5 {
    width: 41.66666666666667%;
  }

}

/** Cockpit-specific media breakpoints **/

/* Optimize for mobile phones in portrait mode */
@media (max-width: 480px) {

  .unsupported-browser .container > .row > .col-sm-12 {
    position: static;
  }

  .login-pf {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
    position: relative;
  }

  .row {
    display: flex;
    flex-direction: column;
  }

  .login-pf .container {
    width: 100%;
  }

  .login-pf #badge {
    max-width: 33vw;
    margin: 3rem auto;
    height: 8rem;
    padding: 0;
    background-position: 50% 100%;
  }

  /* Brand container */
  .container > .row > .col-sm-12 {
    order: 1;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
  }

  .login-pf #brand {
    position: static;
    font-size: inherit;
    background-position: 50% 50%;
  }

  .details {
    text-align: center;
  }

}

/* Large phones and desktops */
@media (min-width: 481px) {

  .brand-unsupported-browser #brand {
    margin-left: -40px;
    position: absolute;
    text-align: center;
    width: 100%;
  }

  .unsupported-browser {
    font-size: 140%;
    /*
    There's 80px on the left and 20px on the side for the login container.
    We'll center with a workaround to pull the box (80px - 20px) / 2 = 30px left
     */
    margin-left: -30px;
    text-align: center;
  }

  .unsupported-browser-heading {
    font-size: 3rem;
    left: 50%;
    /* Pull the H2 half the width to the left to center */
    margin: 0 0 0 -32rem;
    position: absolute;
    text-align: center;
    top: -16rem;
    width: 64rem;
  }

  .login-browser-recommendations h3 {
    font-weight: 400;
    margin-top: 0;
  }

}

/* Desktop only */
@media (min-width: 1024px) {

  .control-label {
    text-align: right;
  }

  [role=form] .control-label,
  form .control-label {
    justify-content: end;
    padding: 0;
  }

  .login-pf #brand img {
    margin: 0;
    text-align: left;
  }

  .login-pf #badge {
    float: right;
    margin-right: 64px;
    margin-top: 50px;
  }

  .login-pf .container {
    bottom: 13%;
    padding-left: 80px;
    position: absolute;
    width: 100%;
  }

  .login-pf .container .login-area {
    border-right: 1px solid #474747;
  }

  .login-pf .container .details {
    padding-left: 40px;
  }

  .login-pf .container .details p:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }

}

/* Animation */

@-webkit-keyframes rotation {
  from {
    -webkit-transform: rotate(0);
  }

  to {
    -webkit-transform: rotate(359deg);
  }
}

@keyframes rotation {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(359deg);
  }
}

/* PF4-ish style overrides (depending on grid & CSS variables */

@supports (display: grid) {
  [class*=col-] {
    padding: 0;
  }

  .col-sm-12 {
    padding: 3rem 3rem 0;
  }

  .row {
    display: flex;
    flex-flow: column;
    margin: 0;
  }

  body.login-pf {
    color: #151515;
    display: grid;
    grid-template-columns: 34rem minmax(34rem, auto);
    grid-template-areas: "login" "logo";
    grid-template-columns: 1fr;
    grid-template-rows: minmax(min-content, max-content);
    background-position: 0 0 !important;
    height: 100vh;
    grid-gap: 0 4rem;
    padding: 0;
  }

  .login-pf .container .details p:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .container > .row > .col-sm-12 {
    order: inherit;
    position: static;
    text-align: left;
  }

  .login-button-container {
    width: 100%;
    float: none;
  }

  .login-pf .container {
    position: static;
    background: white;
    color: #333;
    grid-area: login;
    margin: 0;
    padding: 0;
  }

  .login-pf #badge {
    grid-area: logo;
    margin: 0 !important;
  }

  .login-pf .container .login-area {
    border: none;
    width: auto;
    padding: 0 3rem 1.5rem;
  }
  .login-pf .container .details {
    padding: 1.5rem 3rem;
    width: auto !important;
    background: #ededed;
  }

  .login-pf #brand {
    font-size: 1.75rem;
    line-height: 1.3;
    padding: 0 0 2rem;
    position: static;
    text-transform: initial;
  }

  .unsupported-browser a,
  a {
    color: #06c;
  }

  .unsupported-browser a:focus,
  .unsupported-browser a:hover,
  a:focus,
  a:hover {
    color: #004080;
  }

  .caret polygon {
    fill: #06c;
  }

  [role=form] .col-md-10,
  form .col-md-10 {
    display: flex;
  }

  .cross {
    right: 0;
  }

  /* Mobile-specific */
  @media (max-width: 1023px) {
    body.login-pf {
      justify-items: center;
    }
  }

  /* Desktop-specific */
  @media (min-width: 1024px) {
    .container::before {
      background: rgba(0,0,0, 0.3);
      content: "";
      position: absolute;
      height: 100%;
      width: 370px;
      top: 0;
      left: 0;
      z-index: -1;
    }

    body.login-pf {
      grid-template-areas: ". . . ." ". login logo ." ". . . . ";
      grid-template-rows: 1fr minmax(min-content,max-content) 1fr;
      grid-template-columns: minmax(0, 2.125rem) 35rem 1fr minmax(0, 2.125rem);
    }

    .form-group .form-control {
      margin-left: 1rem;
    }
  }

  body.login-pf.brand-unsupported-browser {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
  }

  .unsupported-browser {
    padding: 2rem;
    margin: 0;
    font-size: inherit;
  }

  .unsupported-browser ul {
    color: #555;
    margin: 0 0 2rem;
  }

  .login-browser-recommendations {
    margin: 0;
    display: flex;
    justify-content: space-around;
  }
}