.mobi-home-compare {
  display: flex;
  width: 100%;
  max-width: 900px;
  flex-direction: column;
  align-items: center;
}

.mobi-home-compare__picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.mobi-home-compare__slot {
  position: relative;
  width: 264px;
  max-width: 100%;
}

.mobi-home-compare__slot[hidden],
.mobi-home-compare__input[hidden],
.mobi-home-compare__selected[hidden],
.mobi-home-compare__suggestions[hidden],
.mobi-home-comparison[hidden],
.mobi-home-comparison__actions[hidden],
.mobi-home-comparison__no-differences[hidden],
.mobi-home-compare__fallback[hidden] {
  display: none;
}

.mobi-home-compare__input,
.mobi-home-compare__selected {
  box-sizing: border-box;
  width: 100%;
  min-height: 47px;
  border-radius: 999px;
}

.mobi-home-compare__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid transparent;
  background: #f4f4f4;
}

.mobi-home-compare__input:focus-within {
  border-color: var(--mobi-accent);
}

.mobi-home-compare__input > svg {
  flex-shrink: 0;
}

.mobi-home-compare__input input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1a1a1a;
  font-size: 15px;
  line-height: normal;
}

.mobi-home-compare__input input::placeholder {
  color: #757575;
  opacity: 1;
}

.mobi-home-compare__remove-slot,
.mobi-home-compare__selected button {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #666;
}

.mobi-home-compare__remove-slot {
  width: 24px;
  height: 24px;
  background: #e7e7e7;
}

.mobi-home-compare__remove-slot:hover,
.mobi-home-compare__remove-slot:focus-visible {
  background: rgb(216 28 34 / 10%);
  color: var(--mobi-accent);
}

.mobi-home-compare__selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  border: 1.5px solid var(--mobi-accent);
  background: #fff;
}

.mobi-home-compare__selected > span {
  overflow: hidden;
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobi-home-compare__selected button {
  width: 28px;
  height: 28px;
  background: #f4f4f4;
}

.mobi-home-compare__selected button:hover,
.mobi-home-compare__selected button:focus-visible {
  color: var(--mobi-accent);
}

.mobi-home-compare__suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(0 0 0 / 10%);
  list-style: none;
}

.mobi-home-compare__suggestions [role="option"] {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border: 0;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.mobi-home-compare__suggestions [role="option"]:hover,
.mobi-home-compare__suggestions [role="option"][aria-selected="true"] {
  background: #f7f7f7;
}

.mobi-home-compare__suggestions strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobi-home-compare__suggestions small {
  flex-shrink: 0;
  color: #999;
  font-size: 14px;
}

.mobi-home-compare__add {
  display: flex;
  width: 47px;
  height: 47px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px dashed #c9c9c9;
  border-radius: 50%;
  background: #fff;
  color: #8a8a8a;
}

.mobi-home-compare__add:hover,
.mobi-home-compare__add:focus-visible {
  border-color: var(--mobi-accent);
  color: var(--mobi-accent);
}

.mobi-home-compare__submit {
  min-height: 47px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--mobi-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.mobi-home-comparison {
  width: 100%;
  margin-top: 48px;
}

.mobi-home-comparison[aria-busy="true"] {
  opacity: .62;
}

.mobi-home-comparison__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.mobi-home-comparison__actions button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  background: #fff;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.mobi-home-comparison__actions button:hover,
.mobi-home-comparison__actions button:focus-visible {
  border-color: var(--mobi-accent);
  color: var(--mobi-accent);
}

.mobi-home-comparison__actions button[aria-pressed="true"] {
  border-color: var(--mobi-accent);
  background: rgb(216 28 34 / 5%);
  color: var(--mobi-accent);
}

.mobi-home-comparison__actions button > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9c9c9;
}

.mobi-home-comparison__actions button[aria-pressed="true"] > span {
  background: var(--mobi-accent);
}

.mobi-home-comparison__table {
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 18px;
  background: #fff;
}

.mobi-home-comparison__row {
  display: grid;
  border-top: 1px solid #f1f1f1;
}

.mobi-home-comparison__table--1 .mobi-home-comparison__row {
  grid-template-columns: 150px repeat(1, minmax(0, 1fr));
}

.mobi-home-comparison__table--2 .mobi-home-comparison__row {
  grid-template-columns: 150px repeat(2, minmax(0, 1fr));
}

.mobi-home-comparison__table--3 .mobi-home-comparison__row {
  grid-template-columns: 150px repeat(3, minmax(0, 1fr));
}

.mobi-home-comparison__row:first-child {
  border-top: 0;
}

.mobi-home-comparison__row[hidden] {
  display: none;
}

.mobi-home-comparison__row > * {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
}

.mobi-home-comparison__corner {
  padding: 26px;
}

.mobi-home-comparison__device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px clamp(8px, 2vw, 22px);
  border-left: 1px solid #f1f1f1;
}

