/* Pipedrive Deal Form — scoped, theme-neutral styling. */
.pddf-wrap { max-width: 560px; margin: 0 auto; }

.pddf-form {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  padding: 24px;
  color: #1f2430;
}

.pddf-fieldset { border: none; margin: 0 0 20px; padding: 0; }
.pddf-legend {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #6b7280; margin-bottom: 12px; padding: 0; font-weight: 700;
}
.pddf-field { margin-bottom: 14px; }
.pddf-field:last-child { margin-bottom: 0; }
.pddf-field label { display: block; font-size: 0.85rem; margin-bottom: 6px; font-weight: 600; }
.pddf-req { color: #2f7d4f; }

.pddf-form input,
.pddf-form select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #f8f9fb;
  color: #1f2430;
  border: 1px solid #d3d8e0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pddf-form input:focus,
.pddf-form select:focus {
  border-color: #2f7d4f;
  box-shadow: 0 0 0 3px rgba(47, 125, 79, 0.15);
}

.pddf-row { display: flex; gap: 12px; }
.pddf-row > .pddf-field { flex: 1; }
.pddf-field--narrow { max-width: 140px; }

.pddf-button {
  width: 100%;
  padding: 12px;
  font-size: 0.98rem;
  font-weight: 700;
  background: #2f7d4f;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.pddf-button:hover:not(:disabled) { background: #35915b; }
.pddf-button:disabled { opacity: 0.6; cursor: not-allowed; }

.pddf-msg { margin-top: 16px; padding: 14px; border-radius: 8px; font-size: 0.9rem; display: none; }
.pddf-msg.pddf-show { display: block; }
.pddf-msg.pddf-ok { background: #eaf6ef; border: 1px solid #2f7d4f; }
.pddf-msg.pddf-err { background: #fdecea; border: 1px solid #e0574f; color: #9b2c25; }
.pddf-msg a { color: #216a41; font-weight: 700; }

/* Auto-filled, read-only deal title preview */
.pddf-form input.pddf-readonly {
  background: #eef0f4;
  color: #4b5563;
  border-style: dashed;
  cursor: default;
  font-weight: 600;
}
.pddf-form input.pddf-readonly:focus {
  border-color: #d3d8e0;
  box-shadow: none;
}
.pddf-hint-muted { margin-top: 5px; font-size: 0.78rem; color: #6b7280; }

/* Segment pills — front and center */
.pddf-segment-block { margin-bottom: 20px; }
.pddf-segment-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #6b7280; margin-bottom: 10px; font-weight: 700;
}
.pddf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pddf-pill {
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #1f2430;
  border: 1.5px solid #d3d8e0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pddf-pill:hover { border-color: #2f7d4f; }
.pddf-pill--on {
  background: #2f7d4f;
  border-color: #2f7d4f;
  color: #fff;
}

/* Organization autocomplete */
.pddf-org-block { margin-bottom: 20px; }
.pddf-combo { position: relative; }
.pddf-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #d3d8e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 20;
}
.pddf-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.92rem;
  background: #fff;
  color: #1f2430;
  border: none;
  border-bottom: 1px solid #eef0f4;
  cursor: pointer;
}
.pddf-suggestion:last-child { border-bottom: none; }
.pddf-suggestion:hover { background: #eaf6ef; }
/* Email/org line that tells two same-named contacts apart. */
.pddf-suggestion-detail { color: #6b7280; font-size: 0.85em; }
.pddf-hint { margin-top: 6px; font-size: 0.82rem; color: #2f7d4f; font-weight: 600; }

.pddf-banner {
  display: none; margin-bottom: 16px; padding: 12px; border-radius: 8px;
  background: #fdecea; border: 1px solid #e0574f; color: #9b2c25; font-size: 0.85rem;
}
.pddf-banner.pddf-show { display: block; }

.pddf-notice {
  max-width: 560px; margin: 0 auto; padding: 14px 16px;
  background: #f3f4f6; border: 1px solid #d3d8e0; border-radius: 8px; color: #4b5563;
}

@media (max-width: 480px) {
  .pddf-row { flex-direction: column; gap: 0; }
  .pddf-field--narrow { max-width: none; }
}
