.carrier-agents {
  margin-top: 10px;
}

.carrier-agent {
  background-repeat: no-repeat;
  background-position: right center;
  min-height: 40px;
  font-size: 0.8em;
  padding-right: 100px;
  padding-left: 20px;
  margin-bottom: 10px;
  white-space: nowrap;
}

.carrier-agent * {
  padding: 0;
  margin: 0;
  text-indent: 0;
}

.carrier-agent-input,
.carrier-agent-info {
  display: inline-block;
  vertical-align: top;
}

.carrier-agent-info {
  white-space: normal;
}

.carrier-agent-input input[type="radio"] {
  display: inline !important;
}

.carrier-agent-address {
  color: #686868;
  font-size: 0.8em;
}

/**
 * Pickup agents rendered with postcode search form
 */
#carrier-agent-heading {
  margin: 20px 0 20px;
}

.woo-carrier-agents-postcode-input-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.woo-carrier-agents-postcode-input-wrapper input[type="text"] {
  float: none;
  flex: none;
  margin: 0 0.25em 0 0;
  width: auto;
  max-width: 120px;
}

.woo-carrier-agents-postcode-input-wrapper a {
  display: block !important;
  flex: none;
  min-height: auto !important;
  width: auto !important;
}

#woo-carrier-agents-container {
  border: 1px solid #e3e3e3;
  border-radius: 5px;
  margin: 10px 0 20px;
  position: relative;
}

#woo-carrier-agents-container .woo-carrier-agents-error-msg {
  display: none;
  text-align: center;
  color: #c92a2a;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 20px;
}

#woo-carrier-agents-container.has-error .woo-carrier-agents-error-msg {
  display: block !important;
}

#woo-carrier-agents-container #woo-carrier-agents-throbber {
  position: absolute;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.75) url("../img/throbber.gif") no-repeat center center;
  top: 0;
  left: 0;
}

#woo-carrier-agents {
  margin-bottom: 5px;
}

#woo-carrier-agents .woo-carrier-agent {
  border-bottom: 1px solid #e3e3e3;
  font-size: 0.8em;
  padding: 5px 15px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0;
  line-height: 1.5;
}

#woo-carrier-agents .woo-carrier-agent:hover {
  background: #f5f5f5;
}

#woo-carrier-agents .woo-carrier-agent.active:hover, #woo-carrier-agents .woo-carrier-agent.active {
  background: #e8f7ff;
}

#woo-carrier-agents .woo-carrier-agent:after {
  content: "";
  display: table;
  clear: both;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-name {
  font-weight: bold;
  cursor: pointer;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-radio {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-logo {
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: end;
  align-items: center;
  /* Wide but short logos */
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-logo img {
  flex: none;
  align-self: center;
  display: block;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-logo.woo-carrier-agent-logo-postnord, #woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-logo.woo-carrier-agent-logo-pakettipiste, #woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-logo.woo-carrier-agent-logo-schenker {
  width: 64px;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-info {
  overflow: hidden;
}

#woo-carrier-agents .woo-carrier-agent .woo-carrier-agent-info .woo-carrier-agent-address {
  color: #686868;
}

.carrier-agents-postcode-search #woo-carrier-agents-displaying-all {
  color: #686868;
  text-align: center;
  font-size: 0.8em;
  margin: 10px 0;
}

.carrier-agents-postcode-search #woo-carrier-agents-show-more {
  display: block;
  text-align: center;
  font-size: 0.8em;
  margin: 10px 0;
  text-decoration: none;
  box-shadow: none;
}

.carrier-agents-postcode-search #woo-carrier-agents-container.has-error #woo-carrier-agents-show-more,
.carrier-agents-postcode-search #woo-carrier-agents-container.has-error #woo-carrier-agents-displaying-all {
  display: none !important;
}

.carrier-agents-postcode-search #woo-carrier-agents-container.has-error #woo-carrier-agents {
  display: none;
}

.carrier-agents-postcode-search #wca-notices {
  font-size: 0.8em;
  text-align: center;
  background: #ffd43b;
  padding: 5px 10px;
  color: #000000;
}

.carrier-agents-postcode-search #wca-notices a {
  color: #000000;
  text-decoration: underline;
}

/**
 * Blocks specific CSS
 */
.wca-blocks #wca-title {
  font-weight: bold;
  margin: 0.75em 0 0.5em;
}

.wca-blocks .woo-carrier-agents-postcode-input-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.wca-blocks .woo-carrier-agents-postcode-input-wrapper .wc-block-components-text-input {
  flex: none;
  margin: 0 0.25em 0 0;
}

.wca-blocks .woo-carrier-agents-postcode-input-wrapper .wc-block-components-text-input input[type="text"] {
  float: none;
  padding: 0.75em;
}

.wca-blocks .woo-carrier-agents-postcode-input-wrapper button {
  flex: none;
  min-height: auto !important;
}

.wca-blocks .woo-carrier-agents-postcode-input-wrapper button:focus {
  outline: none !important;
  box-shadow: none !important;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agents-error-msg {
  display: block;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agent.active {
  background: #fff;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agent:hover {
  background: #fff;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agent .woo-carrier-agent-radio {
  position: relative;
  width: 2em;
  min-width: 30px;
  margin-right: 0;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agent .woo-carrier-agent-radio input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #fff;
  border: 2px solid #50575e;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  height: 1em;
  left: 0;
  margin: inherit;
  min-height: 18px;
  min-width: 18px;
  position: absolute;
  top: 50%;
  transform: translateY(-45%);
  width: 1em;
}

.wca-blocks #woo-carrier-agents-container .woo-carrier-agent .woo-carrier-agent-radio input[type="radio"]:checked:before {
  background: #000;
  border-radius: 50%;
  content: "";
  display: block;
  height: 0.5em;
  left: 50%;
  margin: 0;
  min-height: 8px;
  min-width: 8px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0.5em;
}

.wca-blocks #woo-carrier-agents-container #woo-carrier-agents-throbber {
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: none;
  background-color: rgba(255, 255, 255, 0.75);
  top: 0;
  left: 0;
}

.wca-blocks #woo-carrier-agents-container #woo-carrier-agents-throbber::after {
  content: " ";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -0.5em 0 0 -0.5em;
  width: 1em;
  height: 1em;
  box-sizing: border-box;
  transform-origin: 50% 50%;
  transform: translateZ(0) scale(0.5);
  backface-visibility: hidden;
  border-radius: 50%;
  border: 0.2em solid currentColor;
  border-left-color: transparent;
  animation: spinner__animation 1s infinite linear;
}

.wca-blocks #woo-carrier-agents-container #woo-carrier-agents-show-more:focus {
  outline: none;
}
