:root {
  --indovia-ship-red: #ff1f2d;
  --indovia-ship-green: #1b9b59;
  --indovia-ship-text: #111111;
  --indovia-ship-secondary: #555555;
  --indovia-ship-muted: #888888;
  --indovia-ship-border: #eaeaea;
  --indovia-ship-soft: #f8f8f8;
}

.indovia-ship-summary {
  margin: 16px 0;
}

.indovia-ship-summary__button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 8px;
  background: var(--indovia-ship-soft);
  color: var(--indovia-ship-text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.indovia-ship-summary__button:hover,
.indovia-ship-summary__button:focus {
  border-color: rgba(255, 31, 45, .35);
  background: #fff;
  outline: none;
}

.indovia-ship-summary__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--indovia-ship-red);
}

.indovia-ship-summary__content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.indovia-ship-summary__title {
  color: var(--indovia-ship-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indovia-ship-summary__origin,
.indovia-ship-summary__meta {
  color: var(--indovia-ship-secondary);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indovia-ship-summary__badge {
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(27, 155, 89, .1);
  color: var(--indovia-ship-green);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.indovia-ship-summary__change {
  color: var(--indovia-ship-red);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.indovia-ship-drawer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
}

.indovia-ship-drawer[aria-hidden="true"] {
  display: none;
}

.indovia-ship-drawer.is-open {
  pointer-events: auto;
}

.indovia-ship-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .38);
  opacity: 0;
  transition: opacity .2s ease;
}

.indovia-ship-drawer.is-open .indovia-ship-drawer__backdrop {
  opacity: 1;
}

.indovia-ship-drawer__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, .18);
  transform: translateY(18px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  overflow: hidden;
}

.indovia-ship-drawer.is-open .indovia-ship-drawer__sheet {
  transform: translateY(0);
  opacity: 1;
}

.indovia-ship-drawer__head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--indovia-ship-border);
  background: #fff;
}

.indovia-ship-drawer__head h3 {
  margin: 0;
  color: var(--indovia-ship-text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.indovia-ship-drawer__head p {
  margin: 3px 0 0;
  color: var(--indovia-ship-muted);
  font-size: 12px;
  line-height: 1.3;
}

.indovia-ship-drawer__back,
.indovia-ship-drawer__close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--indovia-ship-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.indovia-ship-drawer__back:hover,
.indovia-ship-drawer__close:hover {
  background: var(--indovia-ship-soft);
  color: var(--indovia-ship-red);
}

.indovia-ship-drawer__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.indovia-ship-details,
.indovia-ship-address {
  padding: 16px;
}

.indovia-ship-details__grid {
  display: grid;
  gap: 14px;
}

.indovia-ship-panel {
  border: 1px solid var(--indovia-ship-border);
  border-radius: 12px;
  background: #fff;
}

.indovia-ship-panel--summary {
  padding: 14px;
}

.indovia-ship-panel__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--indovia-ship-border);
}

.indovia-ship-panel__row:first-child {
  padding-top: 0;
}

.indovia-ship-panel__row span {
  color: var(--indovia-ship-muted);
  font-size: 12px;
}

.indovia-ship-panel__row strong {
  min-width: 0;
  color: var(--indovia-ship-text);
  font-size: 13px;
  line-height: 1.35;
}

.indovia-ship-link-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--indovia-ship-red) !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.indovia-ship-panel--rates {
  padding: 0;
  overflow: hidden;
}

.indovia-ship-panel--rates h4 {
  margin: 0;
  padding: 14px 14px 10px;
  color: var(--indovia-ship-text);
  font-size: 15px;
  font-weight: 800;
}

.indovia-ship-rate-list {
  display: grid;
}

.indovia-ship-rate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--indovia-ship-border);
  background: #fff;
}

