/**
 * Funraise Full App – embed styles (no Tailwind).
 * Load this in the page head when embedding in Webflow.
 */

/* -------------------------------------------------------------------------
   Theme variables (light only)
   ------------------------------------------------------------------------- */
.funraise-app {
  --fun-foreground: 220 26% 14%;
  --fun-card-foreground: 220 26% 14%;
  --fun-border: 220 13% 84%;
  --fun-muted-foreground: 220 8% 46%;
  --fun-ring: 227 100% 55%;
  color-scheme: light;
}

/* -------------------------------------------------------------------------
   reCAPTCHA container (reserve space for widget; content is in iframe)
   ------------------------------------------------------------------------- */
.funraise-app #funraise-recaptcha,
.funraise-app .g-recaptcha {
  min-height: 78px;
  width: 100%;
}

/* -------------------------------------------------------------------------
   Page loader (white screen + spinner until .funraise-app--loaded)
   ------------------------------------------------------------------------- */
.funraise-page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.funraise-app.funraise-app--loaded .funraise-page-loader {
  display: none;
}

.funraise-page-loader__spinner {
  height: 52px;
  width: 52px;
  flex-shrink: 0;
  border: 4px solid #eee;
  border-top-color: #2979ff;
  border-right-color: #2979ff;
  border-radius: 50%;
  animation: funraise-spin 0.8s linear infinite;
}

/* -------------------------------------------------------------------------
   Layout: app shell
   ------------------------------------------------------------------------- */
.funraise-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

.funraise-app__body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.funraise-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(to bottom, #eef6fd 40px, #fcfdfe 90px);
  padding: 0 40px;
}

.funraise-dashboard-wrap {
  position: relative;
  flex: 1;
  overflow: auto;
  padding-top: 50px;
}

/* -------------------------------------------------------------------------
   Overlay (when modal open)
   ------------------------------------------------------------------------- */
.funraise-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 32, 66, 0.3);
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------------- */
.funraise-sidebar {
  display: flex;
  height: 100%;
  width: 47px;
  max-width: 47px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid #e0e0e0;
  background: #fff;
}

.funraise-sidebar__btn {
  display: flex;
  height: 44px;
  width: 44px;
  align-items: center;
  justify-content: center;
  color: hsl(var(--fun-foreground));
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.funraise-sidebar__btn:hover {
  background: rgba(250, 250, 250, 0.54);
}

.funraise-sidebar__icon {
  height: 24px;
  width: 24px;
}

.funraise-sidebar__icon.toggle {
  height: 28px;
  width: 30px;
}

.funraise-topbar__icon.logo {
  height: 34px;
  width: 30px;
}

.funraise-sidebar__divider {
  height: 1px;
  width: 100%;
  min-width: 100%;
  background: #e0e0e0;
}

.funraise-sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding-bottom: 8px;
}

/* -------------------------------------------------------------------------
   Top bar
   ------------------------------------------------------------------------- */
.funraise-topbar {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  max-width: 1554px;
  margin: 0 auto;
  width: 100%;
}

.funraise-topbar__welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100px;
  background: none;
  border: none;
  cursor: default;
  padding: 0;
}

.funraise-topbar__welcome:focus {
  outline: none;
}

.funraise-topbar__logo {
  height: 28px;
  width: auto;
  display: block;
}

.funraise-topbar__icon {
  height: 24px;
  width: 24px;
}

.funraise-topbar__title {
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--fun-card-foreground));
}

.funraise-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.funraise-topbar__search-wrap {
  position: relative;
  cursor: default;
}

.funraise-topbar__search-wrap:focus {
  outline: none;
}

