/* Social sign-in: a button per network in its colour, as on the marketplaces */
.ps-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

/* Four networks: two by two, whatever the width (three columns of 125 px left "Одноклассники" without room) */
.ps-buttons:has(.ps-button:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ps-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s;
}

.ps-button:hover,
.ps-button:focus {
  color: #fff;
  filter: brightness(0.92);
}

.ps-button i {
  flex: none;
  font-size: 18px;
}

.ps-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A phone: the column is 290-350 px, two buttons of 140-170 px: the label of the longest one has to fit */
@media (max-width: 420px) {
  .ps-button {
    gap: 4px;
    padding: 0 4px;
    font-size: 14px;
  }

  .ps-button i {
    width: 18px;
    font-size: 16px;
    text-align: center;
  }
}

/* A narrower phone (320 px): the label does not fit next to the icon in half of the column, one button a row */
@media (max-width: 350px) {
  .ps-buttons,
  .ps-buttons:has(.ps-button:nth-child(4)) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ps-vk {
  background: #0077ff;
}

.ps-ok {
  background: #ee8208;
}

.ps-yandex {
  background: #fc3f1d;
}

.ps-mailru {
  background: #005ff9;
}

.ps-consent {
  margin: 10px 0 0;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.4;
}

/* The networks of the customer in the account */
.ps-row {
  gap: 12px;
}

.ps-row::after {
  content: none;
}

.ps-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
}

.ps-row .ps-icon i {
  width: auto;
  color: #fff;
}

.ps-row-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ps-row-name small {
  color: #9a9a9a;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-action {
  color: var(--ph-accent, #d94a12);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ps-unlink {
  color: #9a9a9a;
  font-weight: 400;
}

.ps-submit {
  margin-top: 8px;
}

/* The buttons over the registration and checkout forms */
.ps-block {
  max-width: 560px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ph-line, #ececec);
}

.ps-heading {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
}

/* The checkout: a quiet row of icons under a small line, the quick order and the form stay the main ways */
.ps-block-compact {
  padding-bottom: 16px;
}

.ps-block-compact .ps-heading {
  margin-bottom: 8px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
  font-weight: 400;
}

.ps-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ps-compact .ps-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
}

.ps-compact .ps-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
