/* Passkeys of the customer site: the login popup button, the offer after a
   password sign-in, and the "Prístupové kľúče" page of the account. */

/* Only the elements this feature hides with the hidden attribute. */
#login-popup [hidden],
.passkeys-page [hidden],
[id^="site-passkey-"] [hidden] { display: none !important; }

/* Login popup */
.passkey-login {
  margin-top: 1.6rem;
  width: 100%;
}

.passkey-login-btn {
  width: 100%;
}

.passkey-offer {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.passkey-offer-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-text-color, #333);
}

.passkey-offer-text,
.passkey-offer-note {
  margin: 0;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: var(--primary-text-color, #333);
}

.passkey-offer-note {
  color: var(--secondary-text-color, #888);
}

.passkey-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.8rem;
}

.passkey-offer-actions .btn {
  flex: 1 1 auto;
}

/* The account page */
.passkeys-card {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 2rem 2.4rem;
  background: var(--white-color, #fff);
  border: 1px solid var(--border-element-color, #e0e0e0);
  border-radius: 12px;
}

.passkeys-intro,
.passkeys-empty,
.passkeys-note,
.passkeys-popup-text {
  margin: 0;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: var(--primary-text-color, #333);
}

.passkeys-note {
  color: var(--secondary-text-color, #888);
}

.passkeys-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.passkeys-list:empty {
  display: none;
}

.passkeys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border-element-color, #e0e0e0);
}

.passkeys-row:last-child {
  border-bottom: 1px solid var(--border-element-color, #e0e0e0);
}

.passkeys-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.passkeys-row-name {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary-text-color, #333);
  overflow-wrap: anywhere;
}

.passkeys-row-meta {
  font-size: 1.3rem;
  color: var(--secondary-text-color, #888);
}

.passkeys-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.8rem;
}

.passkeys-row-btn {
  min-width: 0;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
}

.passkeys-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.6rem;
}

.passkeys-popup-actions .btn {
  min-width: 100px;
}

@media (max-width: 767px) {
  .passkeys-card {
    padding: 1.6rem;
  }

  .passkeys-row {
    flex-direction: column;
    align-items: stretch;
  }

  .passkeys-row-actions .btn {
    flex: 1 1 0;
  }

  .passkeys-add .btn,
  .passkeys-popup-actions .btn {
    flex: 1 1 0;
    width: 100%;
  }
}
