/* fp-intake-id-uploads.css — ID & insurance card upload UI
   v2 (DEPLOY_4_30_2026_v33C):
     • Visually-hidden native file input; whole-card tappable via styled <label>.
     • Sticky live counter at top of section (e.g. "2 of 4 required photos attached").
     • .fp-id-filled class wired to JS — solid green border + checkmark on success.
     • .fp-id-processing class — soft pulse while client-side image pipeline runs.
     • Larger primary tappable area (~64px) on mobile; reads "Take Photo or Choose File".
   Mobile-first, matches the fax-secure button aesthetic. */

.fp-id-section {
  margin: 2.5rem 0 1.5rem;
  padding: 1.5rem;
  background: #f7fafc;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
}
.fp-id-section h3 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  color: #1d5560;
  letter-spacing: .3px;
}
.fp-id-section .fp-id-intro {
  margin: 0 0 1rem;
  color: #455a64;
  font-size: .9rem;
  line-height: 1.5;
}

/* ── Live counter ───────────────────────────────────────────────── */
.fp-id-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.25rem;
  padding: .65rem .9rem;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 8px;
  font-size: .92rem;
  color: #5d4037;
  font-weight: 600;
  transition: background .25s, border-color .25s, color .25s;
}
.fp-id-counter .fp-id-counter-icon {
  font-size: 1.1rem;
  margin-right: .5rem;
  display: inline-block;
  vertical-align: middle;
}
.fp-id-counter.fp-id-counter-complete {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #1b5e20;
}
.fp-id-counter .fp-id-counter-num { font-weight: 800; }

/* ── Group titles ───────────────────────────────────────────────── */
.fp-id-section .fp-id-group-title {
  margin: 1.25rem 0 .5rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1d5560;
  text-transform: uppercase;
  border-bottom: 1px solid #cfd8dc;
  padding-bottom: .3rem;
}
.fp-id-section .fp-id-group-title.optional::after {
  content: attr(data-optional-label);
  margin-left: .5rem;
  font-weight: 400;
  font-size: .7rem;
  color: #78909c;
  letter-spacing: .5px;
  text-transform: none;
}

/* ── Slot grid ──────────────────────────────────────────────────── */
.fp-id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}
@media (max-width: 540px) {
  .fp-id-grid { grid-template-columns: 1fr; }
}

.fp-id-slot {
  position: relative;
  padding: .85rem;
  background: #fff;
  border: 1.5px dashed #b0bec5;
  border-radius: 10px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.fp-id-slot.fp-id-filled {
  border-style: solid;
  border-color: #2e7d32;
  background: #f1f8f9;
  box-shadow: 0 1px 4px rgba(46,125,50,.15);
}
.fp-id-slot.fp-id-processing {
  border-color: #ef6c00;
  animation: fp-id-pulse 1.2s ease-in-out infinite;
}
@keyframes fp-id-pulse {
  0%, 100% { background: #fff; }
  50% { background: #fff8e1; }
}
.fp-id-slot label.fp-id-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #1d5560;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.fp-id-slot label.fp-id-label .req {
  color: #c62828;
  margin-left: .2rem;
}

/* ── Native file input: visually hidden but accessible ──────────── */
.fp-id-slot input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Styled label-as-button (the big tappable area) ─────────────── */
.fp-id-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  min-height: 56px;
  padding: .75rem 1rem;
  background: linear-gradient(180deg, #2a7886 0%, #1d5560 100%);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,.15);
  box-shadow: 0 2px 6px rgba(29,85,96,.25);
  transition: transform .08s, box-shadow .15s, background .15s;
}
.fp-id-cta:hover { background: linear-gradient(180deg,#1d5560 0%,#143f48 100%); }
.fp-id-cta:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(29,85,96,.25); }
.fp-id-cta svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.fp-id-slot.fp-id-filled .fp-id-cta {
  background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
}
.fp-id-slot.fp-id-filled .fp-id-cta:hover {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
}

/* ── Preview thumbnail ──────────────────────────────────────────── */
.fp-id-preview {
  margin-top: .6rem;
  min-height: 0;
}
.fp-id-preview .fp-id-thumb {
  display: block;
  max-width: 100%;
  max-height: 180px;
  border-radius: 6px;
  border: 1px solid #cfd8dc;
  background: #fff;
  margin: 0 auto;
}

/* ── Status text ────────────────────────────────────────────────── */
.fp-id-status {
  margin-top: .4rem;
  font-size: .75rem;
  min-height: 1rem;
  color: #78909c;
  line-height: 1.35;
}
.fp-id-status-working { color: #ef6c00; font-weight: 600; }
.fp-id-status-ok { color: #2e7d32; font-weight: 700; }
.fp-id-status-error { color: #c62828; font-weight: 600; }

/* ── Remove (clear) button ─────────────────────────────────────── */
.fp-id-clear {
  display: none;
  margin-top: .4rem;
  background: transparent;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  color: #455a64;
  padding: .35rem .8rem;
  font-size: .78rem;
  cursor: pointer;
}
.fp-id-clear:hover { background: #eceff1; }
.fp-id-clear:disabled { opacity: .5; cursor: not-allowed; }

/* ── Privacy note ───────────────────────────────────────────────── */
.fp-id-privacy-note {
  margin-top: 1.25rem;
  padding: .75rem 1rem;
  background: #e8f4f6;
  border-left: 3px solid #2a7886;
  border-radius: 4px;
  font-size: .8rem;
  color: #1d5560;
  line-height: 1.5;
}
.fp-id-privacy-note strong { color: #0d47a1; }

@media print {
  .fp-id-section { display: none !important; }
}