.indovia-ship-rate.is-selected {
  box-shadow: inset 3px 0 0 var(--indovia-ship-red);
  background: linear-gradient(90deg, rgba(255, 31, 45, .05), #fff 42%);
}

.indovia-ship-rate strong {
  display: block;
  color: var(--indovia-ship-text);
  font-size: 14px;
  line-height: 1.25;
}

.indovia-ship-rate span,
.indovia-ship-rate em {
  display: block;
  margin-top: 3px;
  color: var(--indovia-ship-secondary);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.indovia-ship-rate__price {
  min-width: 86px;
  text-align: right;
}

.indovia-ship-rate__price strong {
  font-size: 14px;
}

.indovia-ship-rate__price .is-free,
.indovia-ship-rate__price span {
  color: var(--indovia-ship-green);
  font-weight: 800;
}

.indovia-ship-rate__price del {
  display: block;
  color: var(--indovia-ship-muted);
  font-size: 11px;
}

.indovia-ship-note {
  margin: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--indovia-ship-border);
  color: var(--indovia-ship-muted);
  font-size: 12px;
  line-height: 1.35;
}

.indovia-ship-empty {
  margin: 14px;
  padding: 16px;
  border-radius: 12px;
  background: var(--indovia-ship-soft);
  color: var(--indovia-ship-secondary);
}

.indovia-ship-empty strong {
  display: block;
  color: var(--indovia-ship-text);
  font-size: 14px;
  line-height: 1.3;
}

.indovia-ship-empty p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.indovia-ship-empty button {
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--indovia-ship-red);
  color: #fff;
  font-weight: 800;
}

.indovia-ship-empty.is-error {
  background: rgba(255, 31, 45, .08);
}

.indovia-ship-empty--compact {
  margin: 0 0 14px;
}

.indovia-ship-loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--indovia-ship-text);
}

.indovia-ship-loading__mark {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 12px;
  background:
    linear-gradient(135deg, transparent 0 28%, var(--indovia-ship-red) 29% 54%, transparent 55%),
    linear-gradient(45deg, transparent 0 35%, #fff 36% 48%, transparent 49%),
    #111;
  box-shadow: 0 10px 28px rgba(255, 31, 45, .26);
  animation: indoviaShipPulse 1s ease-in-out infinite;
}

@keyframes indoviaShipPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: .86;
  }
  50% {
    transform: translateY(-2px) scale(1.04);
    opacity: 1;
  }
}

.indovia-ship-address__search {
  margin-bottom: 14px;
}

.indovia-ship-address label,
.indovia-ship-form label {
  display: grid;
  gap: 6px;
  color: var(--indovia-ship-text);
  font-size: 13px;
  font-weight: 700;
}

.indovia-ship-address input,
.indovia-ship-form input,
.indovia-ship-form select,
.indovia-ship-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--indovia-ship-text);
  font-size: 14px;
  box-shadow: none;
}

.indovia-ship-address input:focus,
.indovia-ship-form input:focus,
.indovia-ship-form select:focus,
.indovia-ship-form textarea:focus {
  border-color: var(--indovia-ship-red);
  outline: none;
}

.indovia-ship-address__results,
.indovia-ship-field-results {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.indovia-ship-checkout-results {
  position: relative;
  z-index: 50;
  width: 100%;
}

.indovia-ship-location-result {
  min-height: 40px;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.indovia-ship-location-result:hover {
  border-color: var(--indovia-ship-red);
}

.indovia-ship-location-result strong {
  color: var(--indovia-ship-text);
  font-size: 13px;
  line-height: 1.3;
}

.indovia-ship-location-result span,
.indovia-ship-location-empty {
  color: var(--indovia-ship-muted);
  font-size: 12px;
}

.indovia-ship-address__saved {
  margin-bottom: 16px;
}

.indovia-ship-address__saved h4,
.indovia-ship-form h4 {
  margin: 0 0 10px;
  color: var(--indovia-ship-text);
  font-size: 15px;
  font-weight: 800;
}

.indovia-ship-address-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 12px;
  background: #fff;
}

.indovia-ship-address-card + .indovia-ship-address-card {
  margin-top: 10px;
}

.indovia-ship-address-card.is-primary {
  border-color: rgba(255, 31, 45, .35);
}

.indovia-ship-address-card strong {
  display: block;
  color: var(--indovia-ship-text);
  font-size: 14px;
}

.indovia-ship-address-card p {
  margin: 5px 0 0;
  color: var(--indovia-ship-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.indovia-ship-address-card span {
  display: inline-block;
  margin-top: 6px;
  color: var(--indovia-ship-red);
  font-size: 11px;
  font-weight: 800;
}

.indovia-ship-address-card button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--indovia-ship-red);
  border-radius: 8px;
  background: #fff;
  color: var(--indovia-ship-red);
  font-size: 12px;
  font-weight: 800;
}

.indovia-ship-form {
  display: grid;
  gap: 12px;
}

.indovia-ship-check {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 8px !important;
  padding: 10px 12px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 8px;
  background: var(--indovia-ship-soft);
}

.indovia-ship-check input {
  width: 18px !important;
  min-height: 18px !important;
  height: 18px;
  margin: 0;
  accent-color: var(--indovia-ship-red);
}

.indovia-ship-check span {
  color: var(--indovia-ship-secondary);
  font-size: 12px;
  font-weight: 700;
}

.indovia-ship-form__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.indovia-ship-form__actions button[type="submit"] {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--indovia-ship-red);
  color: #fff;
  font-weight: 800;
}