.mobi-home-comparison__visual {
  position: relative;
  width: 64px;
  height: 94px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #191919;
}

.mobi-home-comparison__visual::before,
.mobi-home-comparison__visual::after {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: #111;
  content: "";
}

.mobi-home-comparison__visual::after {
  top: 23px;
}

.mobi-home-comparison__visual--apple { background: #14171c; }
.mobi-home-comparison__visual--samsung { background: #101c3a; }
.mobi-home-comparison__visual--google { background: #1e3328; }
.mobi-home-comparison__visual--oneplus { background: #3a0f0f; }
.mobi-home-comparison__visual--xiaomi { background: #4a2c0e; }
.mobi-home-comparison__visual--nothing { background: #1a1a1a; }
.mobi-home-comparison__visual--motorola { background: #221540; }

.mobi-home-comparison__device p {
  margin: 0;
  color: var(--mobi-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

.mobi-home-comparison__device strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mobi-home-comparison__label,
.mobi-home-comparison__value {
  display: flex;
  align-items: center;
  padding: 18px clamp(6px, 2vw, 22px);
}

.mobi-home-comparison__label {
  padding-right: 10px;
  padding-left: clamp(10px, 2.5vw, 26px);
  color: #999;
  font-size: clamp(11px, 2vw, 13px);
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.mobi-home-comparison__value {
  justify-content: center;
  border-left: 1px solid #f1f1f1;
  color: #555;
  font-size: clamp(13px, 2.5vw, 15px);
  font-weight: 400;
  text-align: center;
  overflow-wrap: anywhere;
}

.mobi-home-comparison__row.is-different .mobi-home-comparison__value {
  color: var(--mobi-accent);
  font-weight: 500;
}

.mobi-home-comparison__no-differences {
  margin: 20px 0 0;
  color: #8a8a8a;
  font-size: 15px;
  text-align: center;
}

.mobi-home-comparison__advertisement {
  display: flex;
  min-height: 90px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px;
  margin-top: 32px;
  border: 1px dashed #dcdcdc;
  border-radius: 14px;
  color: #b0b0b0;
  font-size: 14px;
}

.mobi-home-comparison__advertisement span:first-child {
  padding: 2px 6px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

.mobi-home-compare__fallback {
  margin-top: 14px;
  color: var(--mobi-accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.mobi-home-compare__copy-field {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.mobi-home-compare__toast {
  position: fixed;
  z-index: 200;
  bottom: 30px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #1a1a1a;
  box-shadow: 0 10px 30px rgb(0 0 0 / 22%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  animation: mobi-home-compare-toast-in .25s cubic-bezier(.2, .7, .3, 1);
  transform: translateX(-50%);
}

@keyframes mobi-home-compare-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 640px) {
  .mobi-home-comparison__table--1 .mobi-home-comparison__row { grid-template-columns: 88px repeat(1, minmax(0, 1fr)); }
  .mobi-home-comparison__table--2 .mobi-home-comparison__row { grid-template-columns: 88px repeat(2, minmax(0, 1fr)); }
  .mobi-home-comparison__table--3 .mobi-home-comparison__row { grid-template-columns: 88px repeat(3, minmax(0, 1fr)); }

  .mobi-home-comparison__device {
    padding-right: 6px;
    padding-left: 6px;
  }

  .mobi-home-comparison__advertisement {
    min-height: 80px;
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobi-home-compare__toast {
    animation: none;
  }
}
