/* ===== SERVICE INTAKE WIDGET ===== */
/* 3-step modal: entity select → doc checklist → details + upload → WhatsApp */

/* ---- overlay ---- */
.si-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(3px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.si-overlay.open { display: flex; }

/* ---- modal shell ---- */
.si-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 28px 64px rgba(0,0,0,0.22);
  position: relative;
  animation: siSlideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes siSlideUp {
  from { transform: translateY(40px); opacity:0; }
  to   { transform: translateY(0);    opacity:1; }
}

/* ---- header ---- */
.si-header {
  background: #0f0f0f;
  color: #fff;
  padding: 20px 24px 16px;
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.si-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.si-service-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFD829;
  margin-bottom: 4px;
}
.si-header h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}
.si-close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.si-close:hover { background: rgba(255,255,255,0.24); }

/* ---- progress bar ---- */
.si-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 14px;
}
.si-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}
.si-step-dot::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 60%;
  right: -40%;
  height: 2px;
  background: rgba(255,255,255,0.18);
  z-index: 0;
}
.si-step-dot:last-child::after { display: none; }
.si-dot-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}
.si-step-dot.active .si-dot-circle,
.si-step-dot.done .si-dot-circle {
  background: #FFD829;
  border-color: #FFD829;
  color: #0f0f0f;
}
.si-dot-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  font-weight: 500;
}
.si-step-dot.active .si-dot-label { color: #FFD829; }

/* ---- body ---- */
.si-body {
  padding: 24px;
}

/* ---- step panels ---- */
.si-panel { display: none; }
.si-panel.active { display: block; }
.si-panel-title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0 0 6px;
}
.si-panel-sub {
  font-size: 0.83rem;
  color: #6b7280;
  margin: 0 0 20px;
}

/* ---- entity type cards ---- */
.si-entity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.si-entity-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  background: #fafafa;
  user-select: none;
}
.si-entity-card:hover {
  border-color: #FFD829;
  background: #fffbeb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,216,41,0.25);
}
.si-entity-card.selected {
  border-color: #0f0f0f;
  background: #FFD829;
  box-shadow: 0 4px 16px rgba(255,216,41,0.4);
}
.si-entity-card.selected .si-entity-icon { transform: scale(1.15); }
.si-entity-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.si-entity-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f0f0f;
  line-height: 1.3;
}
.si-entity-hint {
  font-size: 0.68rem;
  color: #6b7280;
  margin-top: 2px;
}
.si-entity-card.selected .si-entity-hint { color: #3a3a3a; }

/* ---- document checklist ---- */
.si-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.si-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f6f8;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.si-doc-item:hover { border-color: #FFD829; background: #fffbeb; }
.si-doc-item.checked { border-color: #00C85A; background: #e6fff0; }
.si-doc-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  background: #fff;
  transition: all 0.15s;
}
.si-doc-item.checked .si-doc-checkbox {
  background: #00C85A;
  border-color: #00C85A;
  color: #fff;
}
.si-doc-text { font-size: 0.83rem; color: #1a1a1a; flex: 1; }
.si-doc-note { font-size: 0.7rem; color: #6b7280; display: block; }
.si-doc-upload-btn {
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.si-doc-item.has-file .si-doc-upload-btn {
  background: #FFD829;
  border-color: #FFD829;
  color: #0f0f0f;
}
.si-doc-upload-btn:hover { border-color: #0f0f0f; color: #0f0f0f; }
input.si-file-input { display: none; }
.si-upload-status {
  font-size: 0.68rem;
  color: #00C85A;
  font-weight: 600;
  display: none;
}
.si-doc-item.has-file .si-upload-status { display: block; }

/* ---- detail step ---- */
.si-form-row { margin-bottom: 14px; }
.si-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.si-input {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f0f0f;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.si-input:focus { outline: none; border-color: #0f0f0f; background: #fff; }
.si-input.error { border-color: #ef4444; }
.si-error-msg { font-size: 0.72rem; color: #ef4444; margin-top: 4px; display: none; }
.si-error-msg.show { display: block; }

.si-summary-box {
  background: #f5f6f8;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: #374151;
  line-height: 1.7;
}
.si-summary-box strong { color: #0f0f0f; }

/* ---- buttons ---- */
.si-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.si-btn-back {
  flex: 0 0 auto;
  padding: 12px 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}
.si-btn-back:hover { border-color: #0f0f0f; }
.si-btn-next {
  flex: 1;
  padding: 13px 20px;
  background: #FFD829;
  border: 2px solid #0f0f0f;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f0f0f;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Baloo 2', cursive;
  letter-spacing: 0.01em;
}
.si-btn-next:hover { background: #f0c000; transform: translateY(-1px); }
.si-btn-next:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.si-btn-wa {
  flex: 1;
  padding: 13px 20px;
  background: #25D366;
  border: 2px solid #128C7E;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Baloo 2', cursive;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.si-btn-wa:hover { background: #1db954; transform: translateY(-1px); }
.si-wa-icon { font-size: 1.2rem; }

/* ---- doc count badge ---- */
.si-doc-counter {
  background: #f5f6f8;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: #374151;
  display: flex;
  justify-content: space-between;
}
.si-doc-counter span { font-weight: 700; color: #00C85A; }

/* ---- selected entity reminder ---- */
.si-entity-reminder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFD829;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f0f0f;
  margin-bottom: 16px;
}

/* ---- responsive ---- */
@media(max-width:480px) {
  .si-modal { border-radius: 16px 16px 0 0; max-height: 95vh; }
  .si-overlay { align-items: flex-end; padding: 0; }
  .si-entity-grid { grid-template-columns: 1fr 1fr; }
  .si-header { border-radius: 16px 16px 0 0; }
}
