/**
 * Copyright 2018 Klarna Bank AB (publ)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @category   Klarna
 * @package    Klarna_Kco
 * @author     Jason Grim <jason.grim@klarna.com>
 */
/**
 * Klarna checkout CSS
 */


.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

#klarna-checkout-container {
  width: 100%;
}

/* Sidebar */
#checkout_summary * {
  text-transform: none;
}

#checkout_summary input[type=email],
#checkout_summary input[type=search],
#checkout_summary input[type=password],
#checkout_summary input[type=tel],
#checkout_summary input[type=text] {
  width: 100%;
}

#checkout_summary input.qty {
  width: 56px;
}

#checkout_summary .text-center {
  text-align: center;
}

#checkout_summary a.apply {
  cursor: pointer;
}

#checkout_summary .checkout-summary-widget {
  padding: .375rem 0;
}

#checkout_summary #summary_cart_table {
  width: 100%;
}

#checkout_summary #summary_shipping ul.shipping-rates {
  -webkit-column-count: 2;
  /* Chrome, Safari, Opera */
  -moz-column-count: 2;
  /* Firefox */
  column-count: 2;
  -webkit-column-gap: .5rem;
  /* Chrome, Safari, Opera */
  -moz-column-gap: .5rem;
  /* Firefox */
  column-gap: .5rem;
}

#checkout_summary #summary_shipping ul.shipping-rates li {
  padding: .125rem;
}

#checkout_summary #shopping-cart-totals-table {
  border-spacing: 10px;
  border-collapse: separate;
  width: 100%;
}

.bottom-totals-wrap .a-right {
  text-align: left !important;
}

.bottom-totals-wrap .block-title {
  display: none;
}

.bottom-totals-wrap #summary_coupon {
  background: #eee;
  display: flex;
  align-items: center;
}

.bottom-totals-wrap #summary_coupon>* {
  flex: 1;
}

#checkout_summary .input-group {
  margin: 1em auto;
  max-width: 25rem;
  text-align: center;
  padding: 0;
}

#checkout_summary .input-group input {
  display: inline-block;
  height: 1.875rem;
  padding: 0 .5rem;
  border: .0625rem solid silver;
  font-size: .9375rem;
  width: calc(100% - 5rem);
}

#checkout_summary .input-group button {
  display: inline-block;
  height: 1.875rem;
  margin-left: -.375rem;
  padding: .375rem .9375rem;
  background: #3399cc;
  font-size: .8125rem;
  color: white;
  cursor: pointer;
  user-select: none;
  border: none;
  vertical-align: top;
}

#checkout_summary .input-group button:hover {
  background: #2e8ab8;
}

#checkout_summary .input-group button:active {
  background: #297aa3;
}

.bottom-totals-wrap {
  flex-wrap: wrap;
}

.bottom-totals-wrap>div {
  width: 50%;
}

.bottom-totals-wrap>.block-countries {
  width: 100%;
}

.kco-block {
  max-width: 640px;
  margin: auto;
}

.kco-block .input-box {
  position: relative;
}

.kco-block .input-box label {
  position: absolute;
  font-size: .85em;
  font-weight: 400;
  color: #787471;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  left: 15px;
}

.kco-block .input-box select+label,
.kco-block .input-box input.filled+label,
.kco-block .input-box input:focus+label {
  top: 15px;
  line-height: 1;
  font-size: 12px;
}

.kco-block .block-content {
  padding: 32px 15px 10px;
}

.kco-block input,
.kco-block select {
  border: 1px solid #bfbfbf;
  border-radius: 5px;
  height: 45px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  font-weight: 500;
  color: #17120f;
  font-size: 13px;
  width: 100%;

  line-height: 15px;
  -webkit-appearance: none;
  appearance: none;

}

.kco-block .form-list .input-box select {
  padding: 20px 0 0 15px;
  background-position: calc(100% - 20px) center;
}

/* Checkout loading spinner */
.klarna-loader {
  position: fixed;
  z-index: 999;
  height: 2em;
  width: 2em;
  overflow: show;
  margin: auto;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.klarna-loader:before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.81);
}

.klarna-loader:not(:required) {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}

.klarna-loader:not(:required):after {
  content: '';
  display: block;
  font-size: 10px;
  width: 1em;
  height: 1em;
  margin-top: -0.5em;
  -webkit-animation: spinner 1500ms infinite linear;
  -moz-animation: spinner 1500ms infinite linear;
  -ms-animation: spinner 1500ms infinite linear;
  -o-animation: spinner 1500ms infinite linear;
  animation: spinner 1500ms infinite linear;
  border-radius: 0.5em;
  -webkit-box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.5) -1.5em 0 0 0, rgba(0, 0, 0, 0.5) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
  box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
}

/* Animation */
@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@-moz-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@-o-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}


/* MEDIA QUERIES */


@media screen and (max-width: 767px) {
  .bottom-totals-wrap>div {
    width: 100%;
    flex: auto;
  }
}
