/*
 * Member-only presentation styles.
 *
 * Keep this file loaded only from the member layout. Admin assets must not
 * import prototype Tailwind or member background styles.
 */

html[data-member-text-size="large"] { font-size: 112.5%; }
html[data-member-text-size="extra_large"] { font-size: 125%; }

html[data-controller~="member-text-size"] :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font-size: 1rem;
}

.member-text-size-control { position: relative; flex-shrink: 0; }
.member-text-size-control summary {
  align-items: center;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #44403c;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  list-style: none;
}
.member-text-size-control summary::-webkit-details-marker { display: none; }
.member-text-size-control__choices {
  background: #fff8f2;
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(120, 83, 40, 0.12);
  display: grid;
  min-width: 10rem;
  padding: 0.375rem;
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 0.5rem);
  z-index: 50;
}
.member-text-size-control:not([open]) .member-text-size-control__choices { display: none; }
.member-text-size-control button {
  border-radius: 0.75rem;
  color: #44403c;
  cursor: pointer;
  font-size: 1rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.member-text-size-control button[aria-pressed="true"] { background: #1c1917; color: #fff; }
.member-text-size-control :is(summary, button):focus-visible { outline: 2px solid #b45309; outline-offset: 3px; }

.member-attempted :is(input, select, textarea):invalid { border-color: #dc2626; background-color: #fef2f2; }
.member-background-shell [hidden] { display: none !important; }
.member-portal-header {
  flex-wrap: wrap;
}

.member-locked-identity { min-width: 0; cursor: not-allowed; }
.member-locked-identity :disabled { pointer-events: none; background: #f5f5f4; color: #57534e; opacity: 1; }
.member-locked-identity:focus-visible { outline: 2px solid #b45309; outline-offset: 3px; border-radius: .5rem; }

.member-payment-panel { min-width: 0; }
.member-payment-method {
  display: block;
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid #fed7aa;
  border-radius: 1.5rem;
  background: #fff7ed;
  color: #292524;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.member-payment-method:hover { background: #fffbeb; }
.member-payment-method:has(input:checked) { border: 2px solid #d97706; padding: calc(1.25rem - 1px); background: #fffbeb; }
.member-payment-method:focus-within,
.member-proof-dropzone:focus-within { outline: 2px solid #b45309; outline-offset: 3px; }
.member-payment-method__heading { display: flex; align-items: center; gap: .625rem; font-size: .875rem; font-weight: 600; }
.member-payment-method input { width: 1.125rem; height: 1.125rem; flex-shrink: 0; accent-color: #b45309; }
.member-payment-instructions { display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .75rem; font-size: .875rem; line-height: 1.6; }
.member-payment-method__policy { display: block; margin-top: .75rem; font-size: .875rem; color: #57534e; }
.member-payment-method__image { display: block; width: auto; max-width: 100%; max-height: 16rem; object-fit: contain; margin: 1rem auto; }
.member-proof-dropzone { min-width: 0; border: 2px dashed #fdba74; border-radius: 1.5rem; padding: 1.25rem; background: #fffaf5; }
.member-proof-dropzone.is-dragging { border-color: #b45309; background: #fef3c7; }
.member-proof-input { display: block; width: 100%; min-width: 0; margin-top: 1rem; font: inherit; font-size: .875rem; }
.member-proof-input::file-selector-button { min-height: 2.75rem; margin-right: .75rem; padding: .5rem 1rem; border: 1px solid #fdba74; border-radius: 999px; background: white; color: #92400e; font: inherit; cursor: pointer; }
.member-proof-feedback { margin-top: .5rem; color: #9f1239; font-size: .875rem; overflow-wrap: anywhere; }
.member-payment-errors { margin-top: 1.5rem; padding: 1rem; border: 1px solid #fda4af; border-radius: 1rem; background: #fff1f2; color: #881337; font-size: .875rem; line-height: 1.6; }
.member-payment-errors ul { list-style: disc; padding-left: 1.25rem; margin: .5rem 0; }
.member-payment-history-item { margin-top: 1rem; padding: 1.25rem; border: 1px solid #fed7aa; border-radius: 1.5rem; overflow-wrap: anywhere; }
.member-payment-history-item__heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }

.member-phone-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.member-phone-input > * { min-width: 0; }

@media (max-width: 24rem) {
  .member-phone-input { grid-template-columns: minmax(0, 1fr); }
}

.member-portal-header__navigation {
  flex-wrap: wrap;
}

@media (min-width: 40rem) {
  .member-header-mobile-brand {
    display: none;
  }
}

.member-public-header {
  flex-wrap: wrap;
  padding-block: 0.5rem;
}

.member-public-header__brand {
  flex: 1 1 16rem;
  min-width: 0;
}

.member-public-header__brand img {
  flex-shrink: 0;
}

.member-public-header__actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.member-public-header__actions a,
.member-public-header__actions button {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 39.999rem) {
  .member-public-header__brand {
    flex: 0 0 auto;
  }

  .member-public-header__actions {
    flex: 1 1 0;
  }
}

.member-background-shell {
  background-color: #fff8f2;
  background-image: var(--member-background-image);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

@media (max-width: 48rem) {
  .member-background-shell {
    background-position: center top;
    background-size: auto 100vh;
    background-attachment: scroll;
  }
}

.member-timeslot-card {
  cursor: pointer;
  display: block;
  position: relative;
}

.member-timeslot-card__input {
  height: 1px;
  left: 1rem;
  opacity: 0;
  position: absolute;
  top: 1rem;
  width: 1px;
}

.member-timeslot-card__selected {
  display: none;
}

.member-timeslot-card:has(.member-timeslot-card__input:checked) {
  background-color: #fffbeb;
  border: 2px solid #fbbf24;
  padding: 1.25rem;
}

.member-timeslot-card:has(.member-timeslot-card__input:checked) .member-timeslot-card__available {
  display: none;
}

.member-timeslot-card:has(.member-timeslot-card__input:checked) .member-timeslot-card__selected {
  display: inline;
}

.member-timeslot-card:focus-within {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.member-remote-select {
  position: relative;
}

.member-remote-select__control {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
}

.member-remote-select__control:focus-within {
  background: #ffffff;
  border-color: #f59e0b;
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.member-remote-select__selection {
  display: contents;
}

.member-remote-select__token {
  align-items: center;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  color: #78350f;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 0.375rem;
  min-height: 2rem;
  padding: 0.25rem 0.375rem 0.25rem 0.75rem;
}

.member-remote-select__token button {
  align-items: center;
  background: #fef3c7;
  border: 0;
  border-radius: 999px;
  color: #92400e;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 1.35rem;
  justify-content: center;
  line-height: 1;
  width: 1.35rem;
}

.member-remote-select__query {
  background: transparent;
  border: 0;
  color: #1c1917;
  flex: 1 1 12rem;
  font: inherit;
  min-height: 2rem;
  min-width: 8rem;
  outline: 0;
}

.member-remote-select__results {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(120, 83, 40, 0.14);
  left: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.35rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
}

.member-remote-select__option,
.member-remote-select__empty {
  border-radius: 0.75rem;
  color: #292524;
  display: block;
  font-size: 0.875rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
  width: 100%;
}

.member-remote-select__option {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.member-remote-select__option:hover {
  background: #fff7ed;
}
.member-remote-select__option[aria-selected="true"] { background: #fef3c7; outline: 2px solid #b45309; }

.member-remote-select__empty {
  color: #78716c;
}

.member-signature-canvas {
  display: block;
  width: 100%;
  height: 12rem;
  touch-action: none;
}
.member-signature-canvas:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}

.application-pledge-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
