/* Shared registration and sign-in dialogs */
html:has(.po-auth.modal.show),
body:has(.po-auth.modal.show) {
  overflow: hidden;
  overscroll-behavior: none;
}
body:has(.po-auth.modal.show) { position: static; }
.po-auth.modal,
body.modal-open .po-auth.modal {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.po-auth.modal .modal-dialog {
  display: flex;
  align-items: center;
  width: calc(100% - 24px);
  max-width: 476px;
  min-height: calc(100vh - 24px);
  margin: 12px auto;
  height: auto;
  padding: 0;
  overflow: visible;
}
.po-auth .modal-content {
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 1px solid #dbe5ee;
  border-top: 4px solid #eb671d;
  border-radius: 18px;
  background: #fff;
  color: #18334b;
  box-shadow: 0 20px 64px rgba(6, 39, 68, .24);
}
.po-auth-header {
  position: relative;
  padding: 16px 60px 16px 28px;
  border-radius: 14px 14px 0 0;
  background: #f3f7fb;
  border-bottom: 1px solid #dbe5ee;
}
.po-auth-header h2 {
  margin: 0;
  color: #062744;
  font: 700 30px/1.12 'Titillium Web', sans-serif;
}
.po-auth-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #18334b;
  font: 26px/1 sans-serif;
  cursor: pointer;
}
.po-auth-close:hover, .po-auth-close:focus-visible { background: #e2edf6; }
.po-auth-body { padding: 16px 28px 20px; }
.po-auth-social { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.po-auth-provider { display: flex; align-items: center; min-height: 40px; max-width: 100%; }
.po-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: #476177;
  font-size: 14px;
}
.po-auth-divider::before, .po-auth-divider::after { content: ''; height: 1px; flex: 1; background: #dbe5ee; }
.po-auth-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.po-auth-field { margin-bottom: 10px; }
.po-auth-field label { display: block; margin: 0 0 4px; font-weight: 600; }
.po-auth-field .form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid #aabdcf;
  border-radius: 8px;
  font-size: 16px;
}
.po-auth-field .form-control:focus { border-color: #225681; box-shadow: 0 0 0 3px #22568126; }
.po-auth-recovery { margin: 2px 0 14px; text-align: right; }
.po-auth-terms { margin: 2px 0 14px; color: #425a70; font-size: 14px; }
.po-auth a { color: #174f7a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.po-auth-submit {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #0c3b60;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.po-auth-submit:hover, .po-auth-submit:focus-visible { background: #15537e; }
.po-auth-footer {
  padding: 12px 18px;
  border-top: 1px solid #dbe5ee;
  background: #f3f7fb;
  border-radius: 0 0 17px 17px;
  text-align: center;
}
@media (max-width: 400px) {
  .po-auth-header { padding-left: 18px; }
  .po-auth-body { padding-inline: 18px; }
}
@media (max-width: 330px) {
  .po-auth-names { grid-template-columns: 1fr; gap: 0; }
}

#registrationModal .modal-dialog {
  min-height: calc(100vh - 16px);
  min-height: calc(100dvh - 16px);
  margin-block: 8px;
}
#registrationModal .po-auth-header { padding-block: 12px; }
#registrationModal .po-auth-header h2 { font-size: clamp(22px, 6vw, 27px); }
#registrationModal .po-auth-tagline { margin: 3px 0 0; color: #425a70; font-size: 14px; line-height: 1.25; }
#registrationModal .po-auth-close { top: 4px; }
#registrationModal .po-auth-body { padding-block: 10px 12px; }
#registrationModal .po-auth-divider { margin-block: 6px; }
#registrationModal .po-auth-field { margin-bottom: 6px; }
#registrationModal .po-auth-field label { margin-bottom: 2px; line-height: 1.2; }
#registrationModal .po-auth-terms { margin-block: 4px 8px; line-height: 1.3; }
#registrationModal .po-auth-footer { padding-block: 8px; }

@media (min-width: 480px) and (max-height: 480px) {
  #frmRegistration {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
  #frmRegistration > :not(.po-auth-field) { grid-column: 1 / -1; }
}

.po-message.modal .modal-dialog { max-width: 424px; }
.po-message .po-message-header { display: flex; align-items: center; gap: 12px; }
.po-message .po-message-header h2 { font-size: 26px; }
.po-message-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2edf6;
  color: #174f7a;
  font: 700 19px/1 Georgia, serif;
}
#messageDiv.po-message-body { padding-block: 18px 8px; line-height: 1.5; }
.po-message-footer { display: flex; justify-content: flex-end; padding: 4px 28px 20px; }
.po-message-footer .po-auth-submit { width: auto; min-width: 94px; }
@media (max-width: 400px) {
  .po-message-footer { padding-inline: 18px; }
}
