.atop-carriers-wrap {
  margin: 0 0 18px 0;
  /* padding: 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; */
}

.atop-carriers-title {
  margin: 0 0 12px 0;
}

/* Carrier radios exist but are invisible */
.atop-carrier-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Carriers as responsive flex boxes */
.atop-carriers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

/* Carrier card layout: vertical */
.atop-carrier-card {
  flex: 1 1 180px;
  min-width: 180px;

  display: flex;
  flex-direction: column;      /* name on top, logo below */
  align-items: center;
  gap: 8px;

  padding: 12px;
  border: 1px solid #d4d4d4;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  height: 100%;
  text-align: center;
  justify-content: space-between;
}

/* Carrier name on top */
.atop-carrier-name {
  font-family: "Comfortaa", sans-serif;
  font-weight: 900;
  line-height: 1.2;
}

/* Rectangular carrier logo below the name */
.atop-carrier-logo {
  width: 100%;                 /* full card width */
  max-width: 160px;
  height: 60px;                /* rectangular shape */
  border-radius: 6px;          /* softer rectangle */
}
.atop-carrier-logo img {
  height: 100%!important;
  width: auto!important;
}

.atop-delivery-options {
  margin-top: 14px;
}

.atop-delivery-options__group {
  flex-direction: column;
  gap: 10px;
}

.atop-delivery-options__title {
  margin: 0 0 10px 0;
  font-weight: 600;
}

.atop-option-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.atop-option-label {
  display: block;
  padding: 12px;
  border: 1px solid #d4d4d4;
  border-radius: 5px;
  cursor: pointer;
}

.atop-option-radio:checked + .atop-option-label {
  border: none;
  outline: 2px solid rgba(214,59,116, .8);
  box-shadow: inset 0 0 7px rgba(214, 59, 116, .2);
  transform: scale(1.01);
}

/* You asked for :selected - note: :selected applies to <option> elements, not radios */
.atop-carriers-wrap input:selected + label {
  outline: 2px solid rgba(0,0,0,.2);
}

.atop-sz-wrap {
  margin-top: 12px;
}

.atop-sz-wrap .selectize-control {
  width: 100%;
}

/* OPTION C layout support:
   - Desktop stays identical: options appear under the whole grid (forced to bottom via order)
   - Mobile: options appear directly under the carrier card (natural document order)
*/

/* Desktop/default: push any visible delivery group to the end of the flex grid */
.atop-carriers-grid .atop-delivery-options__group {
  flex: 1 1 100%;
  order: 9999;
  margin-top: 10px;
}

/* Selectize styling */
.selectize-input {
  padding: 12px!important;
  border: 1px solid #d4d4d4!important;
  border-radius: 5px!important;
  background-color: transparent!important;
}
.selectize-dropdown-content .option {
  padding: 6px!important;
  cursor: pointer!important;
}
.selectize-dropdown-content .option.active {
  color: #ffffff!important;
  background-color: rgba(214,59,116, 1)!important;
}
.selectize-dropdown-content .option.selected .highlight, .selectize-dropdown-content .option.active .highlight {
  color: #ffffff!important;
  font-weight: bold!important;
  background-color: #6dab3c!important;
  outline: 1px solid rgba(255,255,255, .5)!important;
  padding: 2px!important;
  border-radius: 5px!important
}
.selectize-dropdown-content .option .highlight {
  background-color: #6dab3c!important;
  outline: 1px solid rgba(255,255,255, .5)!important;
  font-weight: bold!important;
  color: #ffffff!important;
  padding: 2px!important;
  border-radius: 5px!important;
}
.atop-sz-select .required {
  color: #000000!important;
  font-weight: normal!important;
  border: 1px solid #d4d4d4!important;
}

/* Mobile */
@media (max-width: 520px) {
  .atop-carrier-card {
    min-width: 100%;
    flex-basis: 100%;
  }
  /* Mobile: show group under its carrier card (remove the forced ordering) */
  .atop-carriers-grid .atop-delivery-options__group {
    order: 0;
    margin-top: 10px;
  }
}