/* grant-connect-deploy/css/founder-profile.css */
/* V1 Profile UI — rail link + editor modal. */

/* Rail link (sits in workspace-pane hub-nav) */
.fp-rail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  color: #1F3D2A;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  /* R3-6 (2026-05-11): desktop touch target. */
  min-height: 36px;
}

.fp-rail-link:hover,
.fp-rail-link:focus-visible {
  background: rgba(31,61,42,0.06);
  outline: none;
}

.fp-rail-link:focus-visible {
  outline: 2px solid #7A4524;
  outline-offset: -2px;
}

.fp-rail-icon {
  font-size: 14px;
  line-height: 1;
}

.fp-rail-label {
  flex: 1;
}

.fp-rail-completeness {
  margin-left: auto;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
  background: rgba(122,69,36,0.08);
  color: #7A4524;
}

.fp-rail-completeness.fp-completeness-good {
  background: rgba(31,61,42,0.1);
  color: #1F3D2A;
}

.fp-rail-completeness.fp-completeness-low {
  background: rgba(122,69,36,0.1);
  color: #7A4524;
}

/* R3-5 (2026-05-11): zero-percent state — neutral sienna "Add details" badge,
   not the alarming red/orange that reads as an error. */
.fp-rail-completeness.fp-completeness-zero {
  background: rgba(122,69,36,0.07);
  color: #7A4524;
  font-style: italic;
  font-weight: 400;
}

/* R3-6 (2026-05-11): fp-rail-link 44px touch target on mobile. */
@media (max-width: 767px) {
  .fp-rail-link {
    min-height: 44px;
  }
}

/* Modal */
.fp-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31,61,42,0.45);
  animation: fpFadeIn 0.18s ease-out;
}

.fp-modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: fpSlideIn 0.22s ease-out;
}

@keyframes fpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fpSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fp-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1F3D2A;
  margin: 0;
}

.fp-modal-close {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.fp-modal-close:hover,
.fp-modal-close:focus-visible {
  background: rgba(31,61,42,0.06);
  color: #1F3D2A;
  outline: none;
}

.fp-modal-subtitle {
  font-size: 13.5px;
  color: #555;
  line-height: 1.55;
  margin: 10px 0 20px 0;
}

.fp-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fp-field {
  display: block;
  margin-bottom: 14px;
}

.fp-field > span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #1F3D2A;
  margin-bottom: 5px;
}

.fp-field-hint {
  font-weight: 400;
  font-style: normal;
  color: #888;
  margin-left: 4px;
}

.fp-field input,
.fp-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(31,61,42,0.18);
  border-radius: 5px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1F3D2A;
  background: #fff;
}

.fp-field input:focus,
.fp-field select:focus {
  outline: 2px solid #7A4524;
  outline-offset: -1px;
  border-color: #7A4524;
}

.fp-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(31,61,42,0.08);
  margin-top: 6px;
}

.fp-cancel,
.fp-save {
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(31,61,42,0.18);
  font-family: inherit;
}

.fp-cancel {
  background: #fff;
  color: #1F3D2A;
}

.fp-cancel:hover {
  background: rgba(31,61,42,0.04);
}

.fp-save {
  background: #1F3D2A;
  color: #FAF7F2;
  border-color: #1F3D2A;
  font-weight: 500;
}

.fp-save:hover {
  background: #2A4D3A;
}

.fp-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Onboarding modal variant (Task 14) — same chrome, with Skip pushed left */
.fp-modal--onboarding .fp-modal-content {
  /* Slightly warmer subtitle treatment — onboarding feels welcoming, not transactional */
  border-top: 3px solid #1F3D2A;
}

.fp-modal--onboarding .fp-modal-header h2 {
  font-weight: 600;
}

.fp-modal-footer .fp-skip {
  margin-right: auto; /* Push Skip to the left, Save to the right */
}

/* Mobile responsive */
@media (max-width: 600px) {
  .fp-modal-content {
    max-width: 100%;
    padding: 20px;
  }

  /* P1-6 (2026-05-11): bump touch targets on mobile for inputs, buttons, close. */
  .fp-field input,
  .fp-field select {
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .fp-cancel,
  .fp-save {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .fp-modal-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* === Progressive enrichment prompt (Task 15) === */
/* Bottom-right toast-style prompt used by Phase 5 AI co-pilot to collect
   missing profile fields just-in-time during drafting. */

.fp-progressive-prompt {
  position: fixed;
  /* P1-15 (2026-05-15, Lens 1 verification): the prompt was bottom-right at
     z-index: 9999, which physically overlapped the "Show example" + "Check
     eligibility" AI tool buttons on the right side of the editor (y:742-800).
     Lens 3's blind reviewer mistook this for "all AI tools fail" because
     pointer events landed on the prompt, not the buttons.
     Fix: move to TOP-LEFT — below the 56px nav + 44px workspace back-strip
     (100px) so it sits in the upper-LEFT corner above the rail, which has
     no time-sensitive interactive content the user might need at that moment.
     The arc of attention on the editor (text drafting + AI tool clicks) is
     undisturbed. */
  top: calc(56px + 44px + 16px);
  left: 20px;
  max-width: 360px;
  background: #fff;
  border: 1px solid rgba(122,69,36,0.2);
  border-left: 4px solid #7A4524;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(31,61,42,0.12);
  z-index: 9999;
  animation: fpSlideDown 0.22s ease-out;
}

@keyframes fpSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fpSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fp-pp-body strong {
  display: block;
  color: #1F3D2A;
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.fp-pp-input-wrap {
  display: block;
}

.fp-pp-field-name {
  display: block;
  font-size: 11px;
  color: #7A4524;
  margin-bottom: 3px;
  font-weight: 500;
}

.fp-pp-body input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(31,61,42,0.18);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: #1F3D2A;
}

.fp-pp-body input:focus {
  outline: 2px solid #7A4524;
  outline-offset: -1px;
  border-color: #7A4524;
}

.fp-pp-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.fp-pp-skip,
.fp-pp-save {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid rgba(31,61,42,0.18);
  font-family: inherit;
}

.fp-pp-skip {
  background: #fff;
  color: #666;
}

.fp-pp-save {
  background: #1F3D2A;
  color: #FAF7F2;
  border-color: #1F3D2A;
}

.fp-pp-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile — full-width top sheet (matches the new top-anchored desktop
   position so the prompt animates in from the same direction on both
   surfaces — was bottom on mobile, top on desktop; now both top). */
@media (max-width: 600px) {
  .fp-progressive-prompt {
    left: 12px;
    right: 12px;
    /* keep top: calc(...) from the base rule; clear nav + mob-tabs */
    top: calc(56px + 50px + 12px);
    max-width: none;
  }
}