.funraise-topbar__search {
  height: 39px;
  max-width: 250px;
  width: 100%;
  padding: 8px 51px 8px 18px;
  font-size: 14px;
  color: hsl(var(--fun-foreground));
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.funraise-topbar__search::placeholder {
  color: hsl(var(--fun-muted-foreground));
}

.funraise-topbar__search:focus {
  outline: none;
}

.funraise-topbar__avatar {
  display: flex;
  height: 32px;
  width: 32px;
  align-items: center;
  justify-content: center;
  color: hsl(var(--fun-muted-foreground));
  background: #fff;
  border: 1px solid hsl(var(--fun-border));
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.funraise-topbar__avatar-icon {
  height: 16px;
  width: 16px;
}

/* -------------------------------------------------------------------------
   Dashboard grid
   ------------------------------------------------------------------------- */
.funraise-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
  max-width: 1554px;
  margin: 0 auto;
  width: 100%;
}

.funraise-dashboard__tile {
  height: 48px;
  border-radius: 8px;
}

.funraise-dashboard__tile--full {
  width: 100%;
}

.funraise-dashboard__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.funraise-dashboard__tile--wide {
  grid-column: span 2;
  height: 160px;
}

.funraise-dashboard__row .funraise-dashboard__tile:not(.funraise-dashboard__tile--wide) {
  height: 160px;
}

/* -------------------------------------------------------------------------
   Tile shine animation
   ------------------------------------------------------------------------- */
@keyframes tile-shine-move {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

.tile-shine {
  background-color: #fff;
  background-image: linear-gradient(
    110deg,
    #fff 0%,
    #fff 45%,
    #fff 55%,
    #f5f5f5 65%,
    #f5f5f5 80%,
    #fff 90%,
    #fff 100%
  );
  background-size: 200% 100%;
  animation: tile-shine-move 1.2s ease-in-out infinite;
}

/* -------------------------------------------------------------------------
   Dialog / modal
   ------------------------------------------------------------------------- */
.funraise-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 51;
  width: 100%;
  max-width: 524px;
  transform: translate(-50%, -50%);
  outline: none;
}

.funraise-dialog__content {
  max-height: calc(100vh - 3rem);
  min-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Dialog states: only one visible at a time (class-based to avoid Webflow conflicts) */
.funraise-app .funraise-dialog__loading,
.funraise-app .funraise-dialog__nonus,
.funraise-app .funraise-dialog__form {
  display: none !important;
}

.funraise-app .funraise-dialog__loading.funraise-dialog__state--visible,
.funraise-app .funraise-dialog__nonus.funraise-dialog__state--visible {
  display: flex !important;
}

.funraise-app .funraise-dialog__form.funraise-dialog__state--visible {
  display: block !important;
}

.funraise-dialog__loading {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 32px;
}

.funraise-dialog__spinner {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  border: 2px solid #e0e0e0;
  border-top-color: #2979ff;
  border-radius: 50%;
  animation: funraise-spin 0.8s linear infinite;
}

@keyframes funraise-spin {
  to {
    transform: rotate(360deg);
  }
}

.funraise-dialog__nonus {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  text-align: center;
}

.funraise-dialog__nonus-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: hsl(var(--fun-foreground));
  margin: 0;
}

.funraise-dialog__nonus-p {
  max-width: 420px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.6;
  color: hsl(var(--fun-muted-foreground));
  text-align: center;
}

.funraise-dialog__nonus-cta {
  display: inline-flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: #2979ff;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.funraise-dialog__nonus-cta:hover {
  background: #2563eb;
}

.funraise-dialog__form {
  /* form container; visibility controlled by .funraise-dialog__state--visible */
}

.funraise-dialog__header {
  border-bottom: 1px solid hsl(var(--fun-border));
  padding: 32px 32px 20px;
  text-align: center;
}

.funraise-dialog__form-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: hsl(var(--fun-foreground));
  margin: 0;
}

/* Dialog shake */
@keyframes dialog-shake {
  0%,
  100% {
    transform: translate(-50%, -50%) translateX(0);
  }
  20% {
    transform: translate(-50%, -50%) translateX(-8px);
  }
  40% {
    transform: translate(-50%, -50%) translateX(8px);
  }
  60% {
    transform: translate(-50%, -50%) translateX(-5px);
  }
  80% {
    transform: translate(-50%, -50%) translateX(5px);
  }
}

.funraise-dialog.animate-dialog-shake {
  animation: dialog-shake 0.5s ease-in-out;
}

/* -------------------------------------------------------------------------
   Mobile / small screen: form scrolls with the page (no scroll within frame)
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .funraise-app {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .funraise-app__body {
    overflow: visible;
    flex: 1 1 auto;
  }

  .funraise-sidebar {
    display: none !important;
  }

  .funraise-main {
    overflow: visible;
    flex: 1 1 auto;
    padding: 0 16px;
  }

  .funraise-dashboard-wrap {
    overflow: visible;
    flex: none;
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .funraise-dashboard-wrap .funraise-dashboard {
    display: none;
  }

  .funraise-overlay {
    display: none;
  }

  .funraise-dialog {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 0 auto;
    padding: 0;
  }

  .funraise-dialog__content {
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .funraise-dialog__header {
    padding: 24px 16px 16px;
  }

  .funraise-dialog.animate-dialog-shake {
    animation: dialog-shake-mobile 0.5s ease-in-out;
  }

  .funraise-form {
    padding: 16px 16px 24px;
  }

  .fun-form-two-column-wrapper {
    flex-direction: column;
    gap: 0;
  }
}

@keyframes dialog-shake-mobile {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

/* Form view states (org: search / selected / manual) – class-based to avoid Webflow conflicts */
.funraise-app #funraise-form-org-search,
.funraise-app #funraise-form-org-selected,
.funraise-app #funraise-form-org-manual {
  display: none !important;
}