.indovia-ship-form__status {
  padding: 10px;
  border-radius: 8px;
  background: var(--indovia-ship-soft);
  color: var(--indovia-ship-secondary);
  font-size: 12px;
}

.indovia-ship-note--inline {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--indovia-ship-soft);
}

.indovia-ship-checkout-save {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 10px;
  background: var(--indovia-ship-soft);
}

.indovia-ship-checkout-save label {
  display: grid;
  gap: 6px;
  color: var(--indovia-ship-text);
  font-size: 13px;
  font-weight: 700;
}

.indovia-ship-checkout-save input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--indovia-ship-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--indovia-ship-text);
  font-size: 14px;
}

.indovia-ship-checkout-save button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--indovia-ship-red);
  color: #fff;
  font-weight: 800;
}

.indovia-ship-checkout-save button:disabled {
  opacity: .65;
}

.indovia-ship-checkout-save p {
  margin: 0;
  color: var(--indovia-ship-muted);
  font-size: 12px;
}

.indovia-ship-checkout-save p.is-success {
  color: var(--indovia-ship-green);
}

.indovia-ship-checkout-save p.is-error {
  color: var(--indovia-ship-red);
}

body.indovia-ship-lock {
  overflow: hidden;
}

@media (max-width: 767px) {
  .indovia-ship-summary {
    margin: 14px 0;
  }

  .indovia-ship-summary__button {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    padding: 13px 12px;
  }

  .indovia-ship-drawer__sheet {
    max-height: 94vh;
    min-height: 85vh;
  }

  .indovia-ship-details,
  .indovia-ship-address {
    padding: 14px 12px 22px;
  }

  .indovia-ship-form__actions {
    grid-template-columns: 1fr;
  }

  .indovia-ship-form__actions .indovia-ship-link-button {
    justify-self: start;
  }

  .indovia-ship-address-card {
    grid-template-columns: 1fr;
  }

  .indovia-ship-rate {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 768px) {
  .indovia-ship-summary__title {
    font-size: 15px;
  }

  .indovia-ship-drawer {
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .indovia-ship-drawer__sheet {
    position: relative;
    width: min(860px, calc(100vw - 48px));
    max-height: 86vh;
    min-height: 560px;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .24);
    transform: translateY(10px) scale(.98);
  }

  .indovia-ship-drawer.is-open .indovia-ship-drawer__sheet {
    transform: translateY(0) scale(1);
  }

  .indovia-ship-details__grid {
    grid-template-columns: minmax(240px, .85fr) minmax(0, 1.35fr);
    align-items: start;
  }

  .indovia-ship-address {
    padding: 20px;
  }

  .indovia-ship-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .indovia-ship-form h4,
  .indovia-ship-form__wide,
  .indovia-ship-form__actions,
  .indovia-ship-form__status {
    grid-column: 1 / -1;
  }
}
