/* Signing in and the account: cards of a narrow column, as in the profile of a marketplace app */

/* Sign in: the form first, the registration under it */
.pa-auth {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
  margin: 8px auto 32px;
}

/* "Вход | Регистрация": a segmented switch at the top of both pages */
.pa-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 12px;
  background: var(--ph-soft, #f5f5f5);
}

.pa-tabs a {
  flex: 1;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.pa-tabs a:hover {
  color: var(--ph-text, #2b2b2b);
}

.pa-tabs a.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: var(--ph-text, #2b2b2b);
}

#account-register .pa-tabs {
  max-width: 440px;
}

/* The heading of the social buttons over the registration form: a subheading, not a second page heading */
#account-register #content h3 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
}

.pa-card {
  padding: 24px;
  border: 1px solid var(--ph-line, #ececec);
  border-radius: 14px;
  background: #fff;
}

.pa-card-muted {
  border-color: transparent;
  background: var(--ph-soft, #f5f5f5);
}

.pa-card-muted p {
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

.pa-title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
}

.pa-subtitle {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.pa-auth .form-label {
  margin-bottom: 4px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

.pa-auth .form-control {
  height: 46px;
  border-radius: 10px;
  font-size: 16px;
}

.pa-link {
  color: var(--ph-link, #1f8bb8);
  font-size: 14px;
}

.pa-submit {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  font-weight: 600;
}

.pa-social {
  margin-top: 20px;
}

.pa-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: #9a9a9a;
  font-size: 13px;
}

.pa-or::before,
.pa-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ph-line, #ececec);
}

/* The OneAll widget brings its own heading: the line "или войдите через соцсети" says it already */
.pa-social h2,
.pa-social h3 {
  display: none;
}

/* The account: the greeting, then menus of rows */
#account-account #content {
  max-width: 640px;
}

.pa-hello {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 20px;
}

.pa-hello .pa-title {
  margin: 0;
  font-size: 22px;
}

.pa-avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ph-tint, #fdece4);
  color: var(--ph-accent, #d94a12);
  font-size: 22px;
  font-weight: 700;
}

.pa-email {
  color: #9a9a9a;
  font-size: 14px;
  word-break: break-all;
}

.pa-menu {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--ph-line, #ececec);
  border-radius: 14px;
  background: #fff;
}

.pa-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 16px;
  color: var(--ph-text, #2b2b2b);
  font-size: 15px;
  text-decoration: none;
}

.pa-row + .pa-row {
  border-top: 1px solid var(--ph-line, #ececec);
}

.pa-row i {
  width: 20px;
  color: var(--ph-muted, #6c6c6c);
  text-align: center;
}

.pa-row::after {
  content: "\f054";
  margin-left: auto;
  color: #c4c4c4;
  font: var(--fa-font-solid);
  font-size: 12px;
}

.pa-row:hover {
  background: var(--ph-soft, #f5f5f5);
  color: var(--ph-text, #2b2b2b);
}

.pa-row-out,
.pa-row-out i {
  color: var(--ph-accent, #d94a12);
}

.pa-row-out::after {
  content: none;
}

/* The stock account links of the right column repeat the menu on a phone */
@media (max-width: 991.98px) {
  #account-account #column-right {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .pa-card {
    padding: 20px 16px;
  }

  .pa-auth {
    margin-top: 0;
  }
}

/* The inner pages of the account: one narrow column (the wish list keeps the grid of products) */
[id^="account-"]:not(#account-wishlist):not(#account-login) #content {
  max-width: 720px;
}

[id^="account-"] #content > h1 {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
}

/* Orders: cards */
.pa-orders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pa-order {
  display: block;
  padding: 16px;
  border: 1px solid var(--ph-line, #ececec);
  border-radius: 14px;
  background: #fff;
  color: var(--ph-text, #2b2b2b);
  text-decoration: none;
  transition: border-color 0.15s;
}

.pa-order:hover {
  border-color: #d0d0d0;
  color: var(--ph-text, #2b2b2b);
}

.pa-order-head,
.pa-order-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pa-order-title {
  margin-bottom: 16px;
}

.pa-order-title .pa-title {
  margin: 0;
}

.pa-order-no {
  font-size: 16px;
  font-weight: 700;
}

.pa-order-date {
  color: #9a9a9a;
  font-size: 13px;
}

/* The status: grey (waiting, cancelled), the brand colour while the order is processed, green when complete (the
   processing and complete statuses of the shop settings) */
.pa-status {
  flex: none;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--ph-soft, #f5f5f5);
  color: var(--ph-muted, #6c6c6c);
  font-size: 13px;
  font-weight: 600;
}

.pa-status-progress {
  background: var(--ph-tint, #fdece4);
  color: var(--ph-accent-dark, #bf3f0e);
}

.pa-status-done {
  background: #e6f4ea;
  color: #1e7b3c;
}

.pa-order-thumbs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.pa-thumb {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ph-soft, #f5f5f5);
}

.pa-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pa-thumb-more {
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
  font-weight: 600;
}

.pa-order-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

.pa-order-foot strong {
  color: var(--ph-text, #2b2b2b);
  font-size: 16px;
}

/* An order: the products, the sum, the facts, the history */
.pa-box {
  margin-bottom: 16px;
  padding: 4px 16px;
  border: 1px solid var(--ph-line, #ececec);
  border-radius: 14px;
  background: #fff;
}

.pa-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
}

.pa-line + .pa-line {
  border-top: 1px solid var(--ph-line, #ececec);
}

.pa-line-info {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.pa-line-name {
  color: var(--ph-text, #2b2b2b);
  font-weight: 600;
  text-decoration: none;
}

.pa-line-option,
.pa-line-price {
  color: var(--ph-muted, #6c6c6c);
  font-size: 13px;
}

.pa-line-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.pa-line-actions .btn {
  border-radius: 8px;
}

.pa-link-muted {
  color: #9a9a9a;
  font-size: 13px;
}

.pa-line-total {
  flex: none;
  font-weight: 700;
  white-space: nowrap;
}

.pa-totals {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--ph-line, #ececec);
  font-size: 14px;
}

.pa-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}

.pa-totals dt {
  color: var(--ph-muted, #6c6c6c);
  font-weight: 400;
}

.pa-totals dd {
  margin: 0;
  white-space: nowrap;
}

.pa-totals .pa-totals-sum {
  padding-top: 8px;
  font-size: 17px;
  font-weight: 700;
}

.pa-totals .pa-totals-sum dt {
  color: var(--ph-text, #2b2b2b);
  font-weight: 700;
}

.pa-facts > div {
  padding: 12px 0;
  font-size: 14px;
}

.pa-facts > div + div {
  border-top: 1px solid var(--ph-line, #ececec);
}

.pa-fact-title {
  margin-bottom: 2px;
  color: #9a9a9a;
  font-size: 13px;
}

.pa-fact-title i {
  width: 18px;
}

.pa-fact-more {
  color: var(--ph-muted, #6c6c6c);
}

.pa-history {
  margin: 0;
  padding: 12px 0 12px 20px;
  list-style: none;
}

.pa-history li {
  position: relative;
  padding-bottom: 14px;
  font-size: 14px;
}

.pa-history li:last-child {
  padding-bottom: 0;
}

/* The dot of each status and the line between them; the newest is in the brand colour */
.pa-history li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d0d0;
}

.pa-history li:first-child::before {
  background: var(--ph-accent, #d94a12);
}

.pa-history li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -16px;
  top: 17px;
  bottom: 0;
  width: 2px;
  background: var(--ph-line, #ececec);
}

.pa-history-status {
  font-weight: 600;
}

.pa-history-date {
  color: #9a9a9a;
  font-size: 13px;
}

.pa-history-comment {
  margin-top: 4px;
  color: var(--ph-muted, #6c6c6c);
}

/* Addresses: cards */
.pa-addresses {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.pa-address {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ph-line, #ececec);
  border-radius: 14px;
  font-size: 14px;
}

.pa-address > i {
  margin-top: 3px;
  color: var(--ph-muted, #6c6c6c);
}

.pa-address-text {
  flex: 1;
  min-width: 0;
}

.pa-address-actions {
  display: flex;
  flex-basis: 100%;
  gap: 20px;
  padding-left: 26px;
}

#address .pa-delete {
  padding: 0;
  border: 0;
  background: none;
  color: #9a9a9a;
}

#address .pa-delete:hover {
  color: #c0392b;
}

/* The stock forms of the account (personal details, password, address, newsletter, registration): the labels over
   the fields, larger fields, the main button over the whole width of a phone */
[id^="account-"] form .row > .col-form-label,
[id^="account-"] form .row > [class*="col-sm-"],
[id^="account-"] form .row > [class*="col-md-"] {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
}

/* A switch (the newsletter): its label beside it in one line, not over it as for a field */
[id^="account-"] form .row:has(> [class*="col-"] > .form-switch) {
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

[id^="account-"] form .row:has(> [class*="col-"] > .form-switch) > * {
  flex: none;
  width: auto;
  max-width: none;
  padding: 0;
}

[id^="account-"] form .row:has(> [class*="col-"] > .form-switch) > .col-form-label {
  flex: 1;
  color: var(--ph-text, #2b2b2b);
  font-size: 15px;
  cursor: pointer;
}

[id^="account-"] form .row:has(> [class*="col-"] > .form-switch) .form-switch {
  margin: 0;
}

[id^="account-"] form .row:has(> [class*="col-"] > .form-switch) {
  margin-right: 0;
  margin-left: 0;
}

/* One column: the button of the registration under the fields, on the left as the labels */
#form-register > .text-end {
  text-align: left !important;
}

/* The stock stylesheet aligns the labels right from 768px, for a column beside the field */
[id^="account-"] form .col-form-label {
  text-align: left;
  padding-bottom: 4px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

[id^="account-"] form .form-control,
[id^="account-"] form .form-select {
  min-height: 46px;
  border-radius: 10px;
  font-size: 16px;
}

[id^="account-"] form textarea.form-control {
  min-height: 96px;
}

[id^="account-"] form legend {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

[id^="account-"] form .btn-primary,
#account-address #content > .row .btn {
  min-height: 46px;
  padding-right: 24px;
  padding-left: 24px;
  border-radius: 10px;
  font-weight: 600;
}

/* A button taller than its line keeps the text in the middle (an inline block puts it at the top) */
.pa-submit,
[id^="account-"] form .btn,
#account-address #content > .row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* The first heading of the form repeats the page heading ("Учетная запись" / "Ваша учетная запись") */
#account-edit form > fieldset:first-child > legend,
#account-password form > fieldset:first-child > legend {
  display: none;
}

@media (max-width: 575.98px) {
  [id^="account-"] #content > h1 {
    font-size: 21px;
  }

  /* "Назад" and "Продолжить": the main button first, over the whole width; the breadcrumb leads back as well */
  [id^="account-"]:not(#account-login) form > .row:last-child,
  #account-address #content > .row:last-of-type {
    flex-direction: column-reverse;
    gap: 8px;
  }

  [id^="account-"]:not(#account-login) form > .row:last-child > .col,
  #account-address #content > .row:last-of-type > .col {
    text-align: center !important;
  }

  [id^="account-"]:not(#account-login) form > .row:last-child .btn,
  #account-address #content > .row:last-of-type .btn,
  #form-register > .text-end > .btn-primary {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
  }


  .pa-line-total {
    font-size: 14px;
  }
}

/* Returns: the product on the card, the button under the list */
.pa-return-product {
  margin: 10px 0 8px;
  font-size: 14px;
}

.pa-actions {
  margin: 16px 0;
}

.pa-actions .btn {
  min-height: 46px;
  border-radius: 10px;
  font-weight: 600;
}

/* Reward points: the balance large, the history as rows */
.pa-balance {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--ph-tint, #fdece4);
}

.pa-balance > i {
  color: var(--ph-accent, #d94a12);
  font-size: 28px;
}

.pa-balance-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.pa-balance-label {
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

.pa-line-total.pa-minus {
  color: var(--ph-muted, #6c6c6c);
}

/* Forgotten password: the card of the sign-in page */
.pa-lead {
  margin-bottom: 16px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
}

.pa-back {
  margin-top: 16px;
  color: var(--ph-muted, #6c6c6c);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 575.98px) {
  .pa-actions .btn {
    width: 100%;
  }
}

/* Social sign-in (pryalka_social): the hint for the customers who used Facebook */
.pa-social-hint {
  margin: 12px 0 0;
  color: var(--ph-muted, #6c6c6c);
  font-size: 13px;
  line-height: 1.4;
}