.funraise-app #funraise-form-org-search.funraise-form__view--visible,
.funraise-app #funraise-form-org-selected.funraise-form__view--visible,
.funraise-app #funraise-form-org-manual.funraise-form__view--visible {
  display: block !important;
}

/* -------------------------------------------------------------------------
   Form (fun-form classes – parity with app)
   ------------------------------------------------------------------------- */
.funraise-form {
  display: flex;
  flex-direction: column;
  padding: 24px 32px 32px;
}

.fun-form__group {
  margin-bottom: 15px;
  position: relative;
}

.fun-form-two-column-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 17px;
  justify-content: space-between;
}

.fun-form-two-column-wrapper .fun-form__group {
  width: 100%;
  margin: 0;
}

.fun-form__label {
  color: #002042;
  font-family: Garnett, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.25px;
  display: block;
  margin-bottom: 5px;
}

.fun-form__input {
  border-radius: 3px;
  border: 1px solid #e1e4e8;
  background: #fbfdfd;
  width: 100%;
  height: 56px;
  padding: 0 15px;
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 5px;
}

.fun-form__input:focus {
  border-color: #2979ff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(41, 121, 255, 0.25);
}

.fun-form__input--error {
  border-color: #d32f2f;
}

.fun-form__error {
  color: #d32f2f;
  font-weight: 400;
  font-size: 13px;
  line-height: 120%;
  margin: 0;
  padding: 0;
  display: none;
  text-align: end;
}

.fun-form__error.visible {
  display: block;
}

.fun-form__label--required::after {
  content: " *";
  color: #d32f2f;
}

.fun-form__submit {
  width: 100%;
  margin-top: 30px;
  background-color: #2979ff;
  color: white;
  height: 56px;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.fun-form__submit:hover {
  background-color: #2563eb;
}

.fun-form__submit:focus {
  border-color: #2979ff;
  outline: 0;
  background-color: #2979ff;
}

.fun-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.fun-form__selected-org {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e1e4e8;
  background: #fbfdfd;
  border-radius: 6px;
  padding: 16px 20px;
  min-height: 56px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.fun-form__org-text,
.fun-form-suggestion-item {
  font-family: Garnett, sans-serif;
  color: #002042;
  font-size: 12px;
  font-weight: 300;
  line-height: 19px;
  letter-spacing: 0.2px;
}

.fun-form__org-text strong,
.fun-form-suggestion-item strong {
  font-weight: 500;
  font-size: 14px;
  display: block;
}

.fun-form__org-text span,
.fun-form-suggestion-item span {
  color: #002042;
  font-size: 12px;
}

.fun-form__clear-btn {
  all: unset;
  font-size: 32px;
  color: #667085;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s ease;
}

.fun-form__clear-btn:hover {
  color: #101828;
}

.fun-form__label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.fun-form__search-btn {
  all: unset;
  color: #2979ff;
  font-family: Garnett, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fun-form__search-btn:hover {
  text-decoration: underline;
}

.fun-form-law {
  margin-top: 15px;
  font-size: 13px;
  color: #666;
}

.fun-form-law-link {
  color: #2979ff;
  text-decoration: none;
}

.fun-form-law-link:hover {
  text-decoration: underline;
}

.fun-form__suggestions {
  position: absolute;
  background-color: #fff;
  border: 1px solid #e1e4e8;
  max-height: 298px;
  overflow-y: auto;
  width: 100%;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding-bottom: 56px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fun-form__suggestions::-webkit-scrollbar {
  width: 8px;
}

.fun-form__suggestions::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 6px;
}

.fun-form__suggestions::-webkit-scrollbar-thumb {
  background-color: #d0d5dd;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.fun-form__suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #e0e0e0;
}

.fun-form__suggestion-item:hover {
  background-color: #f1f1f1;
}

.fun-form__loading-spinner {
  display: flex;
  align-items: center;
  padding: 10px;
  font-style: italic;
  color: #666;
  cursor: default;
}

.fun-form__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #2979ff;
  border-radius: 50%;
  animation: fun-form-spin 0.6s linear infinite;
  margin-right: 10px;
}

@keyframes fun-form-spin {
  to {
    transform: rotate(360deg);
  }
}

.fun-form__manual-footer {
  position: sticky;
  bottom: 0;
  background: #f9fafb;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  font-weight: 300;
  letter-spacing: 0.25px;
  padding: 12px 15px;
  border-bottom: none;
}

.fun-form__manual-footer button {
  all: unset;
  color: #2979ff;
  font-weight: 500;
  cursor: pointer;
}

.fun-form__manual-footer button:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Screen reader only
   ------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

