/*
 * Logowanie i rejestracja użytkownika na stronie głównej.
 * Plik celowo zawiera wyłącznie style nowych elementów konta.
 */

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.account-login-trigger {
  height: 38px;
  margin: 0;
  padding: 0 22px;
  border-radius: 38px;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.account-login-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 24px 70px rgba(16, 41, 59, .34);
  overflow: hidden;
}

.account-login-dialog::backdrop {
  background: rgba(16, 41, 59, .68);
  backdrop-filter: blur(2px);
}

.account-dialog-card {
  position: relative;
  padding: 36px 34px 32px;
}

.account-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 0 2px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  font: 600 20px/1 Arial, sans-serif;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.account-dialog-close:hover {
  border-color: var(--amber);
  background: var(--hover);
}

.account-dialog-close:focus-visible,
.account-dialog-form input:focus-visible,
.account-dialog-link:focus-visible,
.account-dialog-submit:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.account-dialog-view h2 {
  margin: 0 42px 7px 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
}

.account-dialog-view > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-dialog-form {
  display: flex;
  flex-direction: column;
}

.account-dialog-form label {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.account-dialog-form > input,
.account-password-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: 13px/1.4 var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}

.account-dialog-form > input {
  margin-bottom: 16px;
}

.account-dialog-form > input:focus,
.account-password-field input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(226, 83, 3, .10);
}

.account-password-field {
  position: relative;
}

.account-password-field input {
  padding-right: 72px;
}

.account-password-field button {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 4px 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
}

.account-dialog-link {
  align-self: flex-start;
  margin: 9px 0 0;
  padding: 3px 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: 600 13px/1.4 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-dialog-link:hover {
  color: var(--amber);
}

.account-dialog-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-dialog-status.is-success,
.account-password-status.is-success {
  color: var(--green);
}

.account-dialog-status.is-error,
.account-password-status.is-error {
  color: #A33A2A;
}

.account-password-status {
  min-height: 20px;
  margin: -9px 0 8px;
  font-size: 13px;
  line-height: 1.4;
}

.account-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px !important;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500 !important;
  line-height: 1.4;
  cursor: pointer;
}

.account-consent input {
  appearance: none;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: #fff center/14px 14px no-repeat;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.account-consent input:hover {
  border-color: var(--amber);
}

.account-consent input:checked {
  border-color: var(--amber);
  background-color: var(--amber);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
}

.account-consent a {
  color: var(--amber);
  text-decoration: underline;
}

.account-activation-code {
  text-align: center;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: .32em;
  padding-left: calc(13px + .32em) !important;
}

.account-dialog-link-centered {
  align-self: center;
  margin-top: 12px;
}

.account-dialog-submit {
  width: 100%;
  height: 46px;
  justify-content: center;
  align-self: stretch;
  margin: 4px 0 0;
  padding: 0 24px;
  border-radius: 46px;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.account-dialog-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.account-dialog-submit[aria-busy="true"],
.account-dialog-link:disabled {
  opacity: .65;
  cursor: wait;
}

#accountResetView .account-dialog-link {
  align-self: center;
  margin-top: 12px;
}

.account-login-trigger[hidden] {
  display: none !important;
}

a.account-login-trigger {
  text-decoration: none;
}

.account-login-trigger[aria-busy="true"] {
  opacity: .7;
  cursor: wait;
}

/* Ulubione na kartach wyników i w panelu szczegółów oferty. */
.card-price {
  position: relative;
}

.account-favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1.5px solid var(--theme-card-cta, #E25303);
  border-radius: 50%;
  color: var(--theme-card-cta, #E25303);
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 41, 59, .10);
  cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s, transform .15s;
}

.account-favorite-button svg {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.account-favorite-button path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill .15s;
}

.account-favorite-button:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(16, 41, 59, .18);
  transform: translateY(-1px);
}

.account-favorite-button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.account-favorite-button.is-active {
  color: var(--theme-card-cta, #E25303);
  background: color-mix(in srgb, var(--theme-card-cta, #E25303) 10%, #fff);
}

.account-favorite-button.is-active path {
  fill: currentColor;
}

.account-favorite-button:disabled {
  opacity: .6;
  cursor: wait;
}

.account-favorite-button--card {
  position: absolute;
  top: 13px;
  left: 12px;
  z-index: 1;
}

.account-favorite-button--details {
  display: flex;
  margin: 0 auto 12px;
}

@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
  .account-favorite-button.is-active {
    background: #FFF4ED;
  }
}

@media (max-width: 560px) {
  .account-actions {
    gap: 6px;
  }

  .account-login-trigger {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .account-dialog-card {
    padding: 34px 22px 26px;
  }
}

@media (max-width: 900px) {
  .account-favorite-button--card {
    position: static;
    flex: 0 0 38px;
    order: -1;
    margin-right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-dialog-close,
  .account-consent input,
  .account-favorite-button,
  .account-favorite-button path {
    transition: none;
  }
}
